jettero heller
15-02-2009 14:37:14
Hi everybody.
I would like to know how to get the mesh (convex or triangle) ResourceIdentifier.
I'm writing a scene serializer and I need to save the ResourceIdentifier but I am not able to get it from the shape or from the resource system.
Any idea?
thank you for your attention and sorry for my poor english
--
jet
betajaen
15-02-2009 15:05:09
It isn't copied into the mesh or shape as it's a path. Your best bet is to get the name of the mesh (which would probably be the filename) and work from there.
jettero heller
15-02-2009 15:32:58
It isn't copied into the mesh or shape as it's a path. Your best bet is to get the name of the mesh (which would probably be the filename) and work from there.
thanks for your answer betajaen but I don't know how to get the mesh name.
looking at the NxOgre API I cannot find any method to use.
Convex::mMesh is protected, I can't access it and there isn't a function that returns it.
The Mesh class doesn't contain its name, the mesh identifier is used as key in ResourceSystem::mMeshes (protected).
jettero heller
15-02-2009 18:14:31
I modified the NxOgre source code.
- added attribute Mesh::mMeshName with getter and setter functions
- added functions Convex::getMesh() and TriangleMesh::getMesh()
Is there a way to achieve the same result without changing the library?
--
jet