Question about the RootSceneNode

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
AReichl
Posts: 270
Joined: Wed Jul 13, 2011 2:34 pm

Question about the RootSceneNode

Post 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 )?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Question about the RootSceneNode

Post 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?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
AReichl
Posts: 270
Joined: Wed Jul 13, 2011 2:34 pm

Re: Question about the RootSceneNode

Post by AReichl »

Due to multiple inheritance i assume ISceneNode.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Question about the RootSceneNode

Post by mongoose7 »

I think he meant, the scene manager itself.
Post Reply