#include <AABBox.h>
Inheritance diagram for NSMath::TAABBox:
Public Member Functions | |
TAABBox (void) | |
Creates AABB with points [0,0,0] - [1,1,1]. | |
TAABBox (const TAABBox &aabb) | |
Copy constructor. | |
TAABBox (const TVector3 &lb, const TVector3 &rt) | |
Create this AABB from two points. | |
TAABBox (const TVector3 &p1, const TVector3 &p2, bool) | |
Create this AABB from two arbitrary points. | |
TAABBox (const TVector3 &lb, const float &widthX, const float &lengthY, const float &heightZ) | |
Create this AABB from left-bottom point and width, length and height. | |
TAABBox (const TSphere &sphere) | |
Create box from sphere. | |
TAABBox (const TBox &box) | |
Create box from OBB. | |
const TVector3 & | GetLB (void) const |
Returns left-bottom point from this AABB. | |
const TVector3 & | GetRT (void) const |
Returns right-top point from this AABB. | |
float | GetMinX (void) const |
Returns minimal X-coordinate that exists in this box. | |
float | GetMinY (void) const |
Returns minimal Y-coordinate that exists in this box. | |
float | GetMinZ (void) const |
Returns minimal Z-coordinate that exists in this box. | |
float | GetMaxX (void) const |
Returns maximal X-coordinate that exists in this box. | |
float | GetMaxY (void) const |
Returns maximal Y-coordinate that exists in this box. | |
float | GetMaxZ (void) const |
Returns maximal Z-coordinate that exists in this box. | |
void | GetMinXYZ (TVector3 &cmin) const |
Return minimal coordinates contained inside this box. | |
void | GetMaxXYZ (TVector3 &cmax) const |
Return maximal coordinates contained inside this box. | |
void | GetMinMaxXYZ (TVector3 &cmin, TVector3 &cmax) const |
Return minimal and maximal coordinates contained inside this box. | |
void | Set (const TAABBox &aabb) |
Set this box according to another box. | |
void | Set (const TVector3 &lb, const TVector3 &rt) |
Set this AABB from two points. | |
void | Set (const TVector3 &lb, const float &widthX, const float &lengthY, const float &heightZ) |
Set this AABB from left-bottom point and width, length and height. | |
void | SetFromPoints (const TVector3 &p1, const TVector3 &p2) |
This method sets AABB from two points. | |
void | SetFromPoints (const TVector3 *points, const DWORD &count) |
Set this box from array of points. | |
TPlane | GetPlaneLeft (void) const |
Returns left plane of this AABB. | |
void | GetPlaneLeft (TPlane &res) const |
Compute left plane of this AABB and store it in parameter. | |
TPlane | GetPlaneRight (void) const |
Returns right plane of this AABB. | |
void | GetPlaneRight (TPlane &res) const |
Compute right plane of this AABB and store it in parameter. | |
TPlane | GetPlaneFront (void) const |
Returns front plane of this AABB. | |
void | GetPlaneFront (TPlane &res) const |
Compute front plane of this AABB and store it in parameter. | |
TPlane | GetPlaneBack (void) const |
Returns back plane of this AABB. | |
void | GetPlaneBack (TPlane &res) const |
Compute back plane of this AABB and store it in parameter. | |
TPlane | GetPlaneBottom (void) const |
Returns bottom plane of this AABB. | |
void | GetPlaneBottom (TPlane &res) const |
Compute bottom plane of this AABB and store it in parameter. | |
TPlane | GetPlaneTop (void) const |
Returns top plane of this AABB. | |
void | GetPlaneTop (TPlane &res) const |
Compute top plane of this AABB and store it in parameter. | |
void | GetPointsAll (TVector3 points[8]) const |
Method creates and return all points which represent this AABB. | |
void | GetPointsAllRelativeTo (TVector3 points[8], const TVector3 &origin) const |
Method creates and return all points which represent this AABB. | |
void | GetPointsRequired (TVector3 points[6]) const |
Method creates and return required points which represent this AABB. | |
void | GetPointsRequiredRelativeTo (TVector3 points[6], const TVector3 &origin) const |
Method creates and return required points which represent this AABB. | |
TBox | ToBox (void) const |
Convert this box to OBB. | |
TSphere | ToSphere (void) const |
Convert this box to sphere. | |
void | Translate (const TVector3 &vec) |
Translate this AABB about specified vector. | |
void | Translate (const float &x, const float &y, const float &z) |
Translate this AABB about specified vector [x,y,z]. | |
void | MoveToLB (const TVector3 &vec) |
Translate this AABB to position where LEFT-BOTTOM point will have coordinates VEC. | |
void | MoveToLB (const float &x, const float &y, const float &z) |
Translate this AABB to position where LEFT-BOTTOM point will have coordinates [x,y,z]. | |
void | ScaleFromCenter (const float &scale) |
Scale this AABB from center thus all definition point will be moved. | |
void | ScaleFromLB (const float &scale) |
Scale this AABB from left-bottom corner thus this point will not change. | |
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 |
Compute width - size in X-axis. | |
float | Length (void) const |
Compute length - size in Y-axis. | |
float | Height (void) const |
Compute height - size in Z-axis. | |
TVector3 | Extents (void) const |
Compute extents of this box. | |
TVector3 | Center (void) const |
Compute center of this AABB. | |
float | Radius (void) const |
Compute radius of this AABB. | |
float | RadiusSquare (void) const |
Compute square of radius of this AABB. | |
float | RadiusInner (void) const |
Compute inner radius of this AABB. | |
float | RadiusInnerSquare (void) const |
Compute square of inner radius of this AABB. | |
float | Surface (void) const |
Compute surface area of this box. | |
float | Volume (void) const |
Compute volume of this box. | |
BOOL | AddPoint (const TVector3 &vec) |
"Add" point to this box and if point don't belong to this box then is box expanded. | |
BOOL | AddAABBox (const TAABBox &aabb) |
"Add" another AABB to this box and expand this box if second box don't belongs entire into this box. | |
float | ProjectExtentsToAxis (const TVector3 &axisDir) const |
This method projects extents of this box to specified axis that is determined only via its directional vector (thus it goes through origin of space). | |
void | ProjectToAxis (const TVector3 &axisDir, float &timeMin, float &timeMax) const |
This method projects AABB 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 AABB to specified line. | |
void | ProjectToLineSegment (const TLineSegment &seg, float &timeMin, float &timeMax) const |
This method projects AABB to specified line segment. | |
void | ProjectToLineSegmentNormalized (const TLineSegment &seg, float &timeMin, float &timeMax) const |
This method projects AABB to specified line segment in NORMALIZED coordinated!!! | |
void | ProjectToRay (const TRay &ray, float &timeMin, float &timeMax) const |
This method projects AABB to specified ray. | |
BOOL | Compare (const TAABBox &aabb) const |
Compare this AABB with another one with default tolerancy TVector3::DELTA_COMPARE. | |
BOOL | Compare (const TAABBox &aabb, const float &delta) const |
Compare this AABB with another one with given tolerancy. | |
BOOL | ComparePrecise (const TAABBox &aabb) const |
Compare this AABB with another one very precisly (bit to bit). | |
BOOL | IsInside (const TVector3 &pt) const |
This method determines whether specified point is inside this box. | |
BOOL | IsInside (const TAABBox &aabb) const |
Determines whether specified AABB is entire inside this AABB. | |
BOOL | IsInside (const TSphere &sphere) const |
This method determines whether given sphere is entire contained inside this AABB. | |
BOOL | IsInside (const TBox &box) const |
This method determines whether given OBB is entire contained inside this AABB. | |
BOOL | IsIntersect (const TLineSegment &seg) const |
This method tests whether given line segment intersects this AABB. | |
BOOL | IsIntersect (const TVector3 &start, const TVector3 &end) const |
This class determines whether given line segment represented by START and STOP point intersects this box. | |
BOOL | IsIntersect (const TRay &ray) const |
This method tests whether given ray intersects this AABB. | |
BOOL | IsIntersect (const TLine &line) const |
This method determines whether specified line intersects this AABB. | |
BOOL | IsIntersect (const TPlane &plane) const |
Determines whether this box has intersection with plane. | |
BOOL | IsIntersect (const TAABBox &aabb) const |
Determines whether specified AABB has intersection with this AABB. | |
BOOL | IsIntersect (const TSphere &sphere) const |
Determines whether given sphere intersects this AABB. | |
BOOL | IsIntersect (const TBox &box) const |
Determines whether given OBB intersects this AABB. | |
BOOL | IsIntersectAABB (const TAABBox &aabb, TAABBox &res) const |
Method determines whether this box intersects with another box and if so then return TRUE and new box created as result of intersection. | |
TAABBox & | operator= (const TAABBox &aabb) |
Assignment operator. | |
BOOL | operator== (const TAABBox &aabb) const |
Equality operator. | |
BOOL | operator!= (const TAABBox &aabb) const |
Inequality operator. | |
TAABBox & | operator+= (const TVector3 &vec) |
Move this box about specified offset. | |
TAABBox & | operator-= (const TVector3 &vec) |
Move this box about specified offset in opposite direction. |
This class represents axis aligned bounding box (AABB). It's represented by two points - LB and RT.
LB is left-bottom point - it contain minimal values for X,Y and Z axis. RT is right-top point - it contain maximal values for X,Y and Z axis.
Dimension of TAABBox are named as WIDTH (for X-axis), LENGTH (for Y-axis) and HEIGHT (for Z-axis).
Definition at line 58 of file AABBox.h.
|
Creates AABB with points [0,0,0] - [1,1,1].
|
|
Copy constructor.
Definition at line 233 of file AABBox.h. References m_lb, m_rt, and Set(). Here is the call graph for this function: ![]() |
|
Create this AABB from two points.
Definition at line 246 of file AABBox.h. References Set(). Here is the call graph for this function: ![]() |
|
Create this AABB from two arbitrary points. Constructor automatically finds minimal and maximal coordinates.
Definition at line 258 of file AABBox.h. References SetFromPoints(). Here is the call graph for this function: ![]() |
|
Create this AABB from left-bottom point and width, length and height.
Definition at line 273 of file AABBox.h. References Set(). Here is the call graph for this function: ![]() |
|
Create box from sphere.
Definition at line 25 of file AABBox.cpp. References NSMath::TSphere::GetMinMaxXYZ(). Here is the call graph for this function: ![]() |
|
Create box from OBB.
Definition at line 37 of file AABBox.cpp. References NSMath::TBox::GetMinMaxXYZ(). Here is the call graph for this function: ![]() |
|
"Add" another AABB to this box and expand this box if second box don't belongs entire into this box. If box was expanded then TRUE is returned.
Definition at line 837 of file AABBox.h. References FALSE, m_lb, m_rt, TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
"Add" point to this box and if point don't belong to this box then is box expanded. If box was expanded then TRUE is returned.
Definition at line 779 of file AABBox.h. References FALSE, TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Compute center of this AABB.
Definition at line 682 of file AABBox.h. Referenced by NSMath::TBox::IsInside(), NSMath::TBox::IsIntersect(), IsIntersect(), NSMath::TPlane::IsNegative(), NSMath::TPlane::IsPositive(), ProjectToAxis(), and ScaleFromCenter(). |
|
Compare this AABB with another one with given tolerancy.
Definition at line 1390 of file AABBox.h. References NSMath::TVector3::Compare(), m_lb, and m_rt. Here is the call graph for this function: ![]() |
|
Compare this AABB with another one with default tolerancy TVector3::DELTA_COMPARE.
Definition at line 1379 of file AABBox.h. References NSMath::TVector3::Compare(), m_lb, and m_rt. Referenced by TMathTest::CalcAABBoxAABBoxIntersection(), operator!=(), and operator==(). Here is the call graph for this function: ![]() |
|
Compare this AABB with another one very precisly (bit to bit).
Definition at line 1400 of file AABBox.h. References NSMath::TVector3::ComparePrecise(), m_lb, and m_rt. Here is the call graph for this function: ![]() |
|
Compute smallest distance between given point and surface of this box.
Definition at line 566 of file AABBox.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 579 of file AABBox.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by IsIntersect(). |
|
Compute extents of this box.
|
|
Returns left-bottom point from this AABB.
|
|
Returns maximal X-coordinate that exists in this box.
Definition at line 326 of file AABBox.h. References NSMath::TVector3::x. |
|
Return maximal coordinates contained inside this box.
Definition at line 365 of file AABBox.h. References NSMath::TVector3::Set(). Here is the call graph for this function: ![]() |
|
Returns maximal Y-coordinate that exists in this box.
Definition at line 334 of file AABBox.h. References NSMath::TVector3::y. |
|
Returns maximal Z-coordinate that exists in this box.
Definition at line 342 of file AABBox.h. References NSMath::TVector3::z. |
|
Return minimal and maximal coordinates contained inside this box.
Definition at line 377 of file AABBox.h. References NSMath::TVector3::Set(). Here is the call graph for this function: ![]() |
|
Returns minimal X-coordinate that exists in this box.
Definition at line 302 of file AABBox.h. References NSMath::TVector3::x. |
|
Return minimal coordinates contained inside this box.
Definition at line 354 of file AABBox.h. References NSMath::TVector3::Set(). Here is the call graph for this function: ![]() |
|
Returns minimal Y-coordinate that exists in this box.
Definition at line 310 of file AABBox.h. References NSMath::TVector3::y. |
|
Returns minimal Z-coordinate that exists in this box.
Definition at line 318 of file AABBox.h. References NSMath::TVector3::z. |
|
Compute back plane of this AABB and store it in parameter.
Definition at line 1199 of file AABBox.h. References NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns back plane of this AABB.
|
|
Compute bottom plane of this AABB and store it in parameter.
Definition at line 1221 of file AABBox.h. References NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns bottom plane of this AABB.
|
|
Compute front plane of this AABB and store it in parameter.
Definition at line 1177 of file AABBox.h. References NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns front plane of this AABB.
|
|
Compute left plane of this AABB and store it in parameter.
Definition at line 1133 of file AABBox.h. References NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns left plane of this AABB.
|
|
Compute right plane of this AABB and store it in parameter.
Definition at line 1155 of file AABBox.h. References NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns right plane of this AABB.
|
|
Compute top plane of this AABB and store it in parameter.
Definition at line 1243 of file AABBox.h. References NSMath::TPlane::Set(). Here is the call graph for this function: ![]() |
|
Returns top plane of this AABB.
|
|
Method creates and return all points which represent this AABB. 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 1259 of file AABBox.h. References NSMath::TVector3::Set(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetPointsAllRelativeTo(). Here is the call graph for this function: ![]() |
|
Method creates and return all points which represent this AABB. Points are in coordinate system related to given point ORIGIN. 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 1296 of file AABBox.h. References GetPointsAll(). Referenced by NSMath::TSphere::IsInside(). Here is the call graph for this function: ![]() |
|
Method creates and return required points which represent this AABB.
FLT,FRT,FRB,BLB,BLT,BRB It is encoded in format <FRONT|BACK><LEFT|RIGHT><TOP|BOTTOM>
Definition at line 1322 of file AABBox.h. References NSMath::TVector3::Set(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by GetPointsRequiredRelativeTo(), and IsIntersect(). Here is the call graph for this function: ![]() |
|
Method creates and return required points which represent this AABB. Points are in coordinate system related to given point ORIGIN.
FLT,FRT,FRB,BLB,BLT,BRB It is encoded in format <FRONT|BACK><LEFT|RIGHT><TOP|BOTTOM>
Definition at line 1361 of file AABBox.h. References GetPointsRequired(). Here is the call graph for this function: ![]() |
|
Returns right-top point from this AABB.
|
|
Compute height - size in Z-axis.
Definition at line 665 of file AABBox.h. References NSMath::TVector3::z. Referenced by NSMath::TBox::IsIntersect(), IsIntersect(), NSMath::TPlane::IsNegative(), NSMath::TPlane::IsPositive(), MoveToLB(), ProjectExtentsToAxis(), ProjectToAxis(), Surface(), and Volume(). |
|
This method determines whether given OBB is entire contained inside this AABB.
Definition at line 77 of file AABBox.cpp. References NSMath::TBox::GetMinMaxXYZ(). Here is the call graph for this function: ![]() |
|
This method determines whether given sphere is entire contained inside this AABB.
Definition at line 61 of file AABBox.cpp. References NSMath::TSphere::GetCenter(), and NSMath::TSphere::GetRadius(). Here is the call graph for this function: ![]() |
|
Determines whether specified AABB is entire inside this AABB.
Definition at line 1423 of file AABBox.h. References m_lb, m_rt, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
This method determines whether specified point is inside this box.
Definition at line 1410 of file AABBox.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Determines whether given OBB intersects this AABB.
Definition at line 272 of file AABBox.cpp. References NSMath::TBox::IsIntersect(). Here is the call graph for this function: ![]() |
|
Determines whether given sphere intersects this AABB.
Definition at line 259 of file AABBox.cpp. References DistanceSurfaceSquare(), NSMath::TSphere::GetCenter(), and NSMath::TSphere::GetRadiusSquare(). Here is the call graph for this function: ![]() |
|
Determines whether specified AABB has intersection with this AABB.
Definition at line 1500 of file AABBox.h. References FALSE, m_lb, m_rt, TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Determines whether this box has intersection with plane.
Definition at line 1439 of file AABBox.h. References NSMath::TPlane::AbsDistance(), NSMath::NSStdMath::fabs(), NSMath::TPlane::GetNormalX(), NSMath::TPlane::GetNormalY(), NSMath::TPlane::GetNormalZ(), GetPointsRequired(), NSMath::TPlane::IsPositive(), and Width(). Here is the call graph for this function: ![]() |
|
This method determines whether specified line intersects this AABB.
Definition at line 201 of file AABBox.cpp. References Center(), NSMath::TVector3::Cross(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TLine::GetDirX(), NSMath::TLine::GetDirY(), NSMath::TLine::GetDirZ(), NSMath::TLine::GetPoint(), NSMath::TLine::GetVector(), Height(), Length(), TRUE, Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method tests whether given ray intersects this AABB.
Definition at line 105 of file AABBox.cpp. References Center(), NSMath::TVector3::Cross(), NSMath::NSStdMath::fabs(), FALSE, NSMath::TRay::GetDirX(), NSMath::TRay::GetDirY(), NSMath::TRay::GetDirZ(), NSMath::TRay::GetStart(), NSMath::TRay::GetVector(), Height(), Length(), TRUE, Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This class determines whether given line segment represented by START and STOP point intersects this box.
Definition at line 1528 of file AABBox.h. References Center(), NSMath::TVector3::Cross(), NSMath::NSStdMath::fabs(), FALSE, Height(), Length(), TRUE, Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method tests whether given line segment intersects this AABB.
Definition at line 93 of file AABBox.cpp. References NSMath::TLineSegment::GetEnd(), and NSMath::TLineSegment::GetStart(). Referenced by NSMath::TSphere::IsIntersect(). Here is the call graph for this function: ![]() |
|
Method determines whether this box intersects with another box and if so then return TRUE and new box created as result of intersection.
Definition at line 1644 of file AABBox.h. References FALSE, m_lb, m_rt, NSMath::TVector3::Set(), TRUE, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by TMathTest::CalcAABBoxAABBoxIntersection(). Here is the call graph for this function: ![]() |
|
Compute length - size in Y-axis.
Definition at line 657 of file AABBox.h. References NSMath::TVector3::y. Referenced by NSMath::TBox::IsIntersect(), IsIntersect(), NSMath::TPlane::IsNegative(), NSMath::TPlane::IsPositive(), MoveToLB(), ProjectExtentsToAxis(), ProjectToAxis(), Surface(), and Volume(). |
|
Translate this AABB to position where LEFT-BOTTOM point will have coordinates [x,y,z].
Definition at line 514 of file AABBox.h. References Height(), Length(), NSMath::TVector3::Set(), Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
Translate this AABB to position where LEFT-BOTTOM point will have coordinates VEC.
Definition at line 496 of file AABBox.h. References Height(), Length(), Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by TMathTest::CalcAABBoxAABBoxIntersection(). Here is the call graph for this function: ![]() |
|
Inequality operator. Compare this box with another box with default tolerancy.
Definition at line 1708 of file AABBox.h. References Compare(). Here is the call graph for this function: ![]() |
|
Move this box about specified offset.
Definition at line 1718 of file AABBox.h. References NSMath::TVector3::Add(). Here is the call graph for this function: ![]() |
|
Move this box about specified offset in opposite direction.
Definition at line 1729 of file AABBox.h. References NSMath::TVector3::Sub(). Here is the call graph for this function: ![]() |
|
Assignment operator.
Definition at line 1686 of file AABBox.h. References Set(). Here is the call graph for this function: ![]() |
|
Equality operator. Compare this box with another box with default tolerancy.
Definition at line 1698 of file AABBox.h. References Compare(). Here is the call graph for this function: ![]() |
|
This method projects extents of this box to specified axis that is determined only via its directional vector (thus it goes through origin of space).
Definition at line 886 of file AABBox.h. References DBGASSERT_MATH, NSMath::NSStdMath::fabs(), Height(), NSMath::TVector3::IsNormalized(), Length(), Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by NSMath::TBox::IsInside(), and NSMath::TBox::IsIntersect(). Here is the call graph for this function: ![]() |
|
This method projects AABB to specified axis determined only directional vector (thus axis goes through origin of space. Method computes time values which bound projection of AABB 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 911 of file AABBox.h. References Center(), DBGASSERT_MATH, NSMath::NSStdMath::fabs(), Height(), NSMath::TVector3::IsNormalized(), Length(), Width(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Here is the call graph for this function: ![]() |
|
This method projects AABB 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 960 of file AABBox.h. References NSMath::NSStdMath::fabs(), NSMath::TLine::GetDirX(), NSMath::TLine::GetDirY(), NSMath::TLine::GetDirZ(), NSMath::TLine::Time(), and Width(). Here is the call graph for this function: ![]() |
|
This method projects AABB to specified line segment. Method computes time values which bound projection of AABB 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 1002 of file AABBox.h. References NSMath::NSStdMath::fabs(), NSMath::TLineSegment::GetDirX(), NSMath::TLineSegment::GetDirY(), NSMath::TLineSegment::GetDirZ(), NSMath::TLineSegment::InvLength(), NSMath::TLineSegment::TimeNormalized(), and Width(). Referenced by TMathTest::CalcAABBoxLineSegmentProjection(). Here is the call graph for this function: ![]() |
|
This method projects AABB to specified line segment in NORMALIZED coordinated!!! Method computes time values which bound projection of AABB 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 1049 of file AABBox.h. References NSMath::NSStdMath::fabs(), NSMath::TLineSegment::GetDirX(), NSMath::TLineSegment::GetDirY(), NSMath::TLineSegment::GetDirZ(), NSMath::TLineSegment::TimeNormalized(), and Width(). Here is the call graph for this function: ![]() |
|
This method projects AABB to specified ray. Method computes time values which bound projection of AABB 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 1087 of file AABBox.h. References NSMath::NSStdMath::fabs(), NSMath::TRay::GetDirX(), NSMath::TRay::GetDirY(), NSMath::TRay::GetDirZ(), NSMath::TRay::Time(), and Width(). Here is the call graph for this function: ![]() |
|
Compute radius of this AABB.
|
|
Compute inner radius of this AABB. It is distance from center to nearest plane of this AABB, thus radius of insphere of this AABB.
Definition at line 717 of file AABBox.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Compute square of inner radius of this AABB. It is square of distance from center to nearest plane of this AABB, thus square of radius of insphere of this AABB.
Definition at line 738 of file AABBox.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. |
|
Compute square of radius of this AABB.
Definition at line 705 of file AABBox.h. Referenced by NSMath::TSphere::TSphere(). |
|
Scale this AABB from center thus all definition point will be moved.
Definition at line 530 of file AABBox.h. References Center(), and DBGASSERT_MATH. Referenced by TMathTest::CalcAABBoxAABBoxIntersection(). Here is the call graph for this function: ![]() |
|
Scale this AABB from left-bottom corner thus this point will not change.
Definition at line 550 of file AABBox.h. References DBGASSERT_MATH. |
|
Set this AABB from left-bottom point and width, length and height.
Definition at line 419 of file AABBox.h. References NSMath::TVector3::Add(), and DBGASSERT_MATH. Here is the call graph for this function: ![]() |
|
Set this AABB from two points.
Definition at line 401 of file AABBox.h. References DBGASSERT_MATH. |
|
Set this box according to another box.
Definition at line 387 of file AABBox.h. Referenced by operator=(), and TAABBox(). |
|
Set this box from array of points.
Definition at line 458 of file AABBox.h. References DBGASSERT_MATH, DBGASSERT_MATHLOW, NSMath::TMathCPU::FindMinMax(), and TGlobalsMath::GetCPU(). Here is the call graph for this function: ![]() |
|
This method sets AABB from two points. Method finds minimal and maximal values and set it to LB a RT points.
Definition at line 442 of file AABBox.h. References NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z. Referenced by TAABBox(). |
|
Compute surface area of this box.
Definition at line 754 of file AABBox.h. References Height(), Length(), and Width(). Referenced by TMathTest::CalcAABBoxAABBoxIntersection(). Here is the call graph for this function: ![]() |
|
Convert this box to OBB.
Definition at line 44 of file AABBox.cpp. |
|
Convert this box to sphere.
Definition at line 51 of file AABBox.cpp. |
|
Translate this AABB about specified vector [x,y,z].
Definition at line 483 of file AABBox.h. References NSMath::TVector3::Add(). Here is the call graph for this function: ![]() |
|
Translate this AABB about specified vector.
Definition at line 470 of file AABBox.h. Referenced by TMathTest::CalcAABBoxAABBoxIntersection(), and TMathTest::CalcAABBoxLineSegmentProjection(). |
|
Compute volume of this box.
Definition at line 766 of file AABBox.h. References Height(), Length(), and Width(). Referenced by TMathTest::CalcAABBoxAABBoxIntersection(). Here is the call graph for this function: ![]() |
|
Compute width - size in X-axis.
Definition at line 649 of file AABBox.h. References NSMath::TVector3::x. Referenced by NSMath::TBox::IsIntersect(), IsIntersect(), NSMath::TPlane::IsNegative(), NSMath::TPlane::IsPositive(), MoveToLB(), ProjectExtentsToAxis(), ProjectToAxis(), ProjectToLine(), ProjectToLineSegment(), ProjectToLineSegmentNormalized(), ProjectToRay(), Surface(), and Volume(). |