Page 1 of 1

Question about the RootSceneNode

Posted: Fri Mar 18, 2016 12:31 pm
by AReichl
Hi,

by accident i discovered, that the RootSceneNode ( ...getRootSceneNode() ) seems to be a "real" node which can be moved, rotated and so on
( don't laugh here, because this is not self-evident ).

My question: can this "feature" be used for something ( i am still thinking about the problem of moving the world around the camera )?

Re: Question about the RootSceneNode

Posted: Sat Mar 19, 2016 2:45 am
by Mel
Moving, rotating or scaling the root scene node? just as what it looks like, it will move, rotate, and or scale the node and and all its children, thus any scene node pending from it will be moved, scaled and rotated. It is an inherited feature from the ISceneNode interface that keeps the programming uniform, so the rendering starts on the root node, and iterates through all the children to render all of them. Obviously, if there is a scene node which isn't bound to the root node, direct or indirectly, it won't be rendered unless you tell it to specifically.

By the way, if that blows your mind, maybe you want to take a peek to what does actually return "getRootSceneNode()" :) Hint, it is a "this" pointer, but what does that pointer point at?

Re: Question about the RootSceneNode

Posted: Sun Mar 20, 2016 10:25 am
by AReichl
Due to multiple inheritance i assume ISceneNode.

Re: Question about the RootSceneNode

Posted: Sun Mar 20, 2016 11:56 pm
by mongoose7
I think he meant, the scene manager itself.