#include <PxSimulationEventCallback.h>
Public Member Functions | |
PX_FORCE_INLINE | PxContactPairExtraDataIterator (const PxU8 *stream, PxU32 size) |
Constructor. | |
PX_INLINE bool | nextItemSet () |
Advances the iterator to next set of extra data items. | |
Public Attributes | |
const PxU8 * | currPtr |
Current pointer in the stream. | |
const PxU8 * | endPtr |
Pointer to the end of the stream. | |
const PxContactPairVelocity * | preSolverVelocity |
Pointer to the current pre solver velocity item in the stream. NULL if there is none. | |
const PxContactPairVelocity * | postSolverVelocity |
Pointer to the current post solver velocity item in the stream. NULL if there is none. | |
const PxContactPairPose * | eventPose |
Pointer to the current contact event pose item in the stream. NULL if there is none. | |
PxU32 | contactPairIndex |
The contact pair index of the current item set in the stream. | |
Private Member Functions | |
PX_FORCE_INLINE void | clearDataPtrs () |
Internal helper. |
PX_FORCE_INLINE PxContactPairExtraDataIterator::PxContactPairExtraDataIterator | ( | const PxU8 * | stream, | |
PxU32 | size | |||
) | [inline] |
Constructor.
[in] | stream | Pointer to the start of the stream. |
[in] | size | Size of the stream in bytes. |
PX_FORCE_INLINE void PxContactPairExtraDataIterator::clearDataPtrs | ( | ) | [inline, private] |
Internal helper.
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.
References PxContactPairExtraDataType::eCONTACT_EVENT_POSE, PxContactPairExtraDataType::eCONTACT_PAIR_INDEX, PxContactPairExtraDataType::ePOST_SOLVER_VELOCITY, PxContactPairExtraDataType::ePRE_SOLVER_VELOCITY, PX_ASSERT, and PxContactPairExtraDataItem::type.
const PxU8* PxContactPairExtraDataIterator::currPtr |
Current pointer in the stream.
const PxU8* PxContactPairExtraDataIterator::endPtr |
Pointer to the end of the stream.
Pointer to the current contact event pose item in the stream. NULL if there is none.
Pointer to the current post solver velocity item in the stream. NULL if there is none.
Pointer to the current pre solver velocity item in the stream. NULL if there is none.