tsky
15-05-2007 22:02:32
Hi,
i want to know if this new way is correct to create a shape :
It compiles but if it works...
At this moment i couldn´t try it because of the next question:
Is the NxOgre::Scene::findBody() method deleted intentional ?
tom
i want to know if this new way is correct to create a shape :
// create material
Ogre::String strMatName = Ogre::String("mat_" + strName);
NxOgre::Material *pMaterial = new NxOgre::Material(strMatName, m_pNxOgreSceneRef);
pMaterial->setAll(fElasticity, fDynamicFriction, fStaticFriction);
// set pose
NxOgre::ShapeParams pShapeParam;
pShapeParam.mOrientation = shapePoseParent.getQuat();
pShapeParam.mMaterial = strMatName;
// create shape
NxOgre::CubeShape *pCubeShape = new NxOgre::CubeShape(width, height, length, pShapeParam);
if (pCubeShape != NULL) {
if (fMass > 0) {
pCubeShape->mShapeDescription.mass = fMass;
}
}
It compiles but if it works...
At this moment i couldn´t try it because of the next question:
Is the NxOgre::Scene::findBody() method deleted intentional ?
tom