PxSimulationStatistics

Defined in include/PxSimulationStatistics.h

class PxSimulationStatistics

Class used to retrieve statistics for a simulation step.

Public Types

enum RbPairStatsType

Different types of rigid body collision pair statistics.

See also

getRbPairStats

Values:

enumerator eDISCRETE_CONTACT_PAIRS

Shape pairs processed as discrete contact pairs for the current simulation step.

enumerator eCCD_PAIRS

Shape pairs processed as swept integration pairs for the current simulation step.

Note

Counts the pairs for which special CCD (continuous collision detection) work was actually done and NOT the number of pairs which were configured for CCD. Furthermore, there can be multiple CCD passes and all processed pairs of all passes are summed up, hence the number can be larger than the amount of pairs which have been configured for CCD.

enumerator eMODIFIED_CONTACT_PAIRS

Shape pairs processed with user contact modification enabled for the current simulation step.

enumerator eTRIGGER_PAIRS

Trigger shape pairs processed for the current simulation step.

Public Functions

inline PxU32 getNbBroadPhaseAdds() const

Get number of broadphase volumes added for the current simulation step.

Returns

Number of broadphase volumes added.

inline PxU32 getNbBroadPhaseRemoves() const

Get number of broadphase volumes removed for the current simulation step.

Returns

Number of broadphase volumes removed.

inline PxU32 getRbPairStats(RbPairStatsType pairType, PxGeometryType::Enum g0, PxGeometryType::Enum g1) const

Get number of shape collision pairs of a certain type processed for the current simulation step.

There is an entry for each geometry pair type.

Note

entry[i][j] = entry[j][i], hence, if you want the sum of all pair types, you need to discard the symmetric entries

Parameters
  • pairType[in] The type of pair for which to get information

  • g0[in] The geometry type of one pair object

  • g1[in] The geometry type of the other pair object

Returns

Number of processed pairs of the specified geometry types.

inline PxSimulationStatistics()

Public Members

PxU32 nbActiveConstraints

Number of active PxConstraint objects (joints etc.) for the current simulation step.

PxU32 nbActiveDynamicBodies

Number of active dynamic bodies for the current simulation step.

Note

Does not include active kinematic bodies

PxU32 nbActiveKinematicBodies

Number of active kinematic bodies for the current simulation step.

Note

Kinematic deactivation occurs at the end of the frame after the last call to PxRigidDynamic::setKinematicTarget() was called so kinematics that are deactivated in a given frame will be included by this counter.

PxU32 nbStaticBodies

Number of static bodies for the current simulation step.

PxU32 nbDynamicBodies

Number of dynamic bodies for the current simulation step.

Note

Includes inactive bodies and articulation links

Note

Does not include kinematic bodies

PxU32 nbKinematicBodies

Number of kinematic bodies for the current simulation step.

Note

Includes inactive bodies

PxU32 nbShapes[PxGeometryType::eGEOMETRY_COUNT]

Number of shapes of each geometry type.

PxU32 nbAggregates

Number of aggregates in the scene.

PxU32 nbArticulations

Number of articulations in the scene.

PxU32 nbAxisSolverConstraints

The number of 1D axis constraints(joints+contact) present in the current simulation step.

PxU32 compressedContactSize

The size (in bytes) of the compressed contact stream in the current simulation step.

PxU32 requiredContactConstraintMemory

The total required size (in bytes) of the contact constraints in the current simulation step.

PxU32 peakConstraintMemory

The peak amount of memory (in bytes) that was allocated for constraints (this includes joints) in the current simulation step.

PxU32 nbDiscreteContactPairsTotal

Total number of (non CCD) pairs reaching narrow phase.

PxU32 nbDiscreteContactPairsWithCacheHits

Total number of (non CCD) pairs for which contacts are successfully cached (<=nbDiscreteContactPairsTotal)

Note

This includes pairs for which no contacts are generated, it still counts as a cache hit.

PxU32 nbDiscreteContactPairsWithContacts

Total number of (non CCD) pairs for which at least 1 contact was generated (<=nbDiscreteContactPairsTotal)

PxU32 nbNewPairs

Number of new pairs found by BP this frame.

PxU32 nbLostPairs

Number of lost pairs from BP this frame.

PxU32 nbNewTouches

Number of new touches found by NP this frame.

PxU32 nbLostTouches

Number of lost touches from NP this frame.

PxU32 nbPartitions

Number of partitions used by the solver this frame.

PxU64 gpuMemParticles

GPU device memory in bytes allocated for particle state accessible through API.

PxU64 gpuMemSoftBodies

GPU device memory in bytes allocated for FEM-based soft body state accessible through API.

PxU64 gpuMemFEMCloths

GPU device memory in bytes allocated for FEM-based cloth state accessible through API.

PxU64 gpuMemHairSystems

GPU device memory in bytes allocated for hairsystem state accessible through API.

PxU64 gpuMemHeap

GPU device memory in bytes allocated for internal heap allocation.

PxU64 gpuMemHeapBroadPhase

GPU device heap memory used for broad phase in bytes.

PxU64 gpuMemHeapNarrowPhase

GPU device heap memory used for narrow phase in bytes.

PxU64 gpuMemHeapSolver

GPU device heap memory used for solver in bytes.

PxU64 gpuMemHeapArticulation

GPU device heap memory used for articulations in bytes.

PxU64 gpuMemHeapSimulation

GPU device heap memory used for simulation pipeline in bytes.

PxU64 gpuMemHeapSimulationArticulation

GPU device heap memory used for articulations in the simulation pipeline in bytes.

PxU64 gpuMemHeapSimulationParticles

GPU device heap memory used for particles in the simulation pipeline in bytes.

PxU64 gpuMemHeapSimulationSoftBody

GPU device heap memory used for soft bodies in the simulation pipeline in bytes.

PxU64 gpuMemHeapSimulationFEMCloth

GPU device heap memory used for FEM-cloth in the simulation pipeline in bytes.

PxU64 gpuMemHeapSimulationHairSystem

GPU device heap memory used for hairsystem in the simulation pipeline in bytes.

PxU64 gpuMemHeapParticles

GPU device heap memory used for shared buffers in the particles pipeline in bytes.

PxU64 gpuMemHeapSoftBodies

GPU device heap memory used for shared buffers in the FEM-based soft body pipeline in bytes.

PxU64 gpuMemHeapFEMCloths

GPU device heap memory used for shared buffers in the FEM-based cloth pipeline in bytes.

PxU64 gpuMemHeapHairSystems

GPU device heap memory used for shared buffers in the hairsystem pipeline in bytes.

PxU64 gpuMemHeapOther

GPU device heap memory not covered by other stats in bytes.

PxGpuDynamicsMemoryConfigStatistics gpuDynamicsMemoryConfigStatistics

Structure containing statistics about actual count/sizes used for the configuration parameters in PxGpuDynamicsMemoryConfig.

PxU32 nbBroadPhaseAdds
PxU32 nbBroadPhaseRemoves
PxU32 nbDiscreteContactPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]
PxU32 nbCCDPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]
PxU32 nbModifiedContactPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]
PxU32 nbTriggerPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]