struct TBounds

template<typename T>

Bounds represented by an axis aligned box and a sphere.

Public

Constructors

TBounds<T>

TBounds<T>() = default

TBounds<T>

constexpr TBounds<T>(ZeroTag)

TBounds<T>

constexpr TBounds<T>(const TVector3<T> &center, const TVector3<T> &boxExtents, T sphereRadius)

TBounds<T>

TBounds<T>(const TAABox<T> &box, const TSphere<T> &sphere)

TBounds<T>

TBounds<T>(const TAABox<T> &box)

TBounds<T>

TBounds<T>(const TSphere<T> &sphere)

Methods

~TBounds<T>

~TBounds<T>() = default

GetBox

TAABox<T> GetBox() const

Returns the axis aligned box representing the bounds.

GetSphere

TSphere<T> GetSphere() const

Returns the sphere representing the bounds.

Merge

void Merge(const TBounds<T> &rhs)

Merges the two bounds, creating a new bounds that encapsulates them both.

Merge

void Merge(const TVector3<T> &point)

Expands the bounds so it includes the provided point.

TransformAffine

void TransformAffine(const TMatrix4<T> &matrix)

Transforms the bounds by the given matrix.

TransformAffine

void TransformAffine(const TTransform<T> &transform)

Transforms the bounds by the given transform.

Protected

Fields

mCenter

TVector3<T> mCenter

mBoxExtents

TVector3<T> mBoxExtents

mSphereRadius

T mSphereRadius