PxBroadPhaseRegion Struct Reference
[Physics]

"Region of interest" for the broad-phase. More...

#include <PxBroadPhase.h>

Collaboration diagram for PxBroadPhaseRegion:

Collaboration graph
PxBounds3PxVec3
[legend]

List of all members.

Public Attributes

PxBounds3 bounds
 Region's bounds.
void * userData
 Region's user-provided data.


Detailed Description

"Region of interest" for the broad-phase.

This is currently only used for the PxBroadPhaseType::eMBP broad-phase, which requires zones or regions to be defined when the simulation starts in order to work. Regions can overlap and be added or removed at runtime, but at least one region needs to be defined when the scene is created.

If objects that do no overlap any region are inserted into the scene, they will not be added to the broad-phase and thus collisions will be disabled for them. A PxBroadPhaseCallback out-of-bounds notification will be sent for each one of those objects.

The total number of regions is limited by PxBroadPhaseCaps::maxNbRegions.

The number of regions has a direct impact on performance and memory usage, so it is recommended to experiment with various settings to find the best combination for your game. A good default setup is to start with global bounds around the whole world, and subdivide these bounds into 4*4 regions. The PxBroadPhaseExt::createRegionsFromWorldBounds function can do that for you.

See also:
PxBroadPhaseCallback PxBroadPhaseExt.createRegionsFromWorldBounds

Member Data Documentation

Region's bounds.

Region's user-provided data.


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


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