Migrating From PhysX SDK 5.4 to 5.5
This guide highlights all significant parts of the API that have changed in the last release. An application with a working integration of the older version of PhysX should be able to easily migrate to the newer version by following these pointers.
Deformable Volumes
The API for the deformable feature has been reworked. Generally a “Soft Body” is now refered to as “Deformable Volume”. A new “Deformable Surface” feature has been added for the simulation of cloth, shells or sheats. The new actor type hierarchy looks like this:
PxActor
PxRigidActor
PxRigidStatic
PxRigidBody
PxRigidDynamic
PxArticulationLink
PxDeformableBody
PxDeformableSurface
PxDeformableVolume
Here is a list of APIs that have been deprecated and should be replaced.
PxSoftBody, use PxDeformableVolume instead
PxSoftBodyFlag and PxSoftBodyFlags, use PxDeformableVolumeFlag and PxDeformableVolumeFlags instead
PxSoftBodyDataFlag and PxSoftBodyDataFlags, use PxDeformableVolumeDataFlag and PxDeformableVolumeDataFlags instead
PxFEMSoftBodyMaterial, use PxDeformableVolumeMaterial instead
PxSoftBodyMesh, use PxDeformableVolumeMesh instead
PxSoftBodyAuxData, use PxDeformableVolumeAuxData instead
PxFEMMaterial, use PxDeformableMaterial instead.
PxFEMParameters::velocityDamping, use PxDeformableBody::setLinearDamping instead
PxFEMParameters::settlingThreshold, use PxDeformableBody::setSettlingThreshold instead
PxFEMParameters::sleepThreshold, use PxDeformableBody::setSleepThreshold instead
PxFEMParameters::sleepDamping, use PxDeformableBody::setSettlingDamping instead
PxFEMParameters::selfCollisionFilterDistance, use PxDeformableBody::setSelfCollisionFilterDistance instead
PxFEMParameters::selfCollisionStressTolerance, use PxDeformableVolume::setSelfCollisionStressTolerance instead
PxSoftBodyFlag::eDISABLE_SELF_COLLISION, use PxDeformableBodyFlag::eDISABLE_SELF_COLLISION instead
PxSoftBodyFlag::eENABLE_CCD, use PxDeformableBodyFlag::eENABLE_SPECULATIVE_CCD instead
PxSoftBodyFlag::eKINEMATIC, use PxDeformableBodyFlag::eKINEMATIC instead
PxSoftBody::setKinematicTargetBufferD(const PxVec4* positions, PxDeformableVolumeFlags flags), use setKinematicTargetBufferD(const PxVec4* positions) instead. Note that the kinematic flags of the deformable volume (PxDeformableBodyFlag::eKINEMATIC and PxDeformableVolumeFlag::ePARTIALLY_KINEMATIC) are not raised or cleared automatically, but instead have to be set by the application via PxDeformableVolume::setDeformableVolumeFlag and PxDeformableBody::setDeformableBodyFlag.
PxSoftBodyExt, use PxDeformableVolumeExt instead.
PxPhysics::createSoftBody(), use createDeformableVolume() instead.
PxPhysics::createFEMSoftBodyMaterial(), use createDeformableVolumeMaterial() instead.
PxPhysics::getNbFEMSoftBodyMaterials(), use getNbDeformableVolumeMaterials() instead.
PxPhysics::getFEMSoftBodyMaterials(), use getDeformableVolumeMaterials() instead.
PxScene::getNbSoftBodies(), use getNbDeformableVolumes() instead.
PxScene::getSoftBodies(), use getDeformableVolumes() instead.
DampingScale (get and set) in PxDeformableMaterial, adjust the elasticity damping to get a similar effect
Damping (get and set) in PxDeformableMaterial, use ElasticityDamping instead.
The classes have been renamed and replaced with typedefs for backwards compatibility. Note that sometimes compile errors can occur in application code due to forward class definitions. Redundant class definitions should be removed. Either the code needs to be completely upgraded, including APIs and include files, or the forward class definitions need to be replaced by typedefs. E.g.:
namespace physx { class PxSoftBody; }
to
namespace physx { typedef PxDeformableVolume PxSoftBody; }
The following APIs have been removed completely
PxFEMMaterialTableIndex has been replaced with PxDeformableMaterialTableIndex
PxDeformableVolumeExt::commit has been removed. Please use PxDeformableVolumeExt::copyToDevice instead.