RavEngine
Loading...
Searching...
No Matches
physx::PxSimulationStatistics Class Reference

Class used to retrieve statistics for a simulation step. More...

#include <PxSimulationStatistics.h>

Public Types

enum  RbPairStatsType { eDISCRETE_CONTACT_PAIRS , eCCD_PAIRS , eMODIFIED_CONTACT_PAIRS , eTRIGGER_PAIRS }
 Different types of rigid body collision pair statistics. More...
 

Public Member Functions

PX_FORCE_INLINE PxU32 getNbBroadPhaseAdds () const
 Get number of broadphase volumes added for the current simulation step.
 
PX_FORCE_INLINE PxU32 getNbBroadPhaseRemoves () const
 Get number of broadphase volumes removed for the current simulation step.
 
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.
 

Public Attributes

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.
 
PxU32 nbActiveKinematicBodies
 Number of active kinematic bodies for the current simulation step.
 
PxU32 nbStaticBodies
 Number of static bodies for the current simulation step.
 
PxU32 nbDynamicBodies
 Number of dynamic bodies for the current simulation step.
 
PxU32 nbKinematicBodies
 Number of kinematic bodies for the current simulation step.
 
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)
 
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.
 
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]
 

Detailed Description

Class used to retrieve statistics for a simulation step.

See also
PxScene::getSimulationStatistics()

Member Enumeration Documentation

◆ RbPairStatsType

Different types of rigid body collision pair statistics.

See also
getRbPairStats
Enumerator
eDISCRETE_CONTACT_PAIRS 

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

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.
See also
PxPairFlag::eDETECT_CCD_CONTACT,
eMODIFIED_CONTACT_PAIRS 

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

See also
PxContactModifyCallback
eTRIGGER_PAIRS 

Trigger shape pairs processed for the current simulation step.

See also
PxShapeFlag::eTRIGGER_SHAPE

Member Function Documentation

◆ getNbBroadPhaseAdds()

PX_FORCE_INLINE PxU32 physx::PxSimulationStatistics::getNbBroadPhaseAdds ( ) const
inline

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

Returns
Number of broadphase volumes added.

◆ getNbBroadPhaseRemoves()

PX_FORCE_INLINE PxU32 physx::PxSimulationStatistics::getNbBroadPhaseRemoves ( ) const
inline

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

Returns
Number of broadphase volumes removed.

◆ getRbPairStats()

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

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
[in]pairTypeThe type of pair for which to get information
[in]g0The geometry type of one pair object
[in]g1The geometry type of the other pair object
Returns
Number of processed pairs of the specified geometry types.

Member Data Documentation

◆ nbActiveDynamicBodies

PxU32 physx::PxSimulationStatistics::nbActiveDynamicBodies

Number of active dynamic bodies for the current simulation step.

Note
Does not include active kinematic bodies

◆ nbActiveKinematicBodies

PxU32 physx::PxSimulationStatistics::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.

◆ nbDiscreteContactPairsWithCacheHits

PxU32 physx::PxSimulationStatistics::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.

◆ nbDynamicBodies

PxU32 physx::PxSimulationStatistics::nbDynamicBodies

Number of dynamic bodies for the current simulation step.

Note
Includes inactive bodies and articulation links
Does not include kinematic bodies

◆ nbKinematicBodies

PxU32 physx::PxSimulationStatistics::nbKinematicBodies

Number of kinematic bodies for the current simulation step.

Note
Includes inactive bodies

The documentation for this class was generated from the following file: