High-level broadphase API.
More...
#include <PxBroadPhase.h>
High-level broadphase API.
The low-level broadphase API (PxBroadPhase) only supports batched updates and has a few non-trivial requirements for managing the bounds data.
The high-level broadphase API (PxAABBManager) is an easier-to-use one-object-at-a-time API that automatically deals with the quirks of the PxBroadPhase data management.
- See also
- PxCreateAABBManager
◆ addObject()
Adds an object to the manager.
Objects' indices are externally managed, i.e. they must be provided by users (as opposed to handles that could be returned by this manager). The design allows users to identify an object by a single ID, and use the same ID in multiple sub-systems.
- Parameters
-
| index | [in] The object's index |
| bounds | [in] The object's bounds |
| group | [in] The object's filter group |
| distance | [in] The object's distance (optional) |
- See also
- PxBpIndex PxBounds3 PxBpFilterGroup
◆ fetchResults()
Retrieves the broadphase results after an update.
This should be called once after each update call to retrieve the results of the broadphase. The results are incremental, i.e. the system only returns new and lost pairs, not all current pairs.
- Parameters
-
| results | [out] The broadphase results |
- See also
- PxBroadPhaseResults
◆ getBounds()
| virtual const PxBounds3 * physx::PxAABBManager::getBounds |
( |
| ) |
const |
|
pure virtual |
◆ getBroadPhase()
| virtual PxBroadPhase & physx::PxAABBManager::getBroadPhase |
( |
| ) |
|
|
pure virtual |
Retrieves the underlying broadphase.
- Returns
- The managed broadphase.
- See also
- PxBroadPhase
◆ getCapacity()
| virtual PxU32 physx::PxAABBManager::getCapacity |
( |
| ) |
const |
|
pure virtual |
Retrieves the managed buffers' capacity.
Bounds, distances and groups buffers have the same capacity.
- Returns
- The managed buffers' capacity.
◆ getDistances()
| virtual const float * physx::PxAABBManager::getDistances |
( |
| ) |
const |
|
pure virtual |
Retrieves the managed distances.
This is needed as input parameters to functions like PxBroadPhaseRegions::addRegion.
- Returns
- The managed object distances.
◆ getGroups()
Retrieves the managed filter groups.
- Returns
- The managed object groups.
◆ removeObject()
| virtual void physx::PxAABBManager::removeObject |
( |
PxBpIndex |
index | ) |
|
|
pure virtual |
Removes an object from the manager.
- Parameters
-
| index | [in] The object's index |
- See also
- PxBpIndex
◆ update() [1/2]
| virtual void physx::PxAABBManager::update |
( |
PxBaseTask * |
continuation = NULL | ) |
|
|
pure virtual |
Updates the broadphase and computes the lists of created/deleted pairs.
The data necessary for updating the broadphase is internally computed by the AABB manager.
To benefit from potentially multithreaded implementations, it is necessary to provide a continuation task to the function. It is legal to pass NULL there, but the underlying (CPU) implementations will then run single-threaded.
- Parameters
-
| continuation | [in] Continuation task to enable multi-threaded implementations, or NULL. |
- See also
- PxBaseTask
◆ update() [2/2]
Helper for single-threaded updates.
This short helper function performs a single-theaded update and reports the results in a single call.
- Parameters
-
| results | [out] The broadphase results |
- See also
- PxBroadPhaseResults
◆ updateObject()
| virtual void physx::PxAABBManager::updateObject |
( |
PxBpIndex |
index, |
|
|
const PxBounds3 * |
bounds = NULL, |
|
|
const float * |
distance = NULL |
|
) |
| |
|
pure virtual |
Updates an object in the manager.
This call can update an object's bounds, distance, or both. It is not possible to update an object's filter group.
- Parameters
-
| index | [in] The object's index |
| bounds | [in] The object's updated bounds, or NULL |
| distance | [in] The object's updated distance, or NULL |
- See also
- PxBpIndex PxBounds3
The documentation for this class was generated from the following file: