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

Public Attributes

PxU32 nbActiveConstraints
 Number of active PxConstraint objects (joints etc.) for the current simulation step. More...
 
PxU32 nbActiveDynamicBodies
 Number of active dynamic bodies for the current simulation step. More...
 
PxU32 nbActiveKinematicBodies
 Number of active kinematic bodies for the current simulation step. More...
 
PxU32 nbStaticBodies
 Number of static bodies for the current simulation step. More...
 
PxU32 nbDynamicBodies
 Number of dynamic bodies for the current simulation step. More...
 
PxU32 nbShapes [PxGeometryType::eGEOMETRY_COUNT]
 Number of shapes of each geometry type. More...
 
PxU32 nbAggregates
 Number of aggregates in the scene. More...
 
PxU32 nbArticulations
 Number of articulations in the scene. More...
 
PxU32 nbAxisSolverConstraints
 The number of 1D axis constraints(joints+contact) present in the current simulation step. More...
 
PxU32 compressedContactSize
 The size (in bytes) of the compressed contact stream in the current simulation step. More...
 
PxU32 requiredContactConstraintMemory
 The total required size (in bytes) of the contact constraints in the current simulation step. More...
 
PxU32 peakConstraintMemory
 The peak amount of memory (in bytes) that was allocated for constraints (this includes joints) in the current simulation step. More...
 
PxU32 nbDiscreteContactPairsTotal
 Total number of (non CCD) pairs reaching narrow phase. More...
 
PxU32 nbDiscreteContactPairsWithCacheHits
 Total number of (non CCD) pairs for which contacts are successfully cached (<=nbDiscreteContactPairsTotal) More...
 
PxU32 nbDiscreteContactPairsWithContacts
 Total number of (non CCD) pairs for which at least 1 contact was generated (<=nbDiscreteContactPairsTotal) More...
 
PxU32 nbNewPairs
 Number of new pairs found by BP this frame. More...
 
PxU32 nbLostPairs
 Number of lost pairs from BP this frame. More...
 
PxU32 nbNewTouches
 Number of new touches found by NP this frame. More...
 
PxU32 nbLostTouches
 Number of lost touches from NP this frame. More...
 
PxU32 nbPartitions
 Number of partitions used by the solver this frame. More...
 
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

Constructor & Destructor Documentation

◆ PxSimulationStatistics()

PxSimulationStatistics::PxSimulationStatistics ( )
inline

Member Function Documentation

◆ getNbBroadPhaseAdds()

PX_FORCE_INLINE PxU32 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 PxSimulationStatistics::getNbBroadPhaseRemoves ( ) const
inline

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

Returns
Number of broadphase volumes removed.

◆ getRbPairStats()

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

References PxGeometryType::eGEOMETRY_COUNT, PX_ASSERT, and PX_ASSERT_WITH_MESSAGE.

Member Data Documentation

◆ compressedContactSize

PxU32 PxSimulationStatistics::compressedContactSize

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

◆ nbActiveConstraints

PxU32 PxSimulationStatistics::nbActiveConstraints

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

◆ nbActiveDynamicBodies

PxU32 PxSimulationStatistics::nbActiveDynamicBodies

Number of active dynamic bodies for the current simulation step.

Note
Does not include active kinematic bodies

◆ nbActiveKinematicBodies

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

◆ nbAggregates

PxU32 PxSimulationStatistics::nbAggregates

Number of aggregates in the scene.

◆ nbArticulations

PxU32 PxSimulationStatistics::nbArticulations

Number of articulations in the scene.

◆ nbAxisSolverConstraints

PxU32 PxSimulationStatistics::nbAxisSolverConstraints

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

◆ nbBroadPhaseAdds

PxU32 PxSimulationStatistics::nbBroadPhaseAdds

◆ nbBroadPhaseRemoves

PxU32 PxSimulationStatistics::nbBroadPhaseRemoves

◆ nbCCDPairs

◆ nbDiscreteContactPairs

PxU32 PxSimulationStatistics::nbDiscreteContactPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]

◆ nbDiscreteContactPairsTotal

PxU32 PxSimulationStatistics::nbDiscreteContactPairsTotal

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

◆ nbDiscreteContactPairsWithCacheHits

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

◆ nbDiscreteContactPairsWithContacts

PxU32 PxSimulationStatistics::nbDiscreteContactPairsWithContacts

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

◆ nbDynamicBodies

PxU32 PxSimulationStatistics::nbDynamicBodies

Number of dynamic bodies for the current simulation step.

Note
Includes inactive and kinematic bodies, and articulation links

◆ nbLostPairs

PxU32 PxSimulationStatistics::nbLostPairs

Number of lost pairs from BP this frame.

◆ nbLostTouches

PxU32 PxSimulationStatistics::nbLostTouches

Number of lost touches from NP this frame.

◆ nbModifiedContactPairs

PxU32 PxSimulationStatistics::nbModifiedContactPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]

◆ nbNewPairs

PxU32 PxSimulationStatistics::nbNewPairs

Number of new pairs found by BP this frame.

◆ nbNewTouches

PxU32 PxSimulationStatistics::nbNewTouches

Number of new touches found by NP this frame.

◆ nbPartitions

PxU32 PxSimulationStatistics::nbPartitions

Number of partitions used by the solver this frame.

◆ nbShapes

PxU32 PxSimulationStatistics::nbShapes[PxGeometryType::eGEOMETRY_COUNT]

Number of shapes of each geometry type.

◆ nbStaticBodies

PxU32 PxSimulationStatistics::nbStaticBodies

Number of static bodies for the current simulation step.

◆ nbTriggerPairs

PxU32 PxSimulationStatistics::nbTriggerPairs[PxGeometryType::eGEOMETRY_COUNT][PxGeometryType::eGEOMETRY_COUNT]

◆ peakConstraintMemory

PxU32 PxSimulationStatistics::peakConstraintMemory

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

◆ requiredContactConstraintMemory

PxU32 PxSimulationStatistics::requiredContactConstraintMemory

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


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