disney
10-05-2009 15:31:32
Hello! CABAListic
Recently , I try to use OgreNewt in ETL,
in oder to doing physical calculate, OgreNewt need the get the point of SceneNode which associate with the terrain mesh
Generally ,Ogrenewt take such way -----
.....
floor = mSceneMgr->createEntity("Floor", "simple_terrain.mesh" );
floornode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "FloorNode" );
floornode->attachObject( floor );
floor->setMaterialName( "Simple/BeachStones" );
OgreNewt::Collision* col = new OgreNewt::CollisionPrimitives::TreeCollision( m_World, floornode, false );
......
the other way
......
TreeCollision( const World* world, int numVertices, Ogre::Vector3* vertices, Ogre::IndexData* indexData, bool optimize, FaceWinding fw = FW_DEFAULT);
/*!
\param world pointer to OgreNewt::World
\param numVertices number of vertices in the array.
\param vertices pointer to array of Ogre::Vector3 vertices (positions only)
\param indexData pointer to Ogre::IndexData for the mesh
\param optimize bool whether you want to optimize the collision or not.
*/
how to get the ScenNode of ETL terrain' mesh or indexData of ETL terrain' mesh
Can you show me the code here?
Recently , I try to use OgreNewt in ETL,
in oder to doing physical calculate, OgreNewt need the get the point of SceneNode which associate with the terrain mesh
Generally ,Ogrenewt take such way -----
.....
floor = mSceneMgr->createEntity("Floor", "simple_terrain.mesh" );
floornode = mSceneMgr->getRootSceneNode()->createChildSceneNode( "FloorNode" );
floornode->attachObject( floor );
floor->setMaterialName( "Simple/BeachStones" );
OgreNewt::Collision* col = new OgreNewt::CollisionPrimitives::TreeCollision( m_World, floornode, false );
......
the other way
......
TreeCollision( const World* world, int numVertices, Ogre::Vector3* vertices, Ogre::IndexData* indexData, bool optimize, FaceWinding fw = FW_DEFAULT);
/*!
\param world pointer to OgreNewt::World
\param numVertices number of vertices in the array.
\param vertices pointer to array of Ogre::Vector3 vertices (positions only)
\param indexData pointer to Ogre::IndexData for the mesh
\param optimize bool whether you want to optimize the collision or not.
*/
how to get the ScenNode of ETL terrain' mesh or indexData of ETL terrain' mesh
Can you show me the code here?