How to create IMesh from MeshBuffer?
I want to get 2 or more MeshBuffers from 1 .xfile.
I want to use one MeshBuffer for the collision.
and, another one MeshBuffer for draw.
but , AddOctTreeSceneNode needs IMesh.
so, I want to create IMesh from MeshBuffer.
what should i do?
How to create IMesh from MeshBuffer?
Uh...moriwo wrote:How to create IMesh from MeshBuffer?
Code: Select all
scene::SMesh* mesh = new SMesh;
mesh->addMeshBuffer (meshBuffer);
meshBuffer->drop ();
// now you have a mesh...
You should be able to disassemble the animated mesh pretty easily. Once you've done that you just need to figure out which mesh buffers represent the collision data, and which represent the visuals. It might actually be simpler to save the collision mesh as a seperate file which you can load independently from the original mesh.moriwo wrote:I want to get 2 or more MeshBuffers from 1 .xfile.
Travis
-
- Posts: 17
- Joined: Tue Sep 26, 2006 8:01 am
You should be able to disassemble the animated mesh...
hello.
this sentence caught my attention:
"You should be able to disassemble the animated mesh pretty easily."
can u plz post some example code on how can this be achieved?
many thx in advance.
this sentence caught my attention:
"You should be able to disassemble the animated mesh pretty easily."
can u plz post some example code on how can this be achieved?
many thx in advance.
Sorry about my bad english.thanks.