25 #ifndef _GEOMMATH_HPP_ 26 #define _GEOMMATH_HPP_ 28 #include "VecMath.hpp" 37 MinMinMin = 0, MaxMinMin, MaxMaxMin, MinMaxMin,
38 MinMinMax, MaxMinMax, MaxMaxMax, MinMaxMax,
45 Front = 0, Back, Bottom, Top, Left, Right,
112 Vec3f getPoint(
float val);
A simple line class, identified by a point and a direction vector.
void reset()
Resets minimum to infinity and maximum to -infinity (equivalent to creating a new AABBox with the def...
Face
Identifies a face of the AABB.
AABBox()
Creates an AABBox with minimum vertex set to infinity and maximum vertex set to -infinity.
Vec3f getCorner(AABBox::Corner corner) const
Returns the coordinates of the specified corner of the AABB.
Vec3f negativeVertex(Vec3f &normal) const
Returns a Vec3f that for each component either:
Vec3f endPoint
Equals startPoint + direction.
Vec3f min
The minimal extents of the box.
bool isValid() const
Returns true when each component of the minimum extents is smaller than the corresponding component o...
Vec3f positiveVertex(Vec3f &normal) const
Returns a Vec3f that for each component either:
float getVolume() const
Returns the volume of the bounding box.
Vec4f getPlane(AABBox::Face p) const
Return the plane equation in the general form for the specified face of the AABB as Vec4f...
void expand(const Vec3f &vec)
Updates the bounding box to include the specified vertex.
An axis-aligned bounding-box class.
Vec3f max
The maximal extents of the box.
Corner
Identifies a corner of the AABB.