addOctTreeSceneNode

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

addOctTreeSceneNode

Post by etcaptor »

There are two methods addOctTreeSceneNode :

Code: Select all

virtual ISceneNode *  addOctTreeSceneNode (IAnimatedMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=128)=0 

virtual ISceneNode *  addOctTreeSceneNode (IMesh *mesh, ISceneNode *parent=0, s32 id=-1, s32 minimalPolysPerNode=128)=0 
My question is - what is advantage of using the method with IAnimatedMesh besides generating for many SceneNodes from animated mesh?

In boot cases methods returns ISceneNode * pointer /not IAnimatedMeshSceneNode * pointer for first method/

How can I use advantage of using of IAnimatedMesh instead IMesh?
Some example? Thanks in advance and maybe this is post for beginners forum, but i'm not sure.
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

I haven't looked in the engine code yet (though now you've got me curious so I may) so I"m not positive here, but I think there's probably no difference. I don't believe an animated emsh can be an octree unless each keyframe frame is made into its own octree (tremendous memory aggg) which would probably not be practical. Rebuilding an octree in real time every frame is not possible. I don't think there is any way you can use an animated mesh. The fact that the engine allows you to pass one as a parameter is odd, however , so it's possibel I'm wrong.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
rincewind
Posts: 35
Joined: Thu Mar 25, 2004 5:28 pm
Location: Germany --> Bonn

Post by rincewind »

I'd guess it's because IAnimatedMesh does not inherit from IMesh, so with two functions it's possible to create an octtree from both IMesh and IAnimatedMesh.
Post Reply