Retrieving meshes/entities from sceneloader?


27-09-2009 19:27:51


If I have a model with several meshes and want to animate each mesh individually, wouldn't it be logical to load the model as a scene and then access each mesh through the scene? I am currently using the dotsceneloader, but I can't seem to find a way to access each individual mesh.

Loading each mesh individually as an entity would be kind of bulky, right?

Anyone who has some experience with animating models containing several meshes?


I just found out I can use submeshes of the main mesh.. So I can load several meshes as submeshes of the Entity and access them that way, I believe that would be the best alternative to a scene.


Also found out that *.scene file is XML, so I could just parse the file and manually load the meshes and put them in a separate class, but I think I will go with the submesh solution.


Turns out if I get the subentities from the mainentity I can not get their position as their node would be their parent node. I ended up giving my "Unit" class an Entity while my "Map" class has a sceneloader. Might not be the best solution, but it works.