36#include "geometry/PxBVH.h"
38#include "CmRefCountable.h"
39#include "foundation/PxVecMath.h"
40#include "foundation/PxUserAllocated.h"
41#include "GuAABBTreeBounds.h"
42#include "GuAABBTree.h"
46 struct PxBVHInternalData;
66 mBounds.moveFrom(other.mBounds);
73 if(mBounds.ownsMemory())
83 PX_PHYSX_COMMON_API
bool build(PxU32 nbBounds,
const void* boundsData, PxU32 boundsStride,
float enlargement, PxU32 numPrimsPerLeaf, BVHBuildStrategy bs);
84 PX_PHYSX_COMMON_API
bool save(
PxOutputStream& stream,
bool endian)
const;
101 PX_PHYSX_COMMON_API
bool init(PxU32 nbPrims,
AABBTreeBounds* bounds,
const void* boundsData, PxU32 stride, BVHBuildStrategy bs, PxU32 nbPrimsPerLeaf,
float enlargement);
118 virtual void refit() ;
122 virtual bool traverse(TraversalCallback& cb)
const ;
133 bool getInternalData(PxBVHInternalData&,
bool)
const;
134 bool updateBoundsInternal(PxU32 localIndex,
const PxBounds3& bounds);
136 bool overlap(
const ShapeData& shapeData, OverlapCallback& cb, PxGeometryQueryFlags flags)
const;
137 bool sweep(
const ShapeData& shapeData,
const PxVec3& unitDir,
float distance, RaycastCallback& cb, PxGeometryQueryFlags flags)
const;
139 MeshFactory* mMeshFactory;
Definition CmRefCountable.h:86
Definition GuAABBTreeBounds.h:39
PxU32 mNbNodes
Number of nodes in the tree.
Definition GuAABBTree.h:257
PxU32 mNbIndices
Nb indices.
Definition GuAABBTree.h:256
BVHNode * mNodes
Linear pool of nodes.
Definition GuAABBTree.h:258
PxU32 * mIndices
Indices in the app list. Indices are reorganized during build (permutation).
Definition GuAABBTree.h:259
Definition GuAABBTree.h:263
Represents a BVH.
Definition GuBVH.h:93
virtual void refit()
Refit the BVH.
Definition GuBVH.cpp:700
virtual void onRefCountZero()
Definition GuBVH.cpp:276
void release()
Releases the PxBase instance, please check documentation of release in derived class.
Definition GuBVH.cpp:271
virtual const PxBounds3 * getBounds() const
Retrieve the read-only bounds in the BVH.
Definition GuBVH.h:116
virtual bool cull(PxU32 nbPlanes, const PxPlane *planes, OverlapCallback &cb, PxGeometryQueryFlags flags) const
Frustum culling test against a BVH.
Definition GuBVH.cpp:616
virtual bool updateBounds(PxU32 boundsIndex, const PxBounds3 &newBounds)
Update single bounds.
Definition GuBVH.cpp:731
virtual PxU32 getNbBounds() const
Returns the number of bounds in the BVH.
Definition GuBVH.h:115
virtual bool traverse(TraversalCallback &cb) const
Generic BVH traversal function.
Definition GuBVH.cpp:741
virtual bool raycast(const PxVec3 &origin, const PxVec3 &unitDir, float distance, RaycastCallback &cb, PxGeometryQueryFlags flags) const
Raycast test against a BVH.
Definition GuBVH.cpp:401
virtual void partialRefit()
Refits subset of marked nodes.
Definition GuBVH.cpp:736
virtual bool overlap(const PxGeometry &geom, const PxTransform &pose, OverlapCallback &cb, PxGeometryQueryFlags flags) const
Overlap test against a BVH.
Definition GuBVH.cpp:488
virtual bool sweep(const PxGeometry &geom, const PxTransform &pose, const PxVec3 &unitDir, float distance, RaycastCallback &cb, PxGeometryQueryFlags flags) const
Sweep test against a BVH.
Definition GuBVH.cpp:506
Definition GuMeshFactory.h:83
Class representing a bounding volume hierarchy.
Definition PxBVH.h:63
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
A geometry object.
Definition PxGeometry.h:79
Output stream class for I/O.
Definition PxIO.h:114
Representation of a plane.
Definition PxPlane.h:49
Definition PxUserAllocated.h:43
3 Element vector class.
Definition PxVec3.h:50
#define PX_RESTRICT
Definition PxPreprocessor.h:355
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition GuAABBTreeNode.h:44
Definition PxGeometryInternal.h:92