29#ifndef BP_BROADPHASE_H
30#define BP_BROADPHASE_H
32#include "foundation/PxUserAllocated.h"
33#include "PxBroadPhase.h"
34#include "BpBroadPhaseUpdate.h"
38 class PxcScratchAllocator;
44class BroadPhaseUpdateData;
70 virtual PxU32 getNbOutOfBoundsObjects() const
PX_OVERRIDE {
return 0; }
71 virtual const PxU32* getOutOfBoundsObjects() const
PX_OVERRIDE {
return NULL; }
84 mVolA (
PxMin(volA, volB)),
85 mVolB (
PxMax(volA, volB))
89 mVolA (BP_INVALID_BP_HANDLE),
90 mVolB (BP_INVALID_BP_HANDLE)
116 const PxU32 maxNbRegions,
117 const PxU32 maxNbBroadPhaseOverlaps,
118 const PxU32 maxNbStaticShapes,
119 const PxU32 maxNbDynamicShapes,
171 virtual const BroadPhasePair* getCreatedPairs(PxU32& nbCreatedPairs)
const = 0;
Base broad phase class. Functions only relevant to MBP.
Definition BpBroadPhase.h:50
virtual PxU32 getNbRegions() const PX_OVERRIDE
Returns number of regions currently registered in the broad-phase.
Definition BpBroadPhase.h:66
virtual PxU32 addRegion(const PxBroadPhaseRegion &, bool, const PxBounds3 *, const PxReal *) PX_OVERRIDE
Adds a new broad-phase region.
Definition BpBroadPhase.h:68
virtual bool removeRegion(PxU32) PX_OVERRIDE
Removes a broad-phase region.
Definition BpBroadPhase.h:69
virtual void getCaps(PxBroadPhaseCaps &caps) const
Gets broad-phase caps.
Definition BpBroadPhase.h:60
virtual PxU32 getRegions(PxBroadPhaseRegionInfo *, PxU32, PxU32) const PX_OVERRIDE
Gets broad-phase regions.
Definition BpBroadPhase.h:67
Definition BpBroadPhaseUpdate.h:47
Definition BpBroadPhase.h:99
virtual void fetchBroadPhaseResults()=0
Fetch the results of any asynchronous broad phase work.
virtual void shiftOrigin(const PxVec3 &shift, const PxBounds3 *boundsArray, const PxReal *contactDistances)=0
Adjust internal structures after all bounds have been adjusted due to a scene origin shift.
virtual void preBroadPhase(const Bp::BroadPhaseUpdateData &updateData)=0
prepare broad phase data.
virtual void freeBuffers()=0
After the broadphase has completed its update() function and the created/deleted pairs have been quer...
virtual void release()=0
Shutdown of the broadphase.
virtual void update(PxcScratchAllocator *scratchAllocator, const BroadPhaseUpdateData &updateData, physx::PxBaseTask *continuation)=0
Updates the broadphase and computes the lists of created/deleted pairs.
static BroadPhase * create(const PxBroadPhaseType::Enum bpType, const PxU32 maxNbRegions, const PxU32 maxNbBroadPhaseOverlaps, const PxU32 maxNbStaticShapes, const PxU32 maxNbDynamicShapes, PxU64 contextID)
Instantiate a BroadPhase instance.
Definition BpBroadPhase.cpp:37
virtual const BroadPhasePair * getDeletedPairs(PxU32 &nbDeletedPairs) const =0
Get deleted pairs.
Base class of all task types.
Definition PxTask.h:45
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
Broadphase regions.
Definition PxBroadPhase.h:325
Definition PxUserAllocated.h:43
3 Element vector class.
Definition PxVec3.h:50
Definition PxcScratchAllocator.h:42
#define PX_OVERRIDE
Definition PxPreprocessor.h:375
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxMax(T a, T b)
The return value is the greater of the two specified values.
Definition PxMath.h:72
PX_CUDA_CALLABLE PX_FORCE_INLINE T PxMin(T a, T b)
The return value is the lesser of the two specified values.
Definition PxMath.h:88
Definition BpBroadPhase.h:82
Caps class for broad phase.
Definition PxBroadPhase.h:131
PxU32 mMaxNbRegions
Max number of regions supported by the broad-phase (0 = explicit regions not needed)
Definition PxBroadPhase.h:132
Information & stats structure for a region.
Definition PxBroadPhase.h:119
"Region of interest" for the broad-phase.
Definition PxBroadPhase.h:110
Enum
Definition PxBroadPhase.h:79