|
RavEngine
|
Broadphase data update structure. More...
#include <PxBroadPhase.h>
Public Member Functions | |
| PxBroadPhaseUpdateData (const PxBpIndex *created, PxU32 nbCreated, const PxBpIndex *updated, PxU32 nbUpdated, const PxBpIndex *removed, PxU32 nbRemoved, const PxBounds3 *bounds, const PxBpFilterGroup *groups, const float *distances, PxU32 capacity) | |
| PxBroadPhaseUpdateData (const PxBroadPhaseUpdateData &other) | |
| PxBroadPhaseUpdateData & | operator= (const PxBroadPhaseUpdateData &other) |
Public Attributes | |
| const PxBpIndex * | mCreated |
| Indices of created objects. | |
| const PxU32 | mNbCreated |
| Number of created objects. | |
| const PxBpIndex * | mUpdated |
| Indices of updated objects. | |
| const PxU32 | mNbUpdated |
| Number of updated objects. | |
| const PxBpIndex * | mRemoved |
| Indices of removed objects. | |
| const PxU32 | mNbRemoved |
| Number of removed objects. | |
| const PxBounds3 * | mBounds |
| (Persistent) array of bounds. | |
| const PxBpFilterGroup * | mGroups |
| (Persistent) array of groups. | |
| const float * | mDistances |
| (Persistent) array of distances. | |
| const PxU32 | mCapacity |
| Capacity of bounds / groups / distance buffers. | |
Broadphase data update structure.
This structure is used to update the low-level broadphase (PxBroadPhase). All added, updated and removed objects must be batched and submitted at once to the broadphase.
Broadphase objects have bounds, a filtering group, and a distance. With the low-level broadphase the data must be externally managed by the clients of the broadphase API, and passed to the update function.
The provided bounds are non-inflated "base" bounds that can be further extended by the broadphase using the passed distance value. These can be contact offsets, or dynamically updated distance values for e.g. speculative contacts. Either way they are optional and can be left to zero. The broadphase implementations efficiently combine the base bounds with the per-object distance values at runtime.
The per-object filtering groups are used to discard some pairs directly within the broadphase, which is more efficient than reporting the pairs and culling them in a second pass.