42 float f =
mRot.
m[0][0] * RelPoint.
x +
mRot.
m[0][1] * RelPoint.
y +
mRot.
m[0][2] * RelPoint.
z;
85 if(!planes)
return false;
108 planes[0].
d = -(planes[0].
n|p0);
109 planes[1].
d = -(planes[1].
n|p1);
110 planes[2].
d = -(planes[2].
n|p2);
111 planes[3].
d = -(planes[3].
n|p3);
112 planes[4].
d = -(planes[4].
n|p4);
113 planes[5].
d = -(planes[5].
n|p5);
128 if(!pts)
return false;
147 pts[0] = mCenter - Axis0 - Axis1 - Axis2;
148 pts[1] = mCenter + Axis0 - Axis1 - Axis2;
149 pts[2] = mCenter + Axis0 + Axis1 - Axis2;
150 pts[3] = mCenter - Axis0 + Axis1 - Axis2;
151 pts[4] = mCenter - Axis0 - Axis1 + Axis2;
152 pts[5] = mCenter + Axis0 - Axis1 + Axis2;
153 pts[6] = mCenter + Axis0 + Axis1 + Axis2;
154 pts[7] = mCenter - Axis0 + Axis1 + Axis2;
168 static float VertexNormals[] =
180 if(!pts)
return false;
182 const Point* VN = (
const Point*)VertexNormals;
199 static udword Indices[] = {
200 0, 1, 1, 2, 2, 3, 3, 0,
201 7, 6, 6, 5, 5, 4, 4, 7,
216 static float EdgeNormals[] =
233 return (
const Point*)EdgeNormals;
bool ComputePlanes(Plane *planes) const
inline_ void GetCenter(Point ¢er) const
Get box center.
Point mExtents
B for Bounding.
void ComputeLSS(LSS &lss) const
#define INVSQRT2
1 / sqrt(2)
bool ComputePoints(Point *pts) const
const udword * GetEdges() const
int BOOL
Another boolean type.
bool ComputeVertexNormals(Point *pts) const
unsigned int udword
sizeof(udword) must be 4
Point n
The normal to the plane.
inline_ void Rotate(const Matrix4x4 &mtx, OBB &obb) const
void ComputeWorldEdgeNormal(udword edge_index, Point &world_normal) const
#define INVSQRT3
1 / sqrt(3)
const Point * GetLocalEdgeNormals() const
BOOL IsInside(const OBB &box) const
inline_ PointComponent LargestAxis() const
Returns largest axis.
inline_ void GetExtents(Point &extents) const
Get box extents.
ICEMATHS_API void InvertPRMatrix(Matrix4x4 &dest, const Matrix4x4 &src)
bool ContainsPoint(const Point &p) const
float mRadius
Sphere radius.
void Create(const AABB &aabb, const Matrix4x4 &mat)
Matrix3x3 mRot
O for Oriented.
inline_ void SetTrans(const Point &p)
Sets the translation part of the matrix, from a Point.
Point mP0
Start of segment.
float d
The distance from the origin.