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.
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxContactPairarrayGet(long baseAddress, int index) voiddestroy()intextractContacts(PxContactPairPoint userBuffer, int bufferSize) Extracts the contact points from the stream and stores them in a convenient format.byteNumber of contact points stored in the contact streamFlags raised due to the contact.getFlags()Additional information on the contact report pair.byteNumber of contact patches stored in the contact streamgetShapes(int index) voidsetContactCount(byte value) Number of contact points stored in the contact streamvoidsetEvents(PxPairFlags value) Flags raised due to the contact.voidsetFlags(PxContactPairFlags value) Additional information on the contact report pair.voidsetPatchCount(byte value) Number of contact patches stored in the contact streamvoidstatic PxContactPairwrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxContactPair
protected PxContactPair() -
PxContactPair
protected PxContactPair(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
getShapes
- Parameters:
index- Array index- Returns:
- WebIDL type:
PxShape
-
setShapes
- Parameters:
index- Array indexvalue- WebIDL type:PxShape
-
getContactCount
public byte getContactCount()Number of contact points stored in the contact stream -
setContactCount
public void setContactCount(byte value) Number of contact points stored in the contact stream -
getPatchCount
public byte getPatchCount()Number of contact patches stored in the contact stream -
setPatchCount
public void setPatchCount(byte value) Number of contact patches stored in the contact stream -
getFlags
Additional information on the contact report pair. -
setFlags
Additional information on the contact report pair. -
getEvents
Flags raised due to the contact.The events field is a combination of:
<ul> <li>PxPairFlag::eNOTIFY_TOUCH_FOUND,</li> <li>PxPairFlag::eNOTIFY_TOUCH_PERSISTS,</li> <li>PxPairFlag::eNOTIFY_TOUCH_LOST,</li> <li>PxPairFlag::eNOTIFY_TOUCH_CCD,</li> <li>PxPairFlag::eNOTIFY_THRESHOLD_FORCE_FOUND,</li> <li>PxPairFlag::eNOTIFY_THRESHOLD_FORCE_PERSISTS,</li> <li>PxPairFlag::eNOTIFY_THRESHOLD_FORCE_LOST</li> </ul>
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.
-
setEvents
Flags raised due to the contact.The events field is a combination of:
<ul> <li>PxPairFlag::eNOTIFY_TOUCH_FOUND,</li> <li>PxPairFlag::eNOTIFY_TOUCH_PERSISTS,</li> <li>PxPairFlag::eNOTIFY_TOUCH_LOST,</li> <li>PxPairFlag::eNOTIFY_TOUCH_CCD,</li> <li>PxPairFlag::eNOTIFY_THRESHOLD_FORCE_FOUND,</li> <li>PxPairFlag::eNOTIFY_THRESHOLD_FORCE_PERSISTS,</li> <li>PxPairFlag::eNOTIFY_THRESHOLD_FORCE_LOST</li> </ul>
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.
-
extractContacts
Extracts the contact points from the stream and stores them in a convenient format.- Parameters:
userBuffer- Array of PxContactPairPoint structures to extract the contact points to. The number of contacts for a pair is defined by #contactCountbufferSize- Number of PxContactPairPoint structures the provided buffer can store.- Returns:
- Number of contact points written to the buffer.
- See Also:
-