Appropiate way to position a light?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Appropiate way to position a light?

Post by Jedive »

What's the appropiate way to position a ILightSceneNode? I think that it should be by calling ILightSceneNode::setPosition(), like with any other scene node, but this class also has a method ILightSceneNode::getLightData().Position.set(). Then, which one should I use?
Xico
Posts: 30
Joined: Sun Jun 05, 2005 5:08 pm
Location: Buenos Aires, Argentina
Contact:

Post by Xico »

Hi Jedive
I am not sure...
the IScenenode::setPosition() sets the RelativeTranslation vector of the node, and Slight::Position vector also represent the position of the light... so... I don't know what happen if you try to set the two vectors independently. Probably then exist a offset between the two points.
In my opinion the best option is setPosition, because in the constructor of CLightSceneNode the position argument is used to set the RelativeTranslation of the parent class constructor, and also is used to set the LightData.Position vector. So, both have the same functionality, but the second is probably more used to internal functions, I think.

regards
Xico
Jedive
Posts: 146
Joined: Wed Apr 28, 2004 5:51 pm

Post by Jedive »

Thank you very much, Xico.
Post Reply