22 #ifndef INCLUDED_BOUND
23 #define INCLUDED_BOUND
105 return (std::max(v.
X, 0.0f) * std::max(v.
Y, 0.0f) * std::max(v.
Z, 0.0f));
117 void Expand(
float amount);
void Transform(const CMatrix3D &m, CBoundingBoxAligned &result) const
Transforms these bounds according to the specified transformation matrix m, and writes the axis-align...
void RenderOutline(CShaderProgramPtr &shader) const
Render: Render the outline of the bound object as lines.
CVector3D & operator[](int index)
static const CBoundingBoxAligned EMPTY
CBoundingBoxAligned(const CVector3D &min, const CVector3D &max)
void GetCentre(CVector3D ¢re) const
CBoundingBoxAligned & operator+=(const CBoundingBoxAligned &b)
void Extend(const CVector3D &min, const CVector3D &max)
void IntersectFrustumConservative(const CFrustum &frustum)
IntersectFrustumConservative: Approximate the intersection of this bounds object with the given frust...
CBoundingBoxAligned & operator+=(const CVector3D &pt)
bool RayIntersect(const CVector3D &origin, const CVector3D &dir, float &tmin, float &tmax) const
Check if a given ray intersects this AABB.
const CVector3D & operator[](int index) const
void Expand(float amount)
Expand the bounding box by the given amount in every direction.
void Render(CShaderProgramPtr &shader) const
Render: Render the surfaces of the bound object as triangles.
shared_ptr< CShaderProgram > CShaderProgramPtr