A 3D axis-aligned bounding box defined by two corners (min and max).
AABB(const Vector3 &extents)
Box centered at the origin with width, height, and depth specified by the vector.
float Volume() const
Returns the volume of the box or -1.0 when empty and 0.0 if the box contains just a single point.
AABB(const Mesh &mesh, unsigned int tri_id)
Box that contains just triangle number "tri_id" from the specified mesh.
int user_data()
You can set this to whatever you want in order to use it as a handle into your own program....
Point3 min() const
Returns the coordinates for the minimum corner of the box.
Vector3 Dimensions() const
Returns the dimensions of the box in x, y, and z as a 3D vector.
AABB(const Point3 &a)
Box that contains a single point.
friend AABB operator+(const AABB &A, const AABB &B)
AABB(const Point3 ¢er, const Vector3 &extents)
Box centered at the center with width, height, and depth specified by the vector.
AABB(const Mesh &mesh)
Box that contains a whole mesh.
AABB(const Point3 &a, const Point3 &b, const Point3 &c)
Box that contains a triangle defined by 3 points.
Point3 max() const
Returns the coordinates for the maximum corner of the box.
void set_user_data(int data)
You can set this to whatever you want in order to use it as a handle into your own program....
AABB()
Creates an empty box.
A triangle mesh data structure that can be rendered with a ShaderProgram like DefaultShader.
A 3D Point with floating point coordinates, used for storing vertices and all sorts of other 3D graph...
A 3D Vector with floating point coordinates, used for storing normals and all sorts of other 3D graph...
Namespace for the MinGfx Toolkit.
AABB operator+(const AABB &A, const AABB &B)