zillenjack
17-05-2009 12:12:29
I am try to use the ManualMesh to create the TriangleGeometry
Here is my code:
Run to the last line show error "mScene->createSceneGeometry...."
How the case?
Thank you!
Here is my code:
NxOgre::ManualMesh* mesh = new NxOgre::ManualMesh();
mesh->begin(NxOgre::Enums::MeshType::MeshType_Triangle,3,1);
mesh->vertex(NxOgre::Real3(0,0,0));
mesh->vertex(NxOgre::Real3(100,0,0));
mesh->vertex(NxOgre::Real3(0,0,100));
mesh->triangle(0,1,2);
NxOgre::Mesh* mm = mesh->end();
NxOgre::TriangleGeometry* tri = new NxOgre::TriangleGeometry(mm);
NxOgre::Shapes pShapes;
pShapes.insert(tri);
mScene->createSceneGeometry(pShapes, NxOgre::Matrix44(NxOgre::Matrix44::IDENTITY));
Run to the last line show error "mScene->createSceneGeometry...."
How the case?
Thank you!