22 #ifndef INCLUDED_BOUND 23 #define INCLUDED_BOUND 116 return (std::max(v.
X, 0.0f) * std::max(v.
Y, 0.0f) * std::max(v.
Z, 0.0f));
128 void Expand(
float amount);
157 #endif // INCLUDED_BOUND void Translate(const CVector3D &v, CBoundingBoxAligned &result) const
Translates these bounds by v, and writes the result to result.
Definition: BoundingBoxAligned.h:61
CVector3D & operator[](int index)
Definition: BoundingBoxAligned.h:67
bool IsEmpty() const
Definition: BoundingBoxAligned.cpp:144
static const CBoundingBoxAligned EMPTY
Definition: BoundingBoxAligned.h:36
CBoundingBoxAligned(const CVector3D &min, const CVector3D &max)
Definition: BoundingBoxAligned.h:39
void Transform(const CMatrix3D &m, CBoundingBoxAligned &result) const
Transforms these bounds according to the specified transformation matrix m, and writes the axis-align...
Definition: BoundingBoxAligned.cpp:153
Definition: Vector3D.h:30
CBoundingBoxAligned & operator+=(const CBoundingBoxAligned &b)
Definition: BoundingBoxAligned.h:84
CVector3D m_Data[2]
Definition: BoundingBoxAligned.h:154
void Extend(const CVector3D &min, const CVector3D &max)
Definition: BoundingBoxAligned.h:73
float GetVolume() const
Definition: BoundingBoxAligned.h:113
Definition: Matrix3D.h:33
float X
Definition: Vector3D.h:33
float Y
Definition: Vector3D.h:33
void IntersectFrustumConservative(const CFrustum &frustum)
IntersectFrustumConservative: Approximate the intersection of this bounds object with the given frust...
Definition: BoundingBoxAligned.cpp:210
CFrustum ToFrustum() const
Construct a CFrustum that describes the same volume as this bounding box.
Definition: BoundingBoxAligned.cpp:227
CBoundingBoxAligned & operator+=(const CVector3D &pt)
Definition: BoundingBoxAligned.h:91
bool IsPointInside(const CVector3D &point) const
Definition: BoundingBoxAligned.cpp:267
bool RayIntersect(const CVector3D &origin, const CVector3D &dir, float &tmin, float &tmax) const
Check if a given ray intersects this AABB.
Definition: BoundingBoxAligned.cpp:40
const CVector3D & operator[](int index) const
Definition: BoundingBoxAligned.h:68
Definition: BoundingBoxAligned.h:33
void Expand(float amount)
Expand the bounding box by the given amount in every direction.
Definition: BoundingBoxAligned.cpp:261
void SetEmpty()
Definition: BoundingBoxAligned.cpp:136
float Z
Definition: Vector3D.h:33
Definition: BoundingBoxOriented.h:30
CBoundingBoxAligned()
Definition: BoundingBoxAligned.h:38
void GetCenter(CVector3D ¢er) const
Definition: BoundingBoxAligned.h:120