Pathfinder
|
This struct models an AABB. More...
#include <AABB.h>
Public Member Functions | |
AABB () | |
A constructor that creates an object with dummy attributes. More... | |
AABB (const Geometry::Vec3 &min, const Geometry::Vec3 &max) | |
A constructor that creates an AABB out of two vectors. More... | |
bool | triNotInAABB (const Polygon *p, const short &component) |
Check whether a polygon definetely lies outside of this AABB. More... | |
bool | triInAABB (const Polygon *p) |
Check whether the polygon intersects with this AABB. More... | |
bool | pointInAABB (Geometry::Vec3 p) |
Check whether the point lies inside this AABB. More... | |
Public Attributes | |
Geometry::Vec3 | min |
The smallest corner of the AABB. More... | |
Geometry::Vec3 | max |
The biggest corner of the AABB. More... | |
This struct models an AABB.
An AABB is defined to be the volume between the two corners min and max.
Pathfinder::AABB::AABB | ( | ) |
A constructor that creates an object with dummy attributes.
The two data members are initialized with two empty Vec3 objects.
Pathfinder::AABB::AABB | ( | const Geometry::Vec3 & | min, |
const Geometry::Vec3 & | max | ||
) |
bool Pathfinder::AABB::pointInAABB | ( | Geometry::Vec3 | p | ) |
bool Pathfinder::AABB::triInAABB | ( | const Polygon * | p | ) |
Check whether the polygon intersects with this AABB.
If triNotInAABB returns true for any component, this function will be false.
p | The polygon which is to be checked for intersection. |
bool Pathfinder::AABB::triNotInAABB | ( | const Polygon * | p, |
const short & | component | ||
) |
Check whether a polygon definetely lies outside of this AABB.
This is the case if the vertices p1, p2 and p3 of p all share a component which is smaller/greater than the corresponding component of min/max.
p | The polygon that shall be compared. |
component | The component which is to be examined. x = 0, y = 1, z = 2. |
Geometry::Vec3 Pathfinder::AABB::max |
The biggest corner of the AABB.
Geometry::Vec3 Pathfinder::AABB::min |
The smallest corner of the AABB.