razi
14-04-2011 17:55:47
Hi, in my application u want to use meshes to create the physical bodies in runtime. I found this code and it compiles but throws error at cook(). What is wrong with the code, it seems fine to me? I use Detritus and Ogre 1.7.1.
Thank you.
Ogre::Entity* myEnt = mSceneMgr->createEntity("myEntity", "cube.mesh");
Ogre::MeshPtr mPtr = myEnt->getMesh();
NxOgre::MeshData* mesh_data = Critter::MeshFunctions::read(mPtr);
mesh_data->mType = NxOgre::Enums::MeshType_Convex;
mesh_data->cook("file://my_mesh.nxs");
delete mesh_data;
Thank you.