octree on 3d models

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
Avalanche
Posts: 18
Joined: Tue Sep 05, 2006 7:21 am

octree on 3d models

Post by Avalanche »

i dont like to create level in bsp, but i'll like to enjoy the octree optimization, so can i apply octree on any static models?
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

scene::IAnimatedMesh *amesh = smgr->getMesh("meshname.obj");
ISceneNode *myNode = smgr->addOctTreeSceneNode(amesh->getMesh(0));

It seems the model must be a single mesh.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

the getMesh(0) means "get the first frame", not "get the first mesh buffer". so the mesh that makes up an octTreeSceneNode can have multiple mesh buffers, it just can't be an animated mesh
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Avalanche
Posts: 18
Joined: Tue Sep 05, 2006 7:21 am

Post by Avalanche »

thats pretty good, thx
now i can do my whole level in 3d modeller
Post Reply