29#ifndef GU_INCREMENTAL_AABB_TREE_H
30#define GU_INCREMENTAL_AABB_TREE_H
32#include "foundation/PxBounds3.h"
33#include "foundation/PxUserAllocated.h"
34#include "foundation/PxHashMap.h"
35#include "foundation/PxVecMath.h"
36#include "foundation/PxPool.h"
37#include "common/PxPhysXCommonConfig.h"
38#include "GuAABBTree.h"
39#include "GuPrunerTypedef.h"
50 #define INCR_NB_OBJECTS_PER_NODE 4
58 for(PxU32 i=1; i<INCR_NB_OBJECTS_PER_NODE; i++)
63 PoolIndex indices[INCR_NB_OBJECTS_PER_NODE];
84 PX_FORCE_INLINE const PxU32* getPrimitives(
const PxU32*)
const {
return &mIndices->indices[0]; }
85 PX_FORCE_INLINE PxU32* getPrimitives(PxU32*) {
return &mIndices->indices[0]; }
86 PX_FORCE_INLINE PxU32 getNbPrimitives()
const {
return mIndices->nbIndices; }
87 PX_FORCE_INLINE PxU32 getPrimitiveIndex()
const {
return PX_INVALID_U32; }
98 const float half = 0.5f;
99 const FloatV halfV = FLoad(half);
101 *extents = Vec3V_From_Vec4V((V4Scale(V4Sub(mBVMax, mBVMin), halfV)));
102 *center = Vec3V_From_Vec4V((V4Scale(V4Add(mBVMax, mBVMin), halfV)));
107 *extents = Vec3V_From_Vec4V((V4Sub(mBVMax, mBVMin)));
108 *center = Vec3V_From_Vec4V((V4Add(mBVMax, mBVMin)));
151 PX_PHYSX_COMMON_API
void fixupTreeIndices(
IncrementalAABBTreeNode* node,
const PoolIndex index,
const PoolIndex newIndex);
154 PX_PHYSX_COMMON_API
void shiftOrigin(
const PxVec3& shift);
163 PX_PHYSX_COMMON_API
void hierarchyCheck(PoolIndex maxIndex,
const PxBounds3* bounds);
164 PX_PHYSX_COMMON_API
void hierarchyCheck(
const PxBounds3* bounds);
168 PX_PHYSX_COMMON_API
void release();
Contains AABB-tree build parameters.
Definition GuAABBTree.h:57
Represents a BVH.
Definition GuBVH.h:93
Definition GuIncrementalAABBTree.h:68
Definition GuIncrementalAABBTree.h:131
Definition GuAABBTree.h:125
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
Definition PxUserAllocated.h:43
3 Element vector class.
Definition PxVec3.h:50
#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 GuIncrementalAABBTree.h:54
Definition GuAABBTreeNode.h:44
Definition GuIncrementalAABBTree.h:122
Definition PxVecMathAoSScalar.h:52
Definition PxVecMathAoSScalar.h:77
Definition PxVecMathAoSScalar.h:65