3#include <Foundation/Math/Mat4.h>
4#include <Foundation/Math/Vec4.h>
10template <
typename Type>
15 PL_DECLARE_POD_TYPE();
17 using ComponentType = Type;
55#if PL_ENABLED(PL_MATH_CHECK_FOR_NAN)
56 void AssertNotNaN()
const
58 PL_ASSERT_ALWAYS(!
IsNaN(),
"This object contains NaN values. This can happen when you forgot to initialize it before using it. Please check that "
59 "all code-paths properly initialize this object.");
88template <
typename Type>
92template <
typename Type>
96#include <Foundation/Math/Implementation/BoundingBoxSphere_inl.h>
A combination of a bounding box and a bounding sphere with the same center.
Definition BoundingBoxSphere.h:12
plBoundingBoxSphereTemplate()
Default constructor does not initialize anything.
Definition BoundingBoxSphere_inl.h:4
bool IsNaN() const
Checks whether any component is NaN.
Definition BoundingBoxSphere_inl.h:130
bool IsValid() const
Checks whether the bounds is in an invalid state.
Definition BoundingBoxSphere_inl.h:124
static plBoundingBoxSphereTemplate< Type > MakeZero()
Creates an object with all zero values. These are valid bounds around the origin with no volume.
Definition BoundingBoxSphere_inl.h:48
static plBoundingBoxSphereTemplate< Type > MakeInvalid()
Creates an 'invalid' object, ie one with negative extents/radius. Invalid objects can be made valid t...
Definition BoundingBoxSphere_inl.h:58
void ExpandToInclude(const plBoundingBoxSphereTemplate &rhs)
Expands the bounds such that the given bounds are inside it.
Definition BoundingBoxSphere_inl.h:148
const plBoundingSphereTemplate< Type > GetSphere() const
Returns the bounding sphere.
Definition BoundingBoxSphere_inl.h:142
static plBoundingBoxSphereTemplate< Type > MakeFromSphere(const plBoundingSphereTemplate< Type > &sphere)
Creates an object from another bounding sphere.
Definition BoundingBoxSphere_inl.h:104
static plBoundingBoxSphereTemplate< Type > MakeFromCenterExtents(const plVec3Template< Type > &vCenter, const plVec3Template< Type > &vBoxHalfExtents, Type fSphereRadius)
Creates an object from the given center point and extents.
Definition BoundingBoxSphere_inl.h:68
const plBoundingBoxTemplate< Type > GetBox() const
Returns the bounding box.
Definition BoundingBoxSphere_inl.h:136
static plBoundingBoxSphereTemplate< Type > MakeFromBox(const plBoundingBoxTemplate< Type > &box)
Creates an object from another bounding box.
Definition BoundingBoxSphere_inl.h:94
static plBoundingBoxSphereTemplate< Type > MakeFromPoints(const plVec3Template< Type > *pPoints, plUInt32 uiNumPoints, plUInt32 uiStride=sizeof(plVec3Template< Type >))
Creates an object that contains all the provided points.
Definition BoundingBoxSphere_inl.h:78
static plBoundingBoxSphereTemplate< Type > MakeFromBoxAndSphere(const plBoundingBoxTemplate< Type > &box, const plBoundingSphereTemplate< Type > &sphere)
Creates an object from another bounding box and a sphere.
Definition BoundingBoxSphere_inl.h:114
void Transform(const plMat4Template< Type > &mTransform)
Transforms the bounds in its local space.
Definition BoundingBoxSphere_inl.h:166
An axis-aligned bounding box implementation.
Definition BoundingBox.h:12
An implementation of a bounding sphere.
Definition BoundingSphere.h:11
A 4x4 component matrix class.
Definition Mat4.h:11
A 3-component vector class.
Definition Vec3.h:9