Nxogre triangleMesh Problem

vickyZMen

13-10-2010 21:47:13

Hi, I have a problem with the scenegeometry, I've created a triangleMesh with scencegeometry
and i need to put it in the same position where is its entity.
The problem is that the entity's position depends of the nodoMesa's position which is a father node and a vector3( 11.8, -8.8, 0) so I don't know how to put this same position in createSceneGeometry.

i tried putting the same position vector as the entity has but it didn't work I think that is because the scencegeometry's position is taken from the SceneManager so I don't know what to do!! :(
Here I show you the code, if some could help me I'd appreciate it.


Entity *Abdomen = mSceneMgr->createEntity("Abdomen", "abdomen.mesh");
Abdomen ->setMaterialName("MatAbdomen");
SceneNode *nodoAbdomen = nodoMesa->createChildSceneNode(Vector3( 11.8, -8.8, 0));
nodoAbdomen->attachObject(Abdomen);
nodoAbdomen->roll( Degree(90));

NxOgre::ResourceSystem::getSingleton()->openArchive("media", "file:C:/OgreSDK/media");
NxOgre::Mesh* triangleMesh = NxOgre::MeshManager::getSingleton()->load("media:abdomen.nxs");

NxOgre::TriangleGeometry* triangleGeometry = new NxOgre::TriangleGeometry(triangleMesh);
mScene->createSceneGeometry(triangleGeometry, NxOgre::Matrix44(Vector3( 11.8, -8.8, 0)));

vickyZMen

15-10-2010 16:57:02

Please!! Someone could help me with this???? I'm really confused!! :(