#include <PxBroadPhaseExt.h>
++ +
Static Public Member Functions | |
| static PxU32 | createRegionsFromWorldBounds (PxBounds3 *regions, const PxBounds3 &globalBounds, PxU32 nbSubdiv, PxU32 upAxis=1) |
| Creates regions for PxSceneDesc, from a global box. | |
| static PxU32 PxBroadPhaseExt::createRegionsFromWorldBounds | +( | +PxBounds3 * | +regions, | +|
| + | + | const PxBounds3 & | +globalBounds, | +|
| + | + | PxU32 | +nbSubdiv, | +|
| + | + | PxU32 | + upAxis = 1 | + |
| + | ) | + [static] |
+
+Creates regions for PxSceneDesc, from a global box. +
+This helper simply subdivides the given global box into a 2D grid of smaller boxes. Each one of those smaller boxes is a region of interest for the broadphase. There are nbSubdiv*nbSubdiv regions in the 2D grid. The function does not subdivide along the given up axis.
+This is the simplest setup one can use with PxBroadPhaseType::eMBP. A more sophisticated setup would try to cover the game world with a non-uniform set of regions (i.e. not just a grid).
+
| [out] | regions | Regions computed from the input global box |
| [in] | globalBounds | World-space box covering the game world |
| [in] | nbSubdiv | Grid subdivision level. The function will create nbSubdiv*nbSubdiv regions. |
| [in] | upAxis | Up axis (0 for X, 1 for Y, 2 for Z). |
+