在创建PhysX 3.2的PhysX SDK对象和PxScene对象的时候,我们会发现,跟PhysX 2.8时候相比,有一个多出来的参数特别醒目:
PX_INLINE physx::PxPhysics* PxCreatePhysics(
physx::PxU32 version,
physx::PxFoundation& foundation,
const physx::PxTolerancesScale& scale,
bool trackOutstandingAllocations = false,
physx::PxProfileZoneManager* profileZoneManager = NULL);
PX_INLINE PxSceneDesc::PxSceneDesc(const PxTolerancesScale& scale):
这个参数就是上面加粗的参数,PxTolerancesScale scale。这个参数干什么用的呢?
我们还是看看它的定义吧:
class PxTolerancesScale
{
public:
/** brief
The approximate size of objects in the simulation.
*/
PxReal length;
/** brief
The approximate mass of a length * length * length block.
*/
PxReal mass;
/** brief
The typical magnitude of velocities of objects in simulation. This is used to estimate
*/
PxReal spe