Migrating From PhysX SDK 5.3 to 5.4

  • 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.

Simulation

  • PxMaterialFlag::eCOMPLIANT_CONTACT has been deprecated. Remove any usage of it as it will not be used by the simulation. Compliant contact behavior is now active whenever a negative restitution value is set.

  • PxCudaContextManager::allocDeviceBuffer, PxCudaContextManager::freeDeviceBuffer, PxCudaContextManager::allocPinnedHostBuffer, PxCudaContextManager::freePinnedHostBuffer, PxCudaContextManager::clearDeviceBufferAsync, PxCudaContextManager::copyDtoH, PxCudaContextManager::copyHtoD, PxCudaContextManager::copyDToHAsync, PxCudaContextManager::copyHtoDAsync, PxCudaContextManager::copyDtoDAsync, PxCudaContextManager::memsetAsync and the macros using them have been deprecated. The replacement is to either use the direct functions in PxCudaContext, or the helpers provided in PxCudaHelpersExt.h as part of PhysXExtensions.

Particle

  • PxFLIPParticleSystem, PxFLIPMaterial, PxMPMParticleSystem, PxMPMMaterial: experimental features have been removed.

  • PxParticleSystem: deprecated and re-routed to PxPBDParticleSystem using ‘typedef’

  • PxParticleMaterial: deprecated and re-routed to PxPBDMaterial using ‘typedef’

  • PxParticleSolverType: deprecated, and PxParticleSolverType::eMPM and PxParticleSolverType::eFLIP have been removed.

  • PxScene::getNbParticleSystems, PxScene::getParticleSystems: deprecated, use PxScene::getNbPBDParticleSystems, PxScene::getPBDParticleSystems instead.

  • PxParticleSystem::enableCCD(): deprecated use PxParticleFlag::eENABLE_SPECULATIVE_CCD instead.

  • PxParticleBuffer::bufferUniqueId: deprecated, use PxParticleBuffer::getUniqueId() instead.

  • PxParticleBuffer::bufferIndex, PxParticleBuffer::setInternalData(), PxParticleBuffer::onParticleSystemDestroy(): have been removed. They are not needed outside of the SDK.

Direct-GPU API

The existing batched direct-GPU API has been revised and moved from PxScene to PxDirectGPUAPI. Both function signatures and data layouts have been changed in many cases. There is detailed inline documentation in the header that explains the parameters and data layouts. All the respective functions in PxScene are deprecated and will be removed in a future release.

  • PxScene::applyActorData is now PxDirectGPUAPI::setRigidDynamicData. The data types have been separated, and the indirect indexing has been removed.

  • PxScene::copyBodyData is now PxDirectGPUAPI::getRigidDynamicData. The PxGpuBodyData struct has been split up to allow direct access to the individual members, and the indirect indexing has been removed.

  • PxScene::copyArticulationData is now PxDirectGPUAPI::getArticulationData. The main change here is that the indexing into the data array is not according to the GPU index anymore, but made parallel: the articulation with its GPU index at position x in the index array will have the data at position x in the data array.

  • PxScene::applyArticulationData is now PxDirectGPUAPI::setArticulationData. The same data layout change as for getArticulationData applies here as well.

  • PxScene::updateArticulationsKinematic, PxScene::computeDenseJacobians, PxScene::computeGeneralizedMassMatrices, PxScene::computeGeneralizedGravityForces and PxScene::computeCoriolisAndCentrifugalForces have been combined into PxDirectGPUAPI::computeArticulationData.

  • PxScene::evaluateSDFDistances is now PxDirectGPUAPI::evaluateSDFDistances. There are changes to the order of the function parameters and their types.

  • PxScene::copyContactData is now PxDirectGPUAPI::copyContactData. There are changes to the order of the function parameters and their types.

  • PxScene::applySoftBodyData and PxScene::copySoftBodyData are deprecated and will have no replacement.

  • PxScene::applyParticleBufferData is deprecated and will have no replacement. The data is now exposed in PxParticleBuffer.