PxContactPairExtraDataIterator Struct Reference

A class to iterate over a contact pair extra data stream. More...

#include <PxSimulationEventCallback.h>

Collaboration diagram for PxContactPairExtraDataIterator:

Public Member Functions

PX_FORCE_INLINE PxContactPairExtraDataIterator (const PxU8 *stream, PxU32 size)
 Constructor. More...
 
PX_INLINE bool nextItemSet ()
 Advances the iterator to next set of extra data items. More...
 

Public Attributes

const PxU8 * currPtr
 Current pointer in the stream. More...
 
const PxU8 * endPtr
 Pointer to the end of the stream. More...
 
const PxContactPairVelocitypreSolverVelocity
 Pointer to the current pre solver velocity item in the stream. NULL if there is none. More...
 
const PxContactPairVelocitypostSolverVelocity
 Pointer to the current post solver velocity item in the stream. NULL if there is none. More...
 
const PxContactPairPoseeventPose
 Pointer to the current contact event pose item in the stream. NULL if there is none. More...
 
PxU32 contactPairIndex
 The contact pair index of the current item set in the stream. More...
 

Private Member Functions

PX_FORCE_INLINE void clearDataPtrs ()
 Internal helper. More...
 

Detailed Description

A class to iterate over a contact pair extra data stream.

See also
PxContactPairHeader.extraDataStream

Constructor & Destructor Documentation

◆ PxContactPairExtraDataIterator()

PX_FORCE_INLINE PxContactPairExtraDataIterator::PxContactPairExtraDataIterator ( const PxU8 *  stream,
PxU32  size 
)
inline

Constructor.

Parameters
[in]streamPointer to the start of the stream.
[in]sizeSize of the stream in bytes.

Member Function Documentation

◆ clearDataPtrs()

PX_FORCE_INLINE void PxContactPairExtraDataIterator::clearDataPtrs ( )
inlineprivate

Internal helper.

◆ nextItemSet()

PX_INLINE bool PxContactPairExtraDataIterator::nextItemSet ( )
inline

Advances the iterator to next set of extra data items.

The contact pair extra data stream contains sets of items as requested by the corresponding PxPairFlag flags PxPairFlag::ePRE_SOLVER_VELOCITY, PxPairFlag::ePOST_SOLVER_VELOCITY, PxPairFlag::eCONTACT_EVENT_POSE. A set can contain one item of each plus the PxContactPairIndex item. This method parses the stream and points the iterator member variables to the corresponding items of the current set, if they are available. If CCD is not enabled, you should only get one set of items. If CCD with multiple passes is enabled, you might get more than one item set.

Note
Even though contact pair extra data is requested per shape pair, you will not get an item set per shape pair but one per actor pair. If, for example, an actor has two shapes and both collide with another actor, then there will only be one item set (since it applies to both shape pairs).
Returns
True if there was another set of extra data items in the stream, else false.
See also
PxContactPairVelocity PxContactPairPose PxContactPairIndex

References PxContactPairExtraDataType::eCONTACT_EVENT_POSE, PxContactPairExtraDataType::eCONTACT_PAIR_INDEX, PxContactPairExtraDataType::ePOST_SOLVER_VELOCITY, PxContactPairExtraDataType::ePRE_SOLVER_VELOCITY, PX_ASSERT, and PxContactPairExtraDataItem::type.

Member Data Documentation

◆ contactPairIndex

PxU32 PxContactPairExtraDataIterator::contactPairIndex

The contact pair index of the current item set in the stream.

See also
PxContactPairIndex

◆ currPtr

const PxU8* PxContactPairExtraDataIterator::currPtr

Current pointer in the stream.

◆ endPtr

const PxU8* PxContactPairExtraDataIterator::endPtr

Pointer to the end of the stream.

◆ eventPose

const PxContactPairPose* PxContactPairExtraDataIterator::eventPose

Pointer to the current contact event pose item in the stream. NULL if there is none.

See also
PxContactPairPose

◆ postSolverVelocity

const PxContactPairVelocity* PxContactPairExtraDataIterator::postSolverVelocity

Pointer to the current post solver velocity item in the stream. NULL if there is none.

See also
PxContactPairVelocity

◆ preSolverVelocity

const PxContactPairVelocity* PxContactPairExtraDataIterator::preSolverVelocity

Pointer to the current pre solver velocity item in the stream. NULL if there is none.

See also
PxContactPairVelocity

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