|
RavEngine
|
Contact report pair information. More...
#include <PxSimulationEventCallback.h>
Public Member Functions | |
| PX_INLINE PxU32 | extractContacts (PxContactPairPoint *userBuffer, PxU32 bufferSize) const |
| Extracts the contact points from the stream and stores them in a convenient format. | |
| 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. | |
| PX_INLINE const PxU32 * | getInternalFaceIndices () const |
Public Attributes | |
| PxShape * | shapes [2] |
| The two shapes that make up the pair. | |
| const PxU8 * | contactPatches |
| Pointer to first patch header in contact stream containing contact patch data. | |
| const PxU8 * | contactPoints |
| Pointer to first contact point in contact stream containing contact data. | |
| const PxReal * | contactImpulses |
| Buffer containing applied impulse data. | |
| PxU32 | requiredBufferSize |
| Size of the contact stream [bytes] including force buffer. | |
| PxU8 | contactCount |
| Number of contact points stored in the contact stream. | |
| PxU8 | patchCount |
| Number of contact patches stored in the contact stream. | |
| PxU16 | contactStreamSize |
| Size of the contact stream [bytes] not including force buffer. | |
| PxContactPairFlags | flags |
| Additional information on the contact report pair. | |
| PxPairFlags | events |
| Flags raised due to the contact. | |
| PxU32 | internalData [2] |
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.
| PX_INLINE void physx::PxContactPair::bufferContacts | ( | PxContactPair * | newPair, |
| PxU8 * | bufferMemory | ||
| ) | const |
Helper method to clone the contact pair and copy the contact data stream into a user buffer.
The contact data stream is only accessible during the contact report callback. This helper function provides copy functionality to buffer the contact stream information such that it can get accessed at a later stage.
| [out] | newPair | The contact pair info will get copied to this instance. The contact data stream pointer of the copy will be redirected to the provided user buffer. Use NULL to skip the contact pair copy operation. |
| [out] | bufferMemory | Memory block to store the contact data stream to. At most requiredBufferSize bytes will get written to the buffer. |
| PX_INLINE PxU32 physx::PxContactPair::extractContacts | ( | PxContactPairPoint * | userBuffer, |
| PxU32 | bufferSize | ||
| ) | const |
Extracts the contact points from the stream and stores them in a convenient format.
| [out] | userBuffer | Array of PxContactPairPoint structures to extract the contact points to. The number of contacts for a pair is defined by contactCount |
| [in] | bufferSize | Number of PxContactPairPoint structures the provided buffer can store. |
| const PxReal* physx::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.
| const PxU8* physx::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.
| const PxU8* physx::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.
| PxPairFlags physx::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.
| PxContactPairFlags physx::PxContactPair::flags |
Additional information on the contact report pair.
| PxShape* physx::PxContactPair::shapes[2] |
The two shapes that make up the pair.