Appropiate way to position a light?
Appropiate way to position a light?
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?
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
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