25 #include "VecMath.hpp"
47 MinMinMin = 0, MaxMinMin, MaxMaxMin, MinMaxMin,
48 MinMinMax, MaxMinMax, MaxMaxMax, MinMaxMax,
54 Front = 0, Back, Bottom, Top, Left, Right,
62 AABB(Vec3f min, Vec3f max);
71 void expand(
const Vec3f& vec);
73 Vec3f getCorner(Corner corner)
const;
77 Vec3f negativeVertex(Vec3f& normal)
const;
void transform(const QMatrix4x4 &tf)
Transforms the vertices.
void expand(const Vec3f &vec)
Updates the bounding box to include the specified vertex.
AABB()
Creates an AABB with minimum vertex set to infinity and maximum vertex set to -infinity.
Vec4f getEquation(AABB::Plane p) const
Return the plane equation for specified plane as Vec4f.
Box toBox()
Returns a box object that represents the AABB.
Vec3f positiveVertex(Vec3f &normal) const
Used for frustum culling.
void reset()
Resets minimum to infinity and maximum to -infinity.
An axis-aligned bounding-box class.
void resetToZero()
Resets minimum and maximum to zero vectors.
A simple "box" class with 8 arbitrary vertices.
void render() const
Renders the box.