octree from meshes in .irr files

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
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

octree from meshes in .irr files

Post by floppyfreak »

how can use addOctTreeSceneNode for meshes being part of an .irr file.

i tried

// IMeshCache* mMeshCache=irrSceneMgr->getMeshCache();
// int NumMeshes=mMeshCache->getMeshCount();
// scene::ISceneNode* node = 0;
// for (int i=0;i<NumMeshes;i++){
// IAnimatedMesh*MyMesh=mMeshCache->getMeshByIndex(i);
// node = irrSceneMgr->addOctTreeSceneNode(MyMesh, 0, -1, 128);
// }

now the mesh gets reloaded, correctly with the octree, but i have two copies. the octree copy seems to be much smaller (maybe because of scaling in blender)

this didn' take the first copy (originating from the irr- file) away.
// mMeshCache->removeMesh(MyMesh);


is createOctTreeTriangleSelector used for this?
limvot
Posts: 20
Joined: Sun Sep 09, 2007 2:41 am

Post by limvot »

is createOctTreeTriangleSelector used for this?
OctTreeTriangleSelector is used for slecting triangles in a OctTree, mainly for collision detection.
For the secound part though, i can't help you. I'm a noob too.
Hi me noob so help me.
Post Reply