PxContactPair Struct Reference

Contact report pair information. More...

#include <PxSimulationEventCallback.h>

Collaboration diagram for PxContactPair:

Public Member Functions

PX_INLINE PxContactPair ()
 
PX_INLINE PxU32 extractContacts (PxContactPairPoint *userBuffer, PxU32 bufferSize) const
 Extracts the contact points from the stream and stores them in a convenient format. More...
 
PX_INLINE void bufferContacts (PxContactPair *newPair, PxU8 *bufferMemory) const
 Helper method to clone the contact pair and copy the contact data stream into a user buffer. More...
 
PX_INLINE const PxU32getInternalFaceIndices () const
 

Public Attributes

PxShapeshapes [2]
 The two shapes that make up the pair. More...
 
const PxU8 * contactPatches
 Pointer to first patch header in contact stream containing contact patch data. More...
 
const PxU8 * contactPoints
 Pointer to first contact point in contact stream containing contact data. More...
 
const PxReal * contactImpulses
 Buffer containing applied impulse data. More...
 
PxU32 requiredBufferSize
 Size of the contact stream [bytes] including force buffer. More...
 
PxU8 contactCount
 Number of contact points stored in the contact stream. More...
 
PxU8 patchCount
 Number of contact patches stored in the contact stream. More...
 
PxU16 contactStreamSize
 Size of the contact stream [bytes] not including force buffer. More...
 
PxContactPairFlags flags
 Additional information on the contact report pair. More...
 
PxPairFlags events
 Flags raised due to the contact. More...
 
PxU32 internalData [2]
 

Detailed Description

Contact report pair information.

Instances of this class are passed to PxSimulationEventCallback.onContact(). If contact reports have been requested for a pair of shapes (see PxPairFlag), then the corresponding contact information will be provided through this structure.

See also
PxSimulationEventCallback.onContact()

Constructor & Destructor Documentation

◆ PxContactPair()

PX_INLINE PxContactPair::PxContactPair ( )
inline

Member Data Documentation

◆ contactCount

PxU8 PxContactPair::contactCount

Number of contact points stored in the contact stream.

◆ contactImpulses

const PxReal* PxContactPair::contactImpulses

Buffer containing applied impulse data.

This pointer is only valid if contact point information has been requested for the contact report pair (see PxPairFlag::eNOTIFY_CONTACT_POINTS). Use extractContacts() as a reference for the data layout of the stream.

◆ contactPatches

const PxU8* PxContactPair::contactPatches

Pointer to first patch header in contact stream containing contact patch data.

This pointer is only valid if contact point information has been requested for the contact report pair (see PxPairFlag::eNOTIFY_CONTACT_POINTS). Use extractContacts() as a reference for the data layout of the stream.

Referenced by bufferContacts().

◆ contactPoints

const PxU8* PxContactPair::contactPoints

Pointer to first contact point in contact stream containing contact data.

This pointer is only valid if contact point information has been requested for the contact report pair (see PxPairFlag::eNOTIFY_CONTACT_POINTS). Use extractContacts() as a reference for the data layout of the stream.

Referenced by bufferContacts().

◆ contactStreamSize

PxU16 PxContactPair::contactStreamSize

Size of the contact stream [bytes] not including force buffer.

◆ events

PxPairFlags PxContactPair::events

Flags raised due to the contact.

The events field is a combination of:

See the documentation of PxPairFlag for an explanation of each.

Note
eNOTIFY_TOUCH_CCD can get raised even if the pair did not request this event. However, in such a case it will only get raised in combination with one of the other flags to point out that the other event occured during a CCD pass.
See also
PxPairFlag

◆ flags

PxContactPairFlags PxContactPair::flags

Additional information on the contact report pair.

See also
PxContactPairFlag

◆ internalData

PxU32 PxContactPair::internalData[2]

◆ patchCount

PxU8 PxContactPair::patchCount

Number of contact patches stored in the contact stream.

◆ requiredBufferSize

PxU32 PxContactPair::requiredBufferSize

Size of the contact stream [bytes] including force buffer.

◆ shapes

PxShape* PxContactPair::shapes[2]

The two shapes that make up the pair.

Note
The shape pointers might reference deleted shapes. This will be the case if PxPairFlag::eNOTIFY_TOUCH_LOST or PxPairFlag::eNOTIFY_THRESHOLD_FORCE_LOST events were requested for the pair and one of the involved shapes gets deleted. Check the flags member to see whether that is the case. Do not dereference a pointer to a deleted shape. The pointer to a deleted shape is only provided such that user data structures which might depend on the pointer value can be updated.
See also
PxShape

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