template<class T>
class ni::cAABB< T >
Axis aligned bounding box template class interface.
vertex[x]
\ Y+ Z+
7 <=== size ===> 6 (max) | /
*===============* | /
/| /| | /
/ | / | | /
4 / | 5 / | |/
*===+===========* | ==========+========== X+
| | | | /|
| | | | / |
| 3 *===========+===* 2 / |
| / | / / |
| / | / / |
|/ |/
*===============*
0 (min) 1 Vertices :
0 = bottom left front (min)
1 = bottom right front
2 = bottom right back
3 = bottom left back
4 = top left front
5 = top right front
6 = top right back
7 = top left back
Faces (CW, facing outside) - so that texcoo(0,0 - 1,1) are mapped directly (for a cube) :
PositiveX = 5,6,2,1
NegativeX = 7,3,0,4
PositiveY = 7,6,5,4
NegativeY = 0,1,2,3
PositiveZ = 6,7,3,2
NegativeZ = 4,5,1,0
Faces (CCW, facing inside) - so that texcoo(0,0 - 1,1) are mapped directly (for a cubemap) :
PositiveX = 6,5,1,2
NegativeX = 4,7,3,0
PositiveY = 4,5,6,7
NegativeY = 3,2,1,0
PositiveZ = 7,6,2,3
NegativeZ = 5,4,0,1
|
| | cAABB () |
| |
| | cAABB (const sVec3< T > &min, const sVec3< T > &max) |
| |
| | cAABB (const sVec3< T > ¢er, T afRadius) |
| |
| | ~cAABB () |
| |
| void | ZeroMembers () |
| |
| const sVec3< T > & | GetMin () const |
| |
| const sVec3< T > & | GetMax () const |
| |
| const T | GetXSize () const |
| |
| const T | GetYSize () const |
| |
| const T | GetZSize () const |
| |
| const T | GetMaxSize () const |
| |
| const T | GetRadius () const |
| |
| sVec3< T > | GetSize () const |
| |
| sVec3< T > | GetExtents () const |
| |
| sVec3< T > | GetCenter () const |
| |
| T | GetAverageExtent () const |
| |
| void | Set (const sVec3< T > &min, const sVec3< T > &max) |
| |
| void | SetMin (const sVec3< T > &min) |
| |
| void | SetMax (const sVec3< T > &max) |
| |
| void | SetCenterSize (const sVec3< T > ¢er, T size) |
| |
| void | SetCenterSize (const sVec3< T > ¢er, const sVec3< T > &size) |
| |
| void | SetCenterExtents (const sVec3< T > ¢er, T size) |
| |
| void | SetCenterExtents (const sVec3< T > ¢er, const sVec3< T > &size) |
| |
| tBool | Intersect (const sVec3< T > &p, T epsilon=niEpsilon5) const |
| |
| tBool | Intersect (const cAABB< T > &aabb, T epsilon=niEpsilon5) const |
| |
| tBool | Intersect (const sVec3< T > &min, const sVec3< T > &max, T epsilon=niEpsilon5) const |
| |
| tBool | IntersectRay (const sVec3< T > &avRayPos, const sVec3< T > &avRayDir, sVec3< T > *pOut=NULL, T epsilon=niEpsilon5) const |
| |
| void | Reset () |
| | Bounding box computing helper. More...
|
| |
| void | SetPoint (const sVec3< T > &p) |
| |
| void | Inflate (T percent) |
| | Inflate the bounding box of the given percent (1.0 == 100%). More...
|
| |
| void | Extend (const sVec3< T > &v) |
| | Extend the bounding box of the given vector. More...
|
| |
| void | Translate (const sVec3< T > &vVec) |
| | Translate the AABB. More...
|
| |
| void | Rotate (const sMatrix< T > &aMtx) |
| | Rotate/Scale the AABB. More...
|
| |
| void | Transform (const sMatrix< T > &aMtx) |
| | Transform the AABB. More...
|
| |
| void | GetVertices (tPtr pVerts, tU32 aulPosOffset, tU32 aulStride) const |
| | Get the AABB vertices. More...
|
| |
| void | GetFacesPlanes (sVec4< T > *pPlanes, bool bOutward) const |
| | Get the AABB faces planes. More...
|
| |