Public Member Functions | Public Attributes | List of all members
PxContactPairIndex Struct Reference

Marker for the beginning of a new item set in the extra data stream. More...

#include <PxSimulationEventCallback.h>

Inheritance diagram for PxContactPairIndex:
Inheritance graph
[legend]
Collaboration diagram for PxContactPairIndex:
Collaboration graph
[legend]

Public Member Functions

PX_FORCE_INLINE PxContactPairIndex ()
 
- Public Member Functions inherited from PxContactPairExtraDataItem
PX_FORCE_INLINE PxContactPairExtraDataItem ()
 

Public Attributes

PxU16 index
 The next item set in the extra data stream refers to the contact pairs starting at index in the reported PxContactPair array. More...
 
- Public Attributes inherited from PxContactPairExtraDataItem
PxU8 type
 The type of the extra data stream item. More...
 

Detailed Description

Marker for the beginning of a new item set in the extra data stream.

If CCD with multiple passes is enabled, then a fast moving object might bounce on and off the same object multiple times. Also, different shapes of the same actor might gain and lose contact with an other object over multiple passes. This marker allows to seperate the extra data items for each collision case, as well as distinguish the shape pair reports of different CCD passes.

Example: Let us assume that an actor a0 with shapes s0_0 and s0_1 hits another actor a1 with shape s1. First s0_0 will hit s1, then a0 will slightly rotate and s0_1 will hit s1 while s0_0 will lose contact with s1. Furthermore, let us say that contact event pose information is requested as extra data. The extra data stream will look like this:

PxContactPairIndexA | PxContactPairPoseA | PxContactPairIndexB | PxContactPairPoseB

The corresponding array of PxContactPair events (see PxSimulationEventCallback.onContact()) will look like this:

PxContactPair(touch_found: s0_0, s1) | PxContactPair(touch_lost: s0_0, s1) | PxContactPair(touch_found: s0_1, s1)

The index of PxContactPairIndexA will point to the first entry in the PxContactPair array, for PxContactPairIndexB, index will point to the third entry.

See Also
PxContactPairHeader.extraDataStream

Constructor & Destructor Documentation

PX_FORCE_INLINE PxContactPairIndex::PxContactPairIndex ( )
inline

Member Data Documentation

PxU16 PxContactPairIndex::index

The next item set in the extra data stream refers to the contact pairs starting at index in the reported PxContactPair array.


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


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com