My Project
|
AABB with orientation by a matrix. More...
#include <ShapeOBB.h>
Public Member Functions | |
CShapeOBB (const CShapeAABB &aabb, const Matrix4 &mat) | |
void | SetEmpty () |
Setups an empty CShapeOBB. | |
bool | ContainsPoint (const Vector3 &p) const |
Tests if a point is contained within the CShapeOBB. More... | |
void | Create (const CShapeAABB &aabb, const Matrix4 &mat) |
Builds an CShapeOBB from an CShapeAABB and a world transform. More... | |
void | Rotate (const Matrix4 &mtx, CShapeOBB &obb) const |
Recomputes the CShapeOBB after an arbitrary transform by a 4x4 matrix. More... | |
BOOL | IsValid () const |
Checks the CShapeOBB is valid. More... | |
bool | ComputePlanes (Plane *planes) const |
Computes the obb planes. More... | |
bool | ComputePoints (Vector3 *pts) const |
Computes the obb points. More... | |
bool | ComputeVertexNormals (Vector3 *pts) const |
Computes vertex normals. More... | |
const DWORD * | GetEdges () const |
Returns edges. More... | |
const Vector3 * | GetLocalEdgeNormals () const |
Returns local edge normals. More... | |
void | ComputeWorldEdgeNormal (DWORD edge_index, Vector3 &world_normal) const |
Returns world edge normal. More... | |
BOOL | IsInside (const CShapeOBB &box) const |
Checks the CShapeOBB is inside another CShapeOBB. More... | |
const Vector3 & | GetCenter () const |
const Vector3 & | GetExtents () const |
const Matrix4 & | GetRot () const |
void | GetRotatedExtents (Matrix4 &extents) const |
Public Attributes | |
Vector3 | mCenter |
B for Box. | |
Vector3 | mExtents |
B for Bounding. | |
Matrix4 | mRot |
O for Oriented. | |
AABB with orientation by a matrix.
bool CShapeOBB::ComputePlanes | ( | Plane * | planes | ) | const |
Computes the obb planes.
planes | [out] 6 box planes |
bool CShapeOBB::ComputePoints | ( | Vector3 * | pts | ) | const |
Computes the obb points.
pts | [out] 8 box points |
bool CShapeOBB::ComputeVertexNormals | ( | Vector3 * | pts | ) | const |
Computes vertex normals.
pts | [out] 8 box points |
void CShapeOBB::ComputeWorldEdgeNormal | ( | DWORD | edge_index, |
Vector3 & | world_normal | ||
) | const |
Returns world edge normal.
edge_index | [in] 0 <= edge index < 12 |
world_normal | [out] edge normal in world space |
bool CShapeOBB::ContainsPoint | ( | const Vector3 & | p | ) | const |
void CShapeOBB::Create | ( | const CShapeAABB & | aabb, |
const Matrix4 & | mat | ||
) |
Builds an CShapeOBB from an CShapeAABB and a world transform.
aabb | [in] the aabb |
mat | [in] the world transform |
const DWORD * CShapeOBB::GetEdges | ( | ) | const |
Returns edges.
const Vector3 * CShapeOBB::GetLocalEdgeNormals | ( | ) | const |
Returns local edge normals.
BOOL CShapeOBB::IsInside | ( | const CShapeOBB & | box | ) | const |
BOOL CShapeOBB::IsValid | ( | ) | const |
Checks the CShapeOBB is valid.