Untold Engine
Beta v0.0.16
docs
|
The U4DAABB class implements a mathematical representation of an Axis-Aligned Bounding Box. More...
Public Member Functions | |
U4DAABB () | |
Constructor which creates a AABB with minimum 3D point location, maximum 3D point location and longest Dimension 3D vector set to zero. | |
U4DAABB (U4DPoint3n &uMinPoint, U4DPoint3n &uMaxPoint) | |
Constructor which creates a AABB with given minimum 3D point location and maximum 3D point location. | |
U4DAABB (float uX, float uY, float uZ, U4DPoint3n &uCenter) | |
Constructor which creates a AABB with given minimum 3D point halfwidth. | |
U4DAABB (const U4DAABB &a) | |
Copy constructor for the class. More... | |
U4DAABB & | operator= (const U4DAABB &a) |
Copy constructor for the class. More... | |
~U4DAABB () | |
Destructor for the class. | |
void | setMinPoint (U4DPoint3n &uMinPoint) |
Method which sets the minimum 3D point location for the AABB. More... | |
void | setMaxPoint (U4DPoint3n &uMaxPoint) |
Method which sets the maximum 3D point location for the AABB. More... | |
U4DPoint3n | getMinPoint () |
Method which returns the minimum 3D point of the AABB. More... | |
U4DPoint3n | getMaxPoint () |
Method which returns the maximum 3D point of the AABB. More... | |
bool | intersectionWithVolume (U4DAABB *uAABB) |
Method which tests the intersection between two AABBs. More... | |
bool | intersectionWithVolume (U4DSphere &uSphere) |
Method which test an intersection between an AABB and a sphere. More... | |
bool | intersectionWithVolume (U4DSphere &uSphere, U4DPoint3n &uPoint) |
Method which test an intersection between an AABB and a sphere. More... | |
void | setLongestAABBDimensionVector (U4DVector3n &uLongestAABBDimensionVector) |
Method which sets the longest Dimension vector of the AABB. More... | |
U4DVector3n | getLongestAABBDimensionVector () |
Method which returns the longest dimension vector of the AABB. More... | |
float | squareDistanceToPoint (U4DPoint3n &uPoint) |
Method which computes the square magnitude(distance) of a 3D point to the AABB. More... | |
bool | intersectionWithSegment (U4DSegment &uSegment) |
Compute if the AABB is intersecting with a segment. More... | |
U4DPoint3n | getCenter () |
Gets the center point of the AABB. More... | |
bool | isPointInsideAABB (U4DPoint3n &uPoint) |
Computes if 3D point is within the AABB. More... | |
U4DVector3n | getHalfWidth () |
Gets the halfwidth of the AABB. More... | |
bool | intersectionWithTriangle (U4DTriangle &uTriangle) |
determines intersection with triangle More... | |
bool | intersectionWithPlane (U4DPlane &uPlane) |
tests intersection with of AABB with plane More... | |
void | closestPointOnAABBToPoint (U4DPoint3n &uPoint, U4DPoint3n &uClosestPoint) |
Computes the closest point on the AABB to an specified point. More... | |
bool | aabbPlanePointLies (U4DPoint3n &uPoint, U4DPlane &uPlane) |
determines the aabb plane the point lies. Recall that the AABB contains 6 planes More... | |
Public Attributes | |
U4DPoint3n | minPoint |
Minimum 3D point location of the AABB. | |
U4DPoint3n | maxPoint |
Maximum 3D point location of the AABB. | |
The U4DAABB class implements a mathematical representation of an Axis-Aligned Bounding Box.
U4DEngine::U4DAABB::U4DAABB | ( | const U4DAABB & | a | ) |
Copy constructor for the class.
a | AABB to copy to |
bool U4DEngine::U4DAABB::aabbPlanePointLies | ( | U4DPoint3n & | uPoint, |
U4DPlane & | uPlane | ||
) |
determines the aabb plane the point lies. Recall that the AABB contains 6 planes
uPoint | point to determine in which plane it lies |
uPlane | plane where the given point lies |
void U4DEngine::U4DAABB::closestPointOnAABBToPoint | ( | U4DPoint3n & | uPoint, |
U4DPoint3n & | uClosestPoint | ||
) |
Computes the closest point on the AABB to an specified point.
uPoint | Point provided by the user |
uClosestPoint | Closest point to the provided point |
U4DPoint3n U4DEngine::U4DAABB::getCenter | ( | ) |
Gets the center point of the AABB.
U4DVector3n U4DEngine::U4DAABB::getHalfWidth | ( | ) |
Gets the halfwidth of the AABB.
U4DVector3n U4DEngine::U4DAABB::getLongestAABBDimensionVector | ( | ) |
Method which returns the longest dimension vector of the AABB.
U4DPoint3n U4DEngine::U4DAABB::getMaxPoint | ( | ) |
Method which returns the maximum 3D point of the AABB.
U4DPoint3n U4DEngine::U4DAABB::getMinPoint | ( | ) |
Method which returns the minimum 3D point of the AABB.
bool U4DEngine::U4DAABB::intersectionWithPlane | ( | U4DPlane & | uPlane | ) |
tests intersection with of AABB with plane
uPlane | plane to test intersection |
bool U4DEngine::U4DAABB::intersectionWithSegment | ( | U4DSegment & | uSegment | ) |
Compute if the AABB is intersecting with a segment.
uSegment | segment |
bool U4DEngine::U4DAABB::intersectionWithTriangle | ( | U4DTriangle & | uTriangle | ) |
determines intersection with triangle
uTriangle | triangle to test intersection |
bool U4DEngine::U4DAABB::intersectionWithVolume | ( | U4DAABB * | uAABB | ) |
Method which tests the intersection between two AABBs.
uAABB | AABB object to test intersection with |
bool U4DEngine::U4DAABB::intersectionWithVolume | ( | U4DSphere & | uSphere | ) |
Method which test an intersection between an AABB and a sphere.
uSphere | Sphere object to test intersection with |
bool U4DEngine::U4DAABB::intersectionWithVolume | ( | U4DSphere & | uSphere, |
U4DPoint3n & | uPoint | ||
) |
Method which test an intersection between an AABB and a sphere.
uSphere | Sphere object to test intersection with |
uPoint | point closest to intersection on AABB |
bool U4DEngine::U4DAABB::isPointInsideAABB | ( | U4DPoint3n & | uPoint | ) |
Computes if 3D point is within the AABB.
uPoint | 3D point |
Copy constructor for the class.
a | AABB to copy to |
void U4DEngine::U4DAABB::setLongestAABBDimensionVector | ( | U4DVector3n & | uLongestAABBDimensionVector | ) |
Method which sets the longest Dimension vector of the AABB.
uLongestAABBDimensionVector | Longest dimension vector of the AABB |
void U4DEngine::U4DAABB::setMaxPoint | ( | U4DPoint3n & | uMaxPoint | ) |
Method which sets the maximum 3D point location for the AABB.
uMaxPoint | Maximum 3D point location |
void U4DEngine::U4DAABB::setMinPoint | ( | U4DPoint3n & | uMinPoint | ) |
Method which sets the minimum 3D point location for the AABB.
uMinPoint | Minimum 3D point location |
float U4DEngine::U4DAABB::squareDistanceToPoint | ( | U4DPoint3n & | uPoint | ) |
Method which computes the square magnitude(distance) of a 3D point to the AABB.
uPoint | 3D point to compute square magnitude |