ezEngine  Milestone 7
ezBoundingBoxSphereTemplate< Type > Class Template Reference

A combination of a bounding box and a bounding sphere with the same center. More...

#include <BoundingBoxSphere.h>

Public Types

typedef Type ComponentType
 

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
 ezBoundingBoxSphereTemplate ()
 Default constructor does not initialize anything.
 
 ezBoundingBoxSphereTemplate (const ezVec3Template< Type > &vCenter, const ezVec3Template< Type > &vBoxHalfExtents, Type fSphereRadius)
 Constructs the bounds from the center position, the box half extends and the sphere radius.
 
 ezBoundingBoxSphereTemplate (const ezBoundingBoxTemplate< Type > &box, const ezBoundingSphereTemplate< Type > &sphere)
 Constructs the bounds from the given box and sphere.
 
 ezBoundingBoxSphereTemplate (const ezBoundingBoxTemplate< Type > &box)
 Constructs the bounds from the given box. The sphere radius is calculated from the box extends.
 
 ezBoundingBoxSphereTemplate (const ezBoundingSphereTemplate< Type > &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 ezVec3Template< Type > *pPoints, ezUInt32 uiNumPoints, ezUInt32 uiStride=sizeof(ezVec3Template< Type >))
 Calculates the bounds from given set of points.
 
const ezBoundingBoxTemplate< Type > GetBox () const
 Returns the bounding box.
 
const ezBoundingSphereTemplate
< Type > 
GetSphere () const
 Returns the bounding sphere.
 
void ExpandToInclude (const ezBoundingBoxSphereTemplate &rhs)
 Expands the bounds such that the given bounds are inside it.
 
void Transform (const ezMat4Template< Type > &mTransform)
 Transforms the bounds in its local space.
 

Public Attributes

ezVec3Template< Type > m_vCenter
 
Type m_fSphereRadius
 
ezVec3Template< Type > m_vBoxHalfExtends
 

Detailed Description

template<typename Type>
class ezBoundingBoxSphereTemplate< Type >

A combination of a bounding box and a bounding sphere with the same center.

This class uses less memory than storying a bounding box and sphere separate.


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