mephisto
10-09-2011 15:24:57
Hello, today I am decided to add few things to NxOgre:
-all joints
-add getContact func. to NxOgre::Wheel. The PhysX analog is NxWheel::getContact( NxWheelContactData& ). This function return NxShape* when contact and NULL in other cases. I have added in PrototypeFunctions::WheelContactDataToNxWheelContactData. So the body of NxOgre::Wheel::getContact is :
createDirtyShape takes RigidBody* as 2nd parameter but in the function body its not used.
createNull takes bool as 2nd parameter in the declaration but only one parameter in the definition.
bellow is the code:
-all joints
-add getContact func. to NxOgre::Wheel. The PhysX analog is NxWheel::getContact( NxWheelContactData& ). This function return NxShape* when contact and NULL in other cases. I have added in PrototypeFunctions::WheelContactDataToNxWheelContactData. So the body of NxOgre::Wheel::getContact is :
Shape* Wheel::getContact(WheelContactData& dest) const
{
NxWheelDesc data;
NxShape* shape;
Functions::PrototypeFunctions::WheelContactDataToNxWheelContactData(dest, data);
shape = mWheelShape->getContact(data);
if(shape)
return Functions::ShapeFunctions::createDirtyShape(shape, NULL); // ambiguous
else
return Functions::ShapeFunctions::createNull(shape); // ambiguous
}
createDirtyShape takes RigidBody* as 2nd parameter but in the function body its not used.
createNull takes bool as 2nd parameter in the declaration but only one parameter in the definition.
bellow is the code:
FILE : "NxOgreShapeFunctions.h"
inline Shape* createNull(NxShape*);
FILE : "NxOgreShapeFunctions.cpp"
Shape* createNull(NxShape* shape, bool)
{
return 0;
}
Shape* createDirtyShape(NxShape* physx_shape, RigidBody* rigid_body)
{
Shape* shape = mFunctions[int(physx_shape->getType())] (physx_shape, true);
shape->setId(-1);
return shape;
}