29#ifndef GU_CENTER_EXTENTS_H
30#define GU_CENTER_EXTENTS_H
36#include "foundation/PxUserAllocated.h"
37#include "foundation/PxBounds3.h"
53 PX_FORCE_INLINE float getMin(PxU32 axis)
const {
return mCenter[axis] - mExtents[axis]; }
54 PX_FORCE_INLINE float getMax(PxU32 axis)
const {
return mCenter[axis] + mExtents[axis]; }
61 mCenter = (max + min)*0.5f;
62 mExtents = (max - min)*0.5f;
67 if(box.getMin(0)>getMin(0))
return 0;
68 if(box.getMin(1)>getMin(1))
return 0;
69 if(box.getMin(2)>getMin(2))
return 0;
70 if(box.getMax(0)<getMax(0))
return 0;
71 if(box.getMax(1)<getMax(1))
return 0;
72 if(box.getMax(2)<getMax(2))
return 0;
78 mExtents =
PxVec3(-PX_MAX_BOUNDS_EXTENTS);
84 return mExtents.x<0.0f;
95 const PxVec3& e = mExtents;
96 return (c.isFinite() && e.isFinite() && (((e.x >= 0.0f) && (e.y >= 0.0f) && (e.z >= 0.0f)) ||
97 ((e.x == -PX_MAX_BOUNDS_EXTENTS) &&
98 (e.y == -PX_MAX_BOUNDS_EXTENTS) &&
99 (e.z == -PX_MAX_BOUNDS_EXTENTS))));
104 PX_ASSERT(isValid());
A padded version of CenterExtents, to safely load its data using SIMD.
Definition GuCenterExtents.h:114
Definition GuCenterExtents.h:44
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
static PX_CUDA_CALLABLE PX_INLINE PxBounds3 basisExtent(const PxVec3 ¢er, const PxMat33 &basis, const PxVec3 &extent)
Construct from center, extent, and (not necessarily orthogonal) basis.
Definition PxBounds3.h:305
3x3 matrix class
Definition PxMat33.h:91
Definition PxUserAllocated.h:43
3 Element vector class.
Definition PxVec3.h:50
PX_CUDA_CALLABLE PX_INLINE bool isFinite() const
returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)
Definition PxVec3.h:156
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39