|
My Project
|
a min max box. More...
#include <ShapeAABB.h>
Public Member Functions | |
| CShapeBox (const CShapeBox &other) | |
| CShapeBox (const Vector3 &vMin, const Vector3 &vMax) | |
| CShapeBox (const CShapeBox *boxes, int nSize) | |
| CShapeBox (const Vector3 *points, int nSize) | |
| CShapeBox (const CShapeAABB &other) | |
| const Vector3 & | GetMin () const |
| Get min point of the box. | |
| const Vector3 & | GetMax () const |
| Get max point of the box. | |
| void | SetMinMax (const Vector3 &min, const Vector3 &max) |
| Setups a box from min & max vectors. More... | |
| void | SetCenterExtents (const Vector3 &c, const Vector3 &e) |
| Setups a box from center & extents vectors. More... | |
| void | SetEmpty () |
| Setups an empty box. | |
| bool | IsValid () |
| return false if it is empty. More... | |
| void | SetPointBox (const Vector3 &pt) |
| Setups a point box. | |
| float | GetWidth () const |
| float | GetHeight () const |
| float | GetDepth () const |
| void | GetCenter (Vector3 *vec) const |
| Vector3 | GetCenter () const |
| Vector3 | GetExtent () const |
| void | Translate (const Vector3 &offset) |
| translate by a offset | |
| void | Extend (const Vector3 &vec) |
| merge a point to box | |
| void | Extend (const Vector3 *points, int nSize) |
| Extends the point list. More... | |
| void | Extend (const CShapeBox *boxes, int nSize) |
| Extends the box list. More... | |
| void | Extend (const CShapeOBB &p) |
| Extends the AABB. More... | |
| bool | Intersect (float *hitDist, const Vector3 *origPt, const Vector3 *dir) const |
| bool | Intersect (const CShapeSphere &sphere) const |
| whether it intersect with a sphere | |
| float | DistanceToPoint (const Vector3 &p, Vector3 *where) const |
| Point-AABB distance based on code from Dave Eberly's Magic Software: Magic Software, Inc. More... | |
| Vector3 | Point (int i) const |
Public Attributes | |
| Vector3 | m_Max |
| Vector3 | m_Min |
a min max box.
Point-AABB distance based on code from Dave Eberly's Magic Software: Magic Software, Inc.
http://www.magic-software.com return a rough distance square
| void CShapeBox::Extend | ( | const Vector3 * | points, |
| int | nSize | ||
| ) |
Extends the point list.
| void CShapeBox::Extend | ( | const CShapeBox * | boxes, |
| int | nSize | ||
| ) |
Extends the box list.
| void ParaEngine::CShapeBox::Extend | ( | const CShapeOBB & | p | ) |
Extends the AABB.
| bool CShapeBox::IsValid | ( | ) |
return false if it is empty.
i.e. having negative extents
Setups a box from center & extents vectors.
| c | [in] the center point |
| e | [in] the extents vector |
Setups a box from min & max vectors.
| min | [in] the min point |
| max | [in] the max point |
1.8.12