Question on Dynamicly Generating Meshes

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
jeffm2501
Posts: 9
Joined: Sat Sep 23, 2006 4:07 pm
Location: California, US
Contact:

Question on Dynamicly Generating Meshes

Post by jeffm2501 »

I'd like to ask this question about dynamically generating meshes, just to make sure I'm on the right track, before I get in too deep. I've searched the fourms and hit the tutorials, but I don't think any of them get into this.

I have the need of generating animated meshes from our own internal data structures, not from an external file.

As I see it to do this I need to grab the IMeshCache from the SceneManager, allocate up myself a new IAnimatedMesh, set it up just like one of the file loaders would. Then have the MeshCache add it with a unique "file" name, then I can add it to the scene as normal.

Is the the correct way of going about this?
will the MeshCache copy my mesh? or do I have to keep that sucker around till I remove it?

Would a better way be to add a mesh loader that only takes data from a structure?

Thanks for any help/advice anyone may have.
JeffM2501
Post Reply