Plasma Engine  2.0
Loading...
Searching...
No Matches
plSimdBBoxSphere Class Reference

Public Member Functions

 PL_DECLARE_POD_TYPE ()
 
 plSimdBBoxSphere ()
 Default constructor does not initialize anything.
 
 plSimdBBoxSphere (const plSimdVec4f &vCenter, const plSimdVec4f &vBoxHalfExtents, const plSimdFloat &fSphereRadius)
 Constructs the bounds from the center position, the box half extends and the sphere radius.
 
 plSimdBBoxSphere (const plSimdBBox &box, const plSimdBSphere &sphere)
 Constructs the bounds from the given box and sphere.
 
 plSimdBBoxSphere (const plSimdBBox &box)
 Constructs the bounds from the given box. The sphere radius is calculated from the box extends.
 
 plSimdBBoxSphere (const plSimdBSphere &sphere)
 Constructs the bounds from the given sphere. The box extends are calculated from the sphere radius.
 
void SetInvalid ()
 Resets the bounds to an invalid state.
 
bool IsValid () const
 Checks whether the bounds is in an invalid state.
 
bool IsNaN () const
 Checks whether any component is NaN.
 
void SetFromPoints (const plSimdVec4f *pPoints, plUInt32 uiNumPoints, plUInt32 uiStride=sizeof(plSimdVec4f))
 Calculates the bounds from given set of points.
 
plSimdBBox GetBox () const
 Returns the bounding box.
 
plSimdBSphere GetSphere () const
 Returns the bounding sphere.
 
void ExpandToInclude (const plSimdBBoxSphere &rhs)
 Expands the bounds such that the given bounds are inside it.
 
void Transform (const plSimdTransform &t)
 Transforms the bounds in its local space.
 
void Transform (const plSimdMat4f &mMat)
 Transforms the bounds in its local space.
 
bool operator== (const plSimdBBoxSphere &rhs) const
 
bool operator!= (const plSimdBBoxSphere &rhs) const
 

Static Public Member Functions

static plSimdBBoxSphere MakeZero ()
 Creates an object with all zero values. These are valid bounds around the origin with no volume.
 
static plSimdBBoxSphere MakeInvalid ()
 Creates an 'invalid' object, ie one with negative extents/radius. Invalid objects can be made valid through ExpandToInclude().
 
static plSimdBBoxSphere MakeFromCenterExtents (const plSimdVec4f &vCenter, const plSimdVec4f &vBoxHalfExtents, const plSimdFloat &fSphereRadius)
 Creates an object from the given center point and extents.
 
static plSimdBBoxSphere MakeFromPoints (const plSimdVec4f *pPoints, plUInt32 uiNumPoints, plUInt32 uiStride=sizeof(plSimdVec4f))
 Creates an object that contains all the provided points.
 
static plSimdBBoxSphere MakeFromBox (const plSimdBBox &box)
 Creates an object from another bounding box.
 
static plSimdBBoxSphere MakeFromSphere (const plSimdBSphere &sphere)
 Creates an object from another bounding sphere.
 
static plSimdBBoxSphere MakeFromBoxAndSphere (const plSimdBBox &box, const plSimdBSphere &sphere)
 Creates an object from another bounding box and a sphere.
 

Public Attributes

plSimdVec4f m_CenterAndRadius
 
plSimdVec4f m_BoxHalfExtents
 

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