#include <Box.h>
Inheritance diagram for NSMath::TBox:
Public Member Functions | |
TBox (void) | |
Default constructor. | |
TBox (const TBox &box) | |
Create this box according to another box. | |
TBox (const TAABBox &aabb) | |
Create this box from given AABB. | |
TBox (const TSphere &sphere) | |
Create this box from given sphere. | |
const TVector3 & | GetCenter (void) const |
Returns center of this OBB. | |
const TVector3 & | GetExtents (void) const |
Returns extents of this OBB. | |
const TMatrix3 & | GetAxes (void) const |
Returns matrix that contains local axes of this OBB. | |
float | GetMinX (void) const |
Returns minimal X-coordinate contained inside this box. | |
float | GetMinY (void) const |
Returns minimal Y-coordinate contained inside this box. | |
float | GetMinZ (void) const |
Returns minimal Z-coordinate contained inside this box. | |
float | GetMaxX (void) const |
Returns maximal X-coordinate contained inside this box. | |
float | GetMaxY (void) const |
Returns maximal Y-coordinate contained inside this box. | |
float | GetMaxZ (void) const |
Returns maximal Z-coordinate contained inside this box. | |
void | GetMinXYZ (TVector3 &min) const |
Compute minimal X,Y and Z coordinates contained in this box and store it in parameter. | |
void | GetMaxXYZ (TVector3 &max) const |
Compute maximal X,Y and Z coordinates contained in this box and store it in parameter. | |
void | GetMinMaxXYZ (TVector3 &min, TVector3 &max) const |
Compute minimal and maximal X,Y and Z coordinates contained in this box and store it in parameters. | |
void | Set (const TBox &box) |
Set this OBB from another OBB. | |
void | SetFromPoints (const TVector3 *points, const DWORD &count) |
Set this box from array of points. | |
TPlane | GetPlaneLeft (void) const |
Returns left plane (side) of this box. | |
void | GetPlaneLeft (TPlane &res) const |
Returns left plane (side) of this box and store it in parameter. | |
TPlane | GetPlaneRight (void) const |
Returns right plane (side) of this box. | |
void | GetPlaneRight (TPlane &res) const |
Returns right plane (side) of this box and store it in parameter. | |
TPlane | GetPlaneFront (void) const |
Returns front plane (side) of this box. | |
void | GetPlaneFront (TPlane &res) const |
Returns front plane (side) of this box and store it in parameter. | |
TPlane | GetPlaneBack (void) const |
Returns front plane (side) of this box. | |
void | GetPlaneBack (TPlane &res) const |
Returns front plane (side) of this box and store it in parameter. | |
TPlane | GetPlaneBottom (void) const |
Returns bottom plane (side) of this box. | |
void | GetPlaneBottom (TPlane &res) const |
Returns bottom plane (side) of this box and store it in parameter. | |
TPlane | GetPlaneTop (void) const |
Returns top plane (side) of this box. | |
void | GetPlaneTop (TPlane &res) const |
Returns top plane (side) of this box and store it in parameter. | |
void | GetPointsAll (TVector3 points[8]) const |
Compute all corner points which define this box. | |
void | GetPointsAllRelativeTo (TVector3 points[8], const TVector3 &origin) const |
Compute all corner points which define this box. | |
void | GetPointsAllLocalSpace (TVector3 points[8]) const |
Compute all corner points which define this box. | |
void | GetPointsAllLocalSpaceRelativeTo (TVector3 points[8], const TVector3 &origin) const |
Compute all corner points which define this box. | |
TAABBox | ToAABBox (void) const |
Convert this box to AABB. | |
TSphere | ToSphere (void) const |
Convert this box to sphere. | |
void | Translate (const TVector3 &vec) |
Translate this box about specified vector. | |
void | Translate (const float &x, const float &y, const float &z) |
Translate this box about specified vector [x,y,z]. | |
void | RotateAroundOrigin (const TMatrix3 &rotate) |
Rotate this box around origin with specified rotation matrix. | |
void | RotateAroundOrigin (const TQuaternion &rotate) |
Rotate this box around origin with specified quaternion. | |
void | RotateAroundPoint (const TMatrix3 &rotate, const TVector3 &origin) |
Rotate this box around specified point ORIGIN with specified rotation matrix. | |
void | RotateAroundPoint (const TQuaternion &rotate, const TVector3 &origin) |
Rotate this box around specified point ORIGIN with specified quaternion. | |
void | RotateAroundX (const float &angle) |
Rotate this box around X-axis about specified angle in radians. | |
void | RotateAroundY (const float &angle) |
Rotate this box around Y-axis about specified angle in radians. | |
void | RotateAroundZ (const float &angle) |
Rotate this box around Z-axis about specified angle in radians. | |
void | RotateAroundXSinCos (const float &tsin, const float &tcos) |
Rotate this box around X-axis about specified angle that sinus and cosinus are contained in parameters. | |
void | RotateAroundYSinCos (const float &tsin, const float &tcos) |
Rotate this box around Y-axis about specified angle that sinus and cosinus are contained in parameters. | |
void | RotateAroundZSinCos (const float &tsin, const float &tcos) |
Rotate this box around Z-axis about specified angle that sinus and cosinus are contained in parameters. | |
void | MoveTo (const TVector3 &vec) |
Move center of this box to specified position. | |
void | MoveTo (const float &x, const float &y, const float &z) |
Move center of this box to specified position [x,y,z]. | |
void | ScaleFromCenter (const float &scale) |
Scale this box about specified value from center. | |
float | DistanceSurface (const TVector3 &vec) const |
Compute smallest distance between given point and surface of this box. | |
float | DistanceSurfaceSquare (const TVector3 &vec) const |
Compute square of smallest distance between given point and surface of this box. | |
float | Width (void) const |
Returns width of this box. | |
float | Length (void) const |
Returns length of this box. | |
float | Height (void) const |
Returns height of this box. | |
float | Radius (void) const |
Compute radius of circumsphere of this box. | |
float | RadiusSquare (void) const |
Compute square of radius of circumsphere of this box. | |
float | RadiusInner (void) const |
Compute radius of inner sphere of this box. | |
float | RadiusInnerSquare (void) const |
Compute square of radius of inner sphere of this box. | |
float | Surface (void) const |
Compute surface of this box. | |
float | Volume (void) const |
Compute volume of this box. | |
BOOL | AddPoint (const TVector3 &vec) |
"Add" specified points to this box. | |
TVector3 | ToBoxSpaceGet (const TVector3 &vec) const |
Convert given point from world space to box space. | |
TVector3 | ToBoxSpaceGet (const float &x, const float &y, const float &z) const |
Convert given point [x,y,z] from world space to box space. | |
void | ToBoxSpace (TVector3 &vec) const |
Convert given point from world space to box space and result store in the same vector. | |
void | ToBoxSpace (float &x, float &y, float &z) const |
Convert given point [x,y,z] from world space to box space and result store in coordinates of input point. | |
TVector3 | ToBoxSpaceAsVectorGet (const TVector3 &vec) const |
Convert given vector from world space to box space and return new vector as result. | |
TVector3 | ToBoxSpaceAsVectorGet (const float &x, const float &y, const float &z) const |
Convert given vector [x,y,z] from world space to box space and return new vector as result. | |
void | ToBoxSpaceAsVector (TVector3 &vec) const |
Convert given vector from world space to box space and return store in this vector. | |
void | ToBoxSpaceAsVector (float &x, float &y, float &z) const |
Convert given vector [x,y,z] from world space to box space and return store in input parameters. | |
TVector3 | FromBoxSpaceGet (const TVector3 &vec) const |
Transform given point from box space to world space. | |
TVector3 | FromBoxSpaceGet (const float &x, const float &y, const float &z) const |
Transform given point [x,y,z] from box space to world space. | |
void | FromBoxSpace (TVector3 &vec) const |
Transform given point from box space to world space. | |
void | FromBoxSpace (float &x, float &y, float &z) const |
Transform given point [x,y,z] from box space to world space and result store in input parameters. | |
TVector3 | FromBoxSpaceAsVectorGet (const TVector3 &vec) const |
Convert given vector from box space to world space and return result as new vector. | |
TVector3 | FromBoxSpaceAsVectorGet (const float &x, const float &y, const float &z) const |
Convert given vector [x,y,z] from box space to world space and return result as new vector. | |
void | FromBoxSpaceAsVector (TVector3 &vec) const |
Convert given vector from box space to world space and result store in parameter. | |
void | FromBoxSpaceAsVector (float &x, float &y, float &z) const |
Convert given vector [x,y,z] from box space to world space and result stores in parameters. | |
float | ProjectExtentsToAxis (const TVector3 &axisDir) const |
This method projects extents to specified axis represented by given normalized directional vector. | |
float | ProjectExtentsToX (void) const |
Project extents to X-axis. | |
float | ProjectExtentsToY (void) const |
Project extents to Y-axis. | |
float | ProjectExtentsToZ (void) const |
Project extents to Z-axis. | |
void | ProjectToAxis (const TVector3 &axisDir, float &timeMin, float &timeMax) const |
This method projects box to specified axis determined only directional vector (thus axis goes through origin of space. | |
void | ProjectToLine (const TLine &line, float &timeMin, float &timeMax) const |
This method projects box to specified line. | |
void | ProjectToLineSegment (const TLineSegment &seg, float &timeMin, float &timeMax) const |
This method projects box to specified line segment. | |
void | ProjectToLineSegmentNormalized (const TLineSegment &seg, float &timeMin, float &timeMax) const |
This method projects box to specified line segment in NORMALIZED coordinated!!! | |
void | ProjectToRay (const TRay &ray, float &timeMin, float &timeMax) const |
This method projects box to specified ray. | |
BOOL | Compare (const TBox &box) const |
Compare this box with another box with default tolerancy for object components. | |
BOOL | Compare (const TBox &box, const float &delta) const |
Compare this box with another box with given tolerancy for object components. | |
BOOL | ComparePrecise (const TBox &box) const |
Compare this box with another box very precisly (bit to bit). | |
BOOL | IsInside (const TVector3 &vec) const |
This method determines whether given point is inside of this box. | |
BOOL | IsInside (const TBox &box) const |
This method determines whether given OBB is entire inside of this box. | |
BOOL | IsInside (const TAABBox &aabb) const |
This method determines whether specified AABB is entire contained inside of this box. | |
BOOL | IsInside (const TSphere &sphere) const |
This method determines whether specified sphere is entire contained inside of this box. | |
BOOL | IsIntersect (const TLineSegment &seg) const |
This method determines whether given line segment intersects this box. | |
BOOL | IsIntersect (const TVector3 &start, const TVector3 &end) const |
This method determines whether line segment specified by two points intersects this box. | |
BOOL | IsIntersect (const TRay &ray) const |
This method determines if specified ray intersects this box. | |
BOOL | IsIntersect (const TLine &line) const |
This method determines if specified line intersects this box. | |
BOOL | IsIntersect (const TPlane &plane) const |
This method determines whether given plane intersects this box. | |
BOOL | IsIntersect (const TSphere &sphere) const |
This method determines whether given sphere has intersection with this box. | |
BOOL | IsIntersect (const TAABBox &aabb) const |
This method determines whether given AABB has intersection with this box. | |
BOOL | IsIntersect (const TBox &box) const |
This method determines whether given box intersects this box. | |
TBox & | operator= (const TBox &box) |
Assignment operator. | |
BOOL | operator== (const TBox &box) const |
Compare two boxes with default tolerancy. | |
BOOL | operator!= (const TBox &box) const |
Compare two boxes with default tolerancy. | |
TBox & | operator+= (const TVector3 &vec) |
Move this box about specified vector. | |
TBox & | operator-= (const TVector3 &vec) |
Move this box about specified vector in inverse direction. |
This class represents oriented bounding box (OBB) in 3D.
It is represented via position of center, extents (half of width, length and height) and three local axes stored inside 3x3 matrix.
Matrix with local axes is stored in COLUMN-MAJOR ORDER !!!
Definition at line 59 of file Box.h.
|
Default constructor. Create box with center = [0,0,0], extents = [0.5,0.5,0.5] and axes identical with principal axes X,Y and Z. |
|
Create this box according to another box.
Definition at line 267 of file Box.h. References Set(). Here is the call graph for this function: ![]() |
|
Create this box from given AABB.
|
|
Create this box from given sphere.
|
|
"Add" specified points to this box. If added point is outside box then box is expanded and TRUE is returned.
Definition at line 1059 of file Box.h. References NSMath::TVector3::Add(), NSMath::NSStdMath::exp(), NSMath::NSStdMath::fabs(), FALSE, FromBoxSpaceGet(), ToBoxSpaceGet(), TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Compare this box with another box with given tolerancy for object components.
Definition at line 1560 of file Box.h. References NSMath::TMatrix3::Compare(), NSMath::TVector3::Compare(), DBGASSERT_MATHLOW, m_axes, m_center, and m_extents. Here is the call graph for this function: ![]() |
|
Compare this box with another box with default tolerancy for object components.
Definition at line 1547 of file Box.h. References NSMath::TMatrix3::Compare(), NSMath::TVector3::Compare(), m_axes, m_center, and m_extents. Referenced by operator!=(), and operator==(). Here is the call graph for this function: ![]() |
|
Compare this box with another box very precisly (bit to bit).
Definition at line 1574 of file Box.h. References NSMath::TMatrix3::ComparePrecise(), NSMath::TVector3::ComparePrecise(), m_axes, m_center, and m_extents. Here is the call graph for this function: ![]() |
|
Compute smallest distance between given point and surface of this box.
Definition at line 916 of file Box.h. References NSMath::NSStdMath::sqrt(). Here is the call graph for this function: ![]() |
|
Compute square of smallest distance between given point and surface of this box.
Definition at line 929 of file Box.h. References NSMath::TVector3::AbsoluteGet(), ToBoxSpaceGet(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by IsIntersect(). Here is the call graph for this function: ![]() |
|
Transform given point [x,y,z] from box space to world space and result store in input parameters.
Definition at line 1296 of file Box.h. References NSMath::TMatrix3::Transform(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Transform given point from box space to world space.
Definition at line 1279 of file Box.h. References NSMath::TMatrix3::Transform(). Here is the call graph for this function: ![]() |
|
Convert given vector [x,y,z] from box space to world space and result stores in parameters.
Definition at line 1352 of file Box.h. References NSMath::TMatrix3::Transform(). Here is the call graph for this function: ![]() |
|
Convert given vector from box space to world space and result store in parameter.
Definition at line 1338 of file Box.h. References NSMath::TMatrix3::Transform(). Here is the call graph for this function: ![]() |
|
Convert given vector [x,y,z] from box space to world space and return result as new vector.
Definition at line 1326 of file Box.h. References NSMath::TMatrix3::TransformTo(). Here is the call graph for this function: ![]() |
|
Convert given vector from box space to world space and return result as new vector.
Definition at line 1312 of file Box.h. References NSMath::TMatrix3::TransformTo(). Here is the call graph for this function: ![]() |
|
Transform given point [x,y,z] from box space to world space.
Definition at line 1267 of file Box.h. References NSMath::TMatrix3::TransformTo(). Here is the call graph for this function: ![]() |
|
Transform given point from box space to world space.
Definition at line 1253 of file Box.h. References NSMath::TMatrix3::TransformTo(). Referenced by AddPoint(), GetPlaneBack(), GetPlaneBottom(), GetPlaneFront(), GetPlaneLeft(), GetPlaneRight(), GetPlaneTop(), and GetPointsAll(). Here is the call graph for this function: ![]() |
|
Returns matrix that contains local axes of this OBB.
|
|
Returns center of this OBB.
Definition at line 276 of file Box.h. Referenced by IsIntersect(), NSMath::TPlane::IsNegative(), and NSMath::TPlane::IsPositive(). |
|
Returns extents of this OBB.
|
|
Returns maximal X-coordinate contained inside this box.
Definition at line 332 of file Box.h. References ProjectExtentsToX(), and NSMath::TVector3::x. Here is the call graph for this function: ![]() |
|
Compute maximal X,Y and Z coordinates contained in this box and store it in parameter.
Definition at line 372 of file Box.h. References ProjectExtentsToX(), ProjectExtentsToY(), ProjectExtentsToZ(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Returns maximal Y-coordinate contained inside this box.
Definition at line 341 of file Box.h. References ProjectExtentsToY(), and NSMath::TVector3::y. Here is the call graph for this function: ![]() |
|
Returns maximal Z-coordinate contained inside this box.
Definition at line 350 of file Box.h. References ProjectExtentsToZ(), and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Compute minimal and maximal X,Y and Z coordinates contained in this box and store it in parameters.
Definition at line 385 of file Box.h. References ProjectExtentsToX(), ProjectExtentsToY(), ProjectExtentsToZ(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by NSMath::TAABBox::IsInside(), and NSMath::TAABBox::TAABBox(). Here is the call graph for this function: ![]() |
|
Returns minimal X-coordinate contained inside this box.
Definition at line 305 of file Box.h. References ProjectExtentsToX(), and NSMath::TVector3::x. Here is the call graph for this function: ![]() |
|
Compute minimal X,Y and Z coordinates contained in this box and store it in parameter.
Definition at line 360 of file Box.h. References ProjectExtentsToX(), ProjectExtentsToY(), ProjectExtentsToZ(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Returns minimal Y-coordinate contained inside this box.
Definition at line 314 of file Box.h. References ProjectExtentsToY(), and NSMath::TVector3::y. Here is the call graph for this function: ![]() |
|
Returns minimal Z-coordinate contained inside this box.
Definition at line 323 of file Box.h. References ProjectExtentsToZ(), and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Returns front plane (side) of this box and store it in parameter.
Definition at line 514 of file Box.h. References FromBoxSpaceGet(), NSMath::TMatrix3::GetRow(), and NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns front plane (side) of this box.
Definition at line 503 of file Box.h. References FromBoxSpaceGet(), and NSMath::TMatrix3::GetRow(). Here is the call graph for this function: ![]() |
|
Returns bottom plane (side) of this box and store it in parameter.
Definition at line 534 of file Box.h. References FromBoxSpaceGet(), NSMath::TMatrix3::GetRow(), and NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns bottom plane (side) of this box.
Definition at line 523 of file Box.h. References FromBoxSpaceGet(), and NSMath::TMatrix3::GetRow(). Here is the call graph for this function: ![]() |
|
Returns front plane (side) of this box and store it in parameter.
Definition at line 494 of file Box.h. References FromBoxSpaceGet(), NSMath::TMatrix3::GetRow(), and NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns front plane (side) of this box.
Definition at line 483 of file Box.h. References FromBoxSpaceGet(), and NSMath::TMatrix3::GetRow(). Here is the call graph for this function: ![]() |
|
Returns left plane (side) of this box and store it in parameter.
Definition at line 454 of file Box.h. References FromBoxSpaceGet(), NSMath::TMatrix3::GetRow(), and NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns left plane (side) of this box.
Definition at line 443 of file Box.h. References FromBoxSpaceGet(), and NSMath::TMatrix3::GetRow(). Here is the call graph for this function: ![]() |
|
Returns right plane (side) of this box and store it in parameter.
Definition at line 474 of file Box.h. References FromBoxSpaceGet(), NSMath::TMatrix3::GetRow(), and NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns right plane (side) of this box.
Definition at line 463 of file Box.h. References FromBoxSpaceGet(), and NSMath::TMatrix3::GetRow(). Here is the call graph for this function: ![]() |
|
Returns top plane (side) of this box and store it in parameter.
Definition at line 554 of file Box.h. References FromBoxSpaceGet(), NSMath::TMatrix3::GetRow(), and NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns top plane (side) of this box.
Definition at line 543 of file Box.h. References FromBoxSpaceGet(), and NSMath::TMatrix3::GetRow(). Here is the call graph for this function: ![]() |
|
Compute all corner points which define this box. Points are stored in array in this order: FLB,FLT,FRT,FRB,BLB,BLT,BRT,BRB It is encoded in format <FRONT|BACK><LEFT|RIGHT><TOP|BOTTOM>
Definition at line 569 of file Box.h. References FromBoxSpaceGet(), NSMath::TVector3::Set(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetPointsAllRelativeTo(). Here is the call graph for this function: ![]() |
|
Compute all corner points which define this box. Points are in box space. Points are stored in array in this order: FLB,FLT,FRT,FRB,BLB,BLT,BRT,BRB It is encoded in format <FRONT|BACK><LEFT|RIGHT><TOP|BOTTOM>
Definition at line 631 of file Box.h. References NSMath::TVector3::Set(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetPointsAllLocalSpaceRelativeTo(). Here is the call graph for this function: ![]() |
|
Compute all corner points which define this box. Points are in box space relative to given point ORIGIN that is also in box space. Points are stored in array in this order: FLB,FLT,FRT,FRB,BLB,BLT,BRT,BRB It is encoded in format <FRONT|BACK><LEFT|RIGHT><TOP|BOTTOM>
Definition at line 664 of file Box.h. References GetPointsAllLocalSpace(). Referenced by NSMath::TSphere::IsInside(). Here is the call graph for this function: ![]() |
|
Compute all corner points which define this box. Points are in coordinate system related to given point ORIGIN.
FLB,FLT,FRT,FRB,BLB,BLT,BRT,BRB It is encoded in format <FRONT|BACK><LEFT|RIGHT><TOP|BOTTOM>
Definition at line 606 of file Box.h. References GetPointsAll(). Here is the call graph for this function: ![]() |
|
Returns height of this box.
Definition at line 980 of file Box.h. References NSMath::TVector3::z. |
|
This method determines whether specified sphere is entire contained inside of this box.
Definition at line 94 of file Box.cpp. References NSMath::TVector3::Dot(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TSphere::GetCenter(), NSMath::TVector3::GetItem(), NSMath::TSphere::GetRadius(), NSMath::TMatrix3::GetRow(), and ToBoxSpaceGet(). Here is the call graph for this function: ![]() |
|
This method determines whether specified AABB is entire contained inside of this box.
Definition at line 65 of file Box.cpp. References NSMath::TAABBox::Center(), NSMath::TVector3::Dot(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TVector3::GetItem(), NSMath::TMatrix3::GetRow(), NSMath::TAABBox::ProjectExtentsToAxis(), and ToBoxSpaceGet(). Here is the call graph for this function: ![]() |
|
This method determines whether given OBB is entire inside of this box.
Definition at line 1601 of file Box.h. References NSMath::TVector3::Dot(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TVector3::GetItem(), NSMath::TMatrix3::GetRow(), m_center, ProjectExtentsToAxis(), and ToBoxSpaceGet(). Here is the call graph for this function: ![]() |
|
This method determines whether given point is inside of this box.
Definition at line 1588 of file Box.h. References ToBoxSpaceGet(). Here is the call graph for this function: ![]() |
|
This method determines whether given box intersects this box.
Definition at line 527 of file Box.cpp. References NSMath::TVector3::AbsoluteGet(), NSMath::TVector3::Cross(), NSMath::NSStdMath::fabs(), FALSE, GetCenter(), NSMath::TMatrix3::GetRow(), m_axes, m_extents, ProjectExtentsToAxis(), ToBoxSpaceAsVectorGet(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method determines whether given AABB has intersection with this box.
Definition at line 367 of file Box.cpp. References NSMath::TAABBox::Center(), NSMath::TVector3::Cross(), NSMath::TVector3::Dot(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TMatrix3::GetRow(), NSMath::TAABBox::Height(), NSMath::TAABBox::Length(), ProjectExtentsToAxis(), NSMath::TAABBox::ProjectExtentsToAxis(), ProjectExtentsToX(), ProjectExtentsToY(), ProjectExtentsToZ(), ToBoxSpaceGet(), NSMath::TAABBox::Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method determines whether given sphere has intersection with this box.
Definition at line 355 of file Box.cpp. References DistanceSurfaceSquare(), NSMath::TSphere::GetCenter(), and NSMath::TSphere::GetRadiusSquare(). Here is the call graph for this function: ![]() |
|
This method determines whether given plane intersects this box.
Definition at line 1629 of file Box.h. References NSMath::TPlane::AbsDistance(), NSMath::TPlane::GetNormal(), and ProjectExtentsToAxis(). Here is the call graph for this function: ![]() |
|
This method determines if specified line intersects this box.
Definition at line 300 of file Box.cpp. References NSMath::TVector3::Cross(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TLine::GetPoint(), NSMath::TLine::GetVector(), ToBoxSpaceAsVectorGet(), ToBoxSpaceGet(), TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method determines if specified ray intersects this box.
Definition at line 213 of file Box.cpp. References NSMath::NSStdMath::fabs(), FALSE, NSMath::TRay::GetStart(), NSMath::TRay::GetVector(), ToBoxSpaceAsVectorGet(), ToBoxSpaceGet(), TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method determines whether line segment specified by two points intersects this box.
Definition at line 132 of file Box.cpp. References NSMath::TVector3::Cross(), NSMath::NSStdMath::fabs(), FALSE, ToBoxSpaceGet(), TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method determines whether given line segment intersects this box.
Definition at line 121 of file Box.cpp. References NSMath::TLineSegment::GetEnd(), and NSMath::TLineSegment::GetStart(). Referenced by NSMath::TSphere::IsIntersect(), and NSMath::TAABBox::IsIntersect(). Here is the call graph for this function: ![]() |
|
Returns length of this box.
Definition at line 971 of file Box.h. References NSMath::TVector3::y. |
|
Move center of this box to specified position [x,y,z].
Definition at line 892 of file Box.h. References NSMath::TVector3::Set(). Here is the call graph for this function: ![]() |
|
Move center of this box to specified position.
|
|
Compare two boxes with default tolerancy.
Definition at line 1667 of file Box.h. References Compare(). Here is the call graph for this function: ![]() |
|
Move this box about specified vector.
|
|
Move this box about specified vector in inverse direction.
|
|
Assignment operator.
Definition at line 1647 of file Box.h. References Set(). Here is the call graph for this function: ![]() |
|
Compare two boxes with default tolerancy.
Definition at line 1658 of file Box.h. References Compare(). Here is the call graph for this function: ![]() |
|
This method projects extents to specified axis represented by given normalized directional vector.
Definition at line 1365 of file Box.h. References DBGASSERT_MATH, NSMath::TMatrix3::DotRow0(), NSMath::TMatrix3::DotRow1(), NSMath::TMatrix3::DotRow2(), NSMath::NSStdMath::fabs(), NSMath::TVector3::IsNormalized(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by IsInside(), IsIntersect(), NSMath::TPlane::IsNegative(), NSMath::TPlane::IsPositive(), ProjectToAxis(), ProjectToLine(), ProjectToLineSegment(), ProjectToLineSegmentNormalized(), and ProjectToRay(). Here is the call graph for this function: ![]() |
|
Project extents to X-axis.
Definition at line 1379 of file Box.h. References NSMath::NSStdMath::fabs(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetMaxX(), GetMaxXYZ(), GetMinMaxXYZ(), GetMinX(), GetMinXYZ(), and IsIntersect(). Here is the call graph for this function: ![]() |
|
Project extents to Y-axis.
Definition at line 1391 of file Box.h. References NSMath::NSStdMath::fabs(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetMaxXYZ(), GetMaxY(), GetMinMaxXYZ(), GetMinXYZ(), GetMinY(), and IsIntersect(). Here is the call graph for this function: ![]() |
|
Project extents to Z-axis.
Definition at line 1403 of file Box.h. References NSMath::NSStdMath::fabs(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetMaxXYZ(), GetMaxZ(), GetMinMaxXYZ(), GetMinXYZ(), GetMinZ(), and IsIntersect(). Here is the call graph for this function: ![]() |
|
This method projects box to specified axis determined only directional vector (thus axis goes through origin of space. Method computes time values which bound projection of box to axis. You can use these time values to compute point of projection simply via ORIGIN + DIR * TIME where ORIGIN = [0,0,0].
Definition at line 1422 of file Box.h. References NSMath::TVector3::Dot(), and ProjectExtentsToAxis(). Here is the call graph for this function: ![]() |
|
This method projects box to specified line. Method computes time values which bound projection of AABB to line. You can use these time values to compute point of projection simply via ORIGIN + DIR * TIME. Time t==0 is returned for points "above" line definition point.
Definition at line 1445 of file Box.h. References NSMath::TLine::GetVector(), ProjectExtentsToAxis(), and NSMath::TLine::Time(). Here is the call graph for this function: ![]() |
|
This method projects box to specified line segment. Method computes time values which bound projection of box to line segment. You can use these time values to compute point of projection simply via ORIGIN + DIR * SEG_LENGTH * TIME. Time t==0 is returned for points "above" start of line segment. Time t==1 is returned for points "above" end of line segment.
Definition at line 1469 of file Box.h. References NSMath::TLineSegment::GetVector(), NSMath::TLineSegment::InvLength(), ProjectExtentsToAxis(), and NSMath::TLineSegment::TimeNormalized(). Here is the call graph for this function: ![]() |
|
This method projects box to specified line segment in NORMALIZED coordinated!!! Method computes time values which bound projection of box to line segment. You can use these time values to compute point of projection simply via ORIGIN + DIR * TIME. Time t==0 is returned for points "above" start of line segment.
Definition at line 1504 of file Box.h. References NSMath::TLineSegment::GetVector(), ProjectExtentsToAxis(), and NSMath::TLineSegment::TimeNormalized(). Here is the call graph for this function: ![]() |
|
This method projects box to specified ray. Method computes time values which bound projection of box to ray. You can use these time values to compute point of projection simply via ORIGIN + DIR * TIME. Time t==0 is returned for points "above" start of ray.
Definition at line 1531 of file Box.h. References NSMath::TRay::GetVector(), ProjectExtentsToAxis(), and NSMath::TRay::Time(). Here is the call graph for this function: ![]() |
|
Compute radius of circumsphere of this box.
Definition at line 987 of file Box.h. References NSMath::TVector3::Length(). Here is the call graph for this function: ![]() |
|
Compute radius of inner sphere of this box.
Definition at line 1003 of file Box.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Compute square of radius of inner sphere of this box.
Definition at line 1016 of file Box.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Compute square of radius of circumsphere of this box.
Definition at line 994 of file Box.h. References NSMath::TVector3::LengthSq(). Referenced by NSMath::TSphere::TSphere(). Here is the call graph for this function: ![]() |
|
Rotate this box around origin with specified quaternion.
Definition at line 725 of file Box.h. References NSMath::TMatrix3::GetRow(), and NSMath::TQuaternion::Transform(). Here is the call graph for this function: ![]() |
|
Rotate this box around origin with specified rotation matrix.
Definition at line 704 of file Box.h. References NSMath::TMatrix3::GetRow(), NSMath::TMatrix3::MulRight(), and NSMath::TMatrix3::Transform(). Here is the call graph for this function: ![]() |
|
Rotate this box around specified point ORIGIN with specified quaternion.
Definition at line 765 of file Box.h. References NSMath::TMatrix3::GetRow(), NSMath::TQuaternion::Transform(), and NSMath::TQuaternion::TransformTo(). Here is the call graph for this function: ![]() |
|
Rotate this box around specified point ORIGIN with specified rotation matrix.
Definition at line 741 of file Box.h. References NSMath::TMatrix3::GetRow(), NSMath::TMatrix3::MulRight(), and NSMath::TMatrix3::Transform(). Here is the call graph for this function: ![]() |
|
Rotate this box around X-axis about specified angle in radians. Angle is measured in counter-clockwise order when you look along X-axis towards origin.
Definition at line 784 of file Box.h. References NSMath::TMatrix3::GetRow(), NSMath::TVector3::RotateXSinCos(), and NSMath::NSStdMath::sincos(). Here is the call graph for this function: ![]() |
|
Rotate this box around X-axis about specified angle that sinus and cosinus are contained in parameters.
Definition at line 838 of file Box.h. References NSMath::TMatrix3::GetRow(), and NSMath::TVector3::RotateXSinCos(). Here is the call graph for this function: ![]() |
|
Rotate this box around Y-axis about specified angle in radians. Angle is measured in counter-clockwise order when you look along Y-axis towards origin.
Definition at line 802 of file Box.h. References NSMath::TMatrix3::GetRow(), NSMath::TVector3::RotateYSinCos(), and NSMath::NSStdMath::sincos(). Here is the call graph for this function: ![]() |
|
Rotate this box around Y-axis about specified angle that sinus and cosinus are contained in parameters.
Definition at line 853 of file Box.h. References NSMath::TMatrix3::GetRow(), and NSMath::TVector3::RotateYSinCos(). Here is the call graph for this function: ![]() |
|
Rotate this box around Z-axis about specified angle in radians. Angle is measured in counter-clockwise order when you look along Z-axis towards origin.
Definition at line 820 of file Box.h. References NSMath::TMatrix3::GetRow(), NSMath::TVector3::RotateZSinCos(), and NSMath::NSStdMath::sincos(). Here is the call graph for this function: ![]() |
|
Rotate this box around Z-axis about specified angle that sinus and cosinus are contained in parameters.
Definition at line 868 of file Box.h. References NSMath::TMatrix3::GetRow(), and NSMath::TVector3::RotateZSinCos(). Here is the call graph for this function: ![]() |
|
Scale this box about specified value from center.
Definition at line 903 of file Box.h. References DBGASSERT_MATH. |
|
Set this OBB from another OBB.
Definition at line 407 of file Box.h. References m_axes, m_center, and m_extents. Referenced by operator=(), and TBox(). |
|
Set this box from array of points.
Definition at line 421 of file Box.h. References DBGASSERT_MATH, DBGASSERT_MATHLOW, NSMath::TMathCPU::FindMinMax(), TGlobalsMath::GetCPU(), and NSMath::TMatrix3::Identity(). Here is the call graph for this function: ![]() |
|
Compute surface of this box.
Definition at line 1027 of file Box.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Convert this box to AABB.
|
|
Convert given point [x,y,z] from world space to box space and result store in coordinates of input point.
Definition at line 1185 of file Box.h. References NSMath::TMatrix3::TransformInverse(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Convert given point from world space to box space and result store in the same vector.
Definition at line 1168 of file Box.h. References NSMath::TMatrix3::TransformInverse(). Here is the call graph for this function: ![]() |
|
Convert given vector [x,y,z] from world space to box space and return store in input parameters.
Definition at line 1241 of file Box.h. References NSMath::TMatrix3::TransformInverse(). Here is the call graph for this function: ![]() |
|
Convert given vector from world space to box space and return store in this vector.
Definition at line 1226 of file Box.h. References NSMath::TMatrix3::TransformInverse(). Here is the call graph for this function: ![]() |
|
Convert given vector [x,y,z] from world space to box space and return new vector as result.
Definition at line 1215 of file Box.h. References ToBoxSpaceAsVectorGet(). Here is the call graph for this function: ![]() |
|
Convert given vector from world space to box space and return new vector as result.
Definition at line 1201 of file Box.h. References NSMath::TMatrix3::TransformInverseTo(). Referenced by IsIntersect(), and ToBoxSpaceAsVectorGet(). Here is the call graph for this function: ![]() |
|
Convert given point [x,y,z] from world space to box space.
Definition at line 1156 of file Box.h. References NSMath::TMatrix3::TransformInverseTo(). Here is the call graph for this function: ![]() |
|
Convert given point from world space to box space.
Definition at line 1142 of file Box.h. References NSMath::TMatrix3::TransformInverseTo(). Referenced by AddPoint(), DistanceSurfaceSquare(), NSMath::TSphere::IsInside(), IsInside(), and IsIntersect(). Here is the call graph for this function: ![]() |
|
Convert this box to sphere.
|
|
Translate this box about specified vector [x,y,z].
Definition at line 695 of file Box.h. References NSMath::TVector3::Add(). Here is the call graph for this function: ![]() |
|
Translate this box about specified vector.
|
|
Compute volume of this box.
Definition at line 1047 of file Box.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Returns width of this box.
Definition at line 962 of file Box.h. References NSMath::TVector3::x. |