Multiple objects with same mesh but different translation

Hi,



I have an object as a Node (loaded wavefront obj). I would like to have multiple duplicates of the object in the scene. That is, objects have the same mesh but different translation.



Can I somehow share the mesh between objects for optimization purposes? Should I do it? Or should I just load and insert the objects separately to the scene and rely that JME optimizes the situation automatically?



Thanks

Try com.jme.scene.SharedMesh or com.jme.scene.SharedNode. You can specify the "original" Mesh or Node in the constructor.


TriMesh originalMesh;
SharedMesh sMesh=new SharedMesh("mysharedmesh",originalMesh);


Cheers,
Normen

Hi,



SharedNode seems to be exactly what I am looking for.



Thanks!