Where do they exist?

oracle1124

29-11-2007 09:29:00

Hi,

I am a relative newbie to Ogre and PG, but I just need to know when you use addTree to add the trees, like in PG Example 1, where do the trees exist in relation to the Scene Manager, Camera, Nodes and Window? I am still grasping at these and where they are in relation to everything.

Thanks

JohnJ

29-11-2007 15:42:03

All PagedGeometry geometry (trees, grass, etc.) is added using global coordinates - in other words, they're in relation to the root scene node. So adding a tree with addTree() is like creating a SceneNode under SceneManager::getSingleton().getRootSceneNode() and attaching a tree entity to it.

oracle1124

16-12-2007 10:45:18

Is there any way I can print some sort of list showing the nodes in an order, like parent node then child nodes etc. Just to show me the way everything connects together?

JohnJ

21-12-2007 17:33:43

Is there any way I can print some sort of list showing the nodes in an order, like parent node then child nodes etc. Just to show me the way everything connects together?
I don't know of any built-in function in Ogre that does this, but you could probably make one yourself. But this shouldn't be necessary anyway (unless I'm misunderstanding your purpose) - when only the root scene node is used, there is no tree-like node structure - just a big list of nodes under "root".

Either way, the nodes PagedGeometry creates shouldn't be any of your concern, since that's all internally managed by PagedGeometry. The PageLoader classes provide the interface you should use to place trees, etc. on your world.