RavEngine
Loading...
Searching...
No Matches
physx::Bp::BroadPhaseABP Class Reference
Inheritance diagram for physx::Bp::BroadPhaseABP:
[legend]
Collaboration diagram for physx::Bp::BroadPhaseABP:
[legend]

Public Member Functions

 BroadPhaseABP (PxU32 maxNbBroadPhaseOverlaps, PxU32 maxNbStaticShapes, PxU32 maxNbDynamicShapes, PxU64 contextID, bool enableMT)
 
virtual PxBroadPhaseType::Enum getType () const PX_OVERRIDE
 
virtual void release () PX_OVERRIDE
 Shutdown of the broadphase.
 
virtual void update (PxcScratchAllocator *scratchAllocator, const BroadPhaseUpdateData &updateData, physx::PxBaseTask *continuation) PX_OVERRIDE
 Updates the broadphase and computes the lists of created/deleted pairs.
 
virtual void preBroadPhase (const Bp::BroadPhaseUpdateData &) PX_OVERRIDE
 prepare broad phase data.
 
virtual void fetchBroadPhaseResults () PX_OVERRIDE
 Fetch the results of any asynchronous broad phase work.
 
virtual const BroadPhasePair * getCreatedPairs (PxU32 &) const PX_OVERRIDE
 
virtual const BroadPhasePair * getDeletedPairs (PxU32 &) const PX_OVERRIDE
 Get deleted pairs.
 
virtual void freeBuffers () PX_OVERRIDE
 After the broadphase has completed its update() function and the created/deleted pairs have been queried with getCreatedPairs/getDeletedPairs it is desirable to free any memory that was temporarily acquired for the update but is is no longer required post-update. This can be achieved with the function freeBuffers().
 
virtual void shiftOrigin (const PxVec3 &shift, const PxBounds3 *boundsArray, const PxReal *contactDistances) PX_OVERRIDE
 Adjust internal structures after all bounds have been adjusted due to a scene origin shift.
 
void addObjects ()
 
void removeObjects ()
 
void updateObjects ()
 
- Public Member Functions inherited from physx::Bp::BroadPhaseBase
virtual void getCaps (PxBroadPhaseCaps &caps) const
 Gets broad-phase caps.
 
virtual PxU32 getNbRegions () const PX_OVERRIDE
 Returns number of regions currently registered in the broad-phase.
 
virtual PxU32 getRegions (PxBroadPhaseRegionInfo *, PxU32, PxU32) const PX_OVERRIDE
 Gets broad-phase regions.
 
virtual PxU32 addRegion (const PxBroadPhaseRegion &, bool, const PxBounds3 *, const PxReal *) PX_OVERRIDE
 Adds a new broad-phase region.
 
virtual bool removeRegion (PxU32) PX_OVERRIDE
 Removes a broad-phase region.
 
virtual PxU32 getNbOutOfBoundsObjects () const PX_OVERRIDE
 
virtual const PxU32 * getOutOfBoundsObjects () const PX_OVERRIDE
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Public Attributes

internalABP::ABP * mABP
 
PxU32 mNbAdded
 
PxU32 mNbUpdated
 
PxU32 mNbRemoved
 
const BpHandle * mCreatedHandles
 
const BpHandle * mUpdatedHandles
 
const BpHandle * mRemovedHandles
 
PxArray< BroadPhasePair > mCreated
 
PxArray< BroadPhasePair > mDeleted
 
const Bp::FilterGroup::Enum * mGroups
 
const BpFilter * mFilter
 
const PxU64 mContextID
 
const bool mEnableMT
 

Additional Inherited Members

- Static Public Member Functions inherited from physx::Bp::BroadPhase
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.
 

Member Function Documentation

◆ fetchBroadPhaseResults()

virtual void physx::Bp::BroadPhaseABP::fetchBroadPhaseResults ( )
inlinevirtual

Fetch the results of any asynchronous broad phase work.

Implements physx::Bp::BroadPhase.

◆ freeBuffers()

void BroadPhaseABP::freeBuffers ( )
virtual

After the broadphase has completed its update() function and the created/deleted pairs have been queried with getCreatedPairs/getDeletedPairs it is desirable to free any memory that was temporarily acquired for the update but is is no longer required post-update. This can be achieved with the function freeBuffers().

Implements physx::Bp::BroadPhase.

◆ getCreatedPairs()

const BroadPhasePair * BroadPhaseABP::getCreatedPairs ( PxU32 &  nbCreatedPairs) const
virtual

Implements physx::Bp::BroadPhase.

◆ getDeletedPairs()

const BroadPhasePair * BroadPhaseABP::getDeletedPairs ( PxU32 &  nbDeletedPairs) const
virtual

Get deleted pairs.

Note that a deleted pair can only be reported if that pair has already appeared in the list of created pairs in an earlier update. A lost overlap occurs when a pair of bounds previously overlapped on all three axes but have now separated on at least one axis. A lost overlap must involve at least one of the bounds of the lost overlap pair appearing in the updated list. Lost overlaps arising from removal of bounds from the broadphase do not appear in the list of deleted pairs. It is impossible for the same pair to appear simultaneously in the list of created and deleted pairs.

Parameters
nbDeletedPairs[out] The number of deleted overlap pairs computed in the execution of update() that has just completed.
Returns
The array of deleted overlap pairs computed in the execution of update() that has just completed.

Implements physx::Bp::BroadPhase.

◆ getType()

virtual PxBroadPhaseType::Enum physx::Bp::BroadPhaseABP::getType ( ) const
inlinevirtual

Implements physx::Bp::BroadPhase.

◆ preBroadPhase()

virtual void physx::Bp::BroadPhaseABP::preBroadPhase ( const Bp::BroadPhaseUpdateData &  updateData)
inlinevirtual

prepare broad phase data.

Implements physx::Bp::BroadPhase.

◆ release()

virtual void physx::Bp::BroadPhaseABP::release ( )
inlinevirtual

Shutdown of the broadphase.

Implements physx::Bp::BroadPhase.

◆ shiftOrigin()

void BroadPhaseABP::shiftOrigin ( const PxVec3 &  shift,
const PxBounds3 *  boundsArray,
const PxReal *  contactDistances 
)
virtual

Adjust internal structures after all bounds have been adjusted due to a scene origin shift.

Implements physx::Bp::BroadPhase.

◆ update()

void BroadPhaseABP::update ( PxcScratchAllocator *  scratchAllocator,
const BroadPhaseUpdateData &  updateData,
physx::PxBaseTask *  continuation 
)
virtual

Updates the broadphase and computes the lists of created/deleted pairs.

Parameters
[in]scratchAllocator- a PxcScratchAllocator instance used for temporary memory allocations. This must be non-null.
[in]updateDataa description of changes to the collection of aabbs since the last broadphase update. The changes detail the indices of the bounds that have been added/updated/removed as well as an array of all bound coordinates and an array of group ids used to filter pairs with the same id.
See also
BroadPhaseUpdateData
Parameters
[in]continuationthe task that is in the queue to be executed immediately after the broadphase has completed its update. NULL is not supported.
Note
In PX_CHECKED and PX_DEBUG build configurations illegal input data (that does not conform to the BroadPhaseUpdateData specifications) triggers a special code-path that entirely bypasses the broadphase and issues a warning message to the error stream. No guarantees can be made about the correctness/consistency of broadphase behavior with illegal input data in PX_RELEASE and PX_PROFILE configs because validity checks are not active in these builds.

Implements physx::Bp::BroadPhase.


The documentation for this class was generated from the following files: