PxBVHStructure Class Referenceabstract

Class representing the bounding volume hierarchy structure. More...

#include <PxBVHStructure.h>

Inheritance diagram for PxBVHStructure:
Collaboration diagram for PxBVHStructure:

Public Member Functions

virtual PxU32 raycast (const PxVec3 &origin, const PxVec3 &unitDir, PxReal maxDist, PxU32 maxHits, PxU32 *PX_RESTRICT rayHits) const =0
 Raycast test against a BVH structure. More...
 
virtual PxU32 sweep (const PxBounds3 &aabb, const PxVec3 &unitDir, PxReal maxDist, PxU32 maxHits, PxU32 *PX_RESTRICT sweepHits) const =0
 Sweep test against a BVH structure. More...
 
virtual PxU32 overlap (const PxBounds3 &aabb, PxU32 maxHits, PxU32 *PX_RESTRICT overlapHits) const =0
 AABB overlap test against a BVH structure. More...
 
virtual const PxBounds3getBounds () const =0
 Retrieve the bounds in the BVH. More...
 
virtual PxU32 getNbBounds () const =0
 Returns the number of bounds in the BVH. More...
 
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type. More...
 
- Public Member Functions inherited from PxBase
virtual void release ()=0
 Releases the PxBase instance, please check documentation of release in derived class. More...
 
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Protected Member Functions

PX_INLINE PxBVHStructure (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxBVHStructure (PxBaseFlags baseFlags)
 
virtual ~PxBVHStructure ()
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance. More...
 
- Protected Member Functions inherited from PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags. More...
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags. More...
 
virtual ~PxBase ()
 Destructor. More...
 
template<class T >
bool typeMatch () const
 

Additional Inherited Members

- Protected Attributes inherited from PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 

Detailed Description

Class representing the bounding volume hierarchy structure.

PxBVHStructure can be provided to PxScene::addActor. In this case the scene query pruning structure inside PhysX SDK will store/update one bound per actor. The scene queries against such an actor will query actor bounds and then make a local space query against the provided BVH structure, which is in actor's local space.

See also
PxScene::addActor

Constructor & Destructor Documentation

◆ PxBVHStructure() [1/2]

PX_INLINE PxBVHStructure::PxBVHStructure ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inlineprotected

◆ PxBVHStructure() [2/2]

PX_INLINE PxBVHStructure::PxBVHStructure ( PxBaseFlags  baseFlags)
inlineprotected

◆ ~PxBVHStructure()

virtual PxBVHStructure::~PxBVHStructure ( )
inlineprotectedvirtual

Member Function Documentation

◆ getBounds()

virtual const PxBounds3* PxBVHStructure::getBounds ( ) const
pure virtual

Retrieve the bounds in the BVH.

See also
PxBounds3

◆ getConcreteTypeName()

virtual const char* PxBVHStructure::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Implements PxBase.

◆ getNbBounds()

virtual PxU32 PxBVHStructure::getNbBounds ( ) const
pure virtual

Returns the number of bounds in the BVH.

You can use getBounds() to retrieve the bounds.

Returns
Number of bounds in the BVH.

◆ isKindOf()

virtual bool PxBVHStructure::isKindOf ( const char *  superClass) const
inlineprotectedvirtual

Returns whether a given type name matches with the type of this instance.

Reimplemented from PxBase.

References PxBase::isKindOf().

◆ overlap()

virtual PxU32 PxBVHStructure::overlap ( const PxBounds3 aabb,
PxU32  maxHits,
PxU32 *PX_RESTRICT  overlapHits 
) const
pure virtual

AABB overlap test against a BVH structure.

Parameters
[in]aabbThe axis aligned bounding box
[in]maxHitsMax number of returned hits = size of 'overlapHits' buffer
[out]overlapHitsOverlap hits information, bounds indices
Returns
Number of hits

◆ raycast()

virtual PxU32 PxBVHStructure::raycast ( const PxVec3 origin,
const PxVec3 unitDir,
PxReal  maxDist,
PxU32  maxHits,
PxU32 *PX_RESTRICT  rayHits 
) const
pure virtual

Raycast test against a BVH structure.

Parameters
[in]originThe origin of the ray.
[in]unitDirNormalized direction of the ray.
[in]maxDistMaximum ray length, has to be in the [0, inf) range
[in]maxHitsMax number of returned hits = size of 'rayHits' buffer
[out]rayHitsRaycast hits information, bounds indices
Returns
Number of hits

◆ sweep()

virtual PxU32 PxBVHStructure::sweep ( const PxBounds3 aabb,
const PxVec3 unitDir,
PxReal  maxDist,
PxU32  maxHits,
PxU32 *PX_RESTRICT  sweepHits 
) const
pure virtual

Sweep test against a BVH structure.

Parameters
[in]aabbThe axis aligned bounding box to sweep
[in]unitDirNormalized direction of the sweep.
[in]maxDistMaximum sweep length, has to be in the [0, inf) range
[in]maxHitsMax number of returned hits = size of 'sweepHits' buffer
[out]sweepHitsSweep hits information, bounds indices
Returns
Number of hits

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