35#include "common/PxBase.h"
36#include "foundation/PxTransform.h"
37#include "foundation/PxBounds3.h"
38#include "geometry/PxGeometryQueryFlags.h"
39#include "geometry/PxReportCallback.h"
112 virtual bool reportHit(PxU32 boundsIndex, PxReal& distance) = 0;
123 virtual bool reportHit(PxU32 boundsIndex) = 0;
134 virtual bool visitNode(
const PxBounds3& bounds) = 0;
140 virtual bool reportLeaf(PxU32 nbPrims,
const PxU32* prims) = 0;
196 virtual bool cull(PxU32 nbPlanes,
const PxPlane* planes,
OverlapCallback& cb, PxGeometryQueryFlags queryFlags = PxGeometryQueryFlag::eDEFAULT)
const = 0;
295 PX_INLINE PxBVH(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
301 struct PxGeomIndexPair;
315 PX_C_EXPORT PX_PHYSX_COMMON_API
bool PX_CALL_CONV PxFindOverlap(PxReportCallback<PxGeomIndexPair>& callback,
const PxBVH& bvh0,
const PxBVH& bvh1);
Class representing a bounding volume hierarchy.
Definition PxBVH.h:63
virtual PxU32 getNbBounds() const =0
Returns the number of bounds in the BVH.
virtual bool traverse(TraversalCallback &cb) const =0
Generic BVH traversal function.
virtual void refit()=0
Refit the BVH.
virtual PX_DEPRECATED PxU32 raycast(const PxVec3 &origin, const PxVec3 &unitDir, PxReal maxDist, PxU32 maxHits, PxU32 *PX_RESTRICT rayHits) const =0
Raycast test against a BVH.
virtual bool cull(PxU32 nbPlanes, const PxPlane *planes, OverlapCallback &cb, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) const =0
Frustum culling test against a BVH.
virtual bool sweep(const PxGeometry &geom, const PxTransform &pose, const PxVec3 &unitDir, float maxDist, RaycastCallback &cb, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) const =0
Sweep test against a BVH.
virtual bool raycast(const PxVec3 &origin, const PxVec3 &unitDir, float maxDist, RaycastCallback &cb, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) const =0
Raycast test against a BVH.
virtual bool updateBounds(PxU32 boundsIndex, const PxBounds3 &newBounds)=0
Update single bounds.
virtual PX_DEPRECATED PxU32 overlap(const PxBounds3 &aabb, PxU32 maxHits, PxU32 *PX_RESTRICT overlapHits) const =0
AABB overlap test against a BVH.
virtual const char * getConcreteTypeName() const
Returns string name of dynamic type.
Definition PxBVH.h:292
virtual PX_DEPRECATED PxU32 sweep(const PxBounds3 &aabb, const PxVec3 &unitDir, PxReal maxDist, PxU32 maxHits, PxU32 *PX_RESTRICT sweepHits) const =0
Sweep test against a BVH.
PX_FORCE_INLINE PxBounds3 * getBoundsForModification()
Retrieve the bounds in the BVH.
Definition PxBVH.h:229
virtual bool isKindOf(const char *name) const
Returns whether a given type name matches with the type of this instance.
Definition PxBVH.h:298
virtual void partialRefit()=0
Refits subset of marked nodes.
virtual bool overlap(const PxGeometry &geom, const PxTransform &pose, OverlapCallback &cb, PxGeometryQueryFlags queryFlags=PxGeometryQueryFlag::eDEFAULT) const =0
Overlap test against a BVH.
virtual const PxBounds3 * getBounds() const =0
Retrieve the read-only bounds in the BVH.
Base class for objects that can be members of a PxCollection.
Definition PxBase.h:73
virtual bool isKindOf(const char *superClass) const
Returns whether a given type name matches with the type of this instance.
Definition PxBase.h:179
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
A geometry object.
Definition PxGeometry.h:79
Representation of a plane.
Definition PxPlane.h:49
3 Element vector class.
Definition PxVec3.h:50
#define PX_RESTRICT
Definition PxPreprocessor.h:355
#define PX_CALL_CONV
Definition PxPreprocessor.h:299
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_INLINE
Definition PxPreprocessor.h:320
#define PX_DEPRECATED
Definition PxPreprocessor.h:418
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_DEPRECATED PxBVH PxBVHStructure
Definition PxPhysics.h:73
PX_C_EXPORT PX_PHYSX_COMMON_API bool PX_CALL_CONV PxFindOverlap(PxReportCallback< PxGeomIndexPair > &callback, const PxBVH &bvh0, const PxBVH &bvh1)
BVH-vs-BVH overlap test.
Definition GuBVH.cpp:950