AxisAlignedBoundingBox
Functions
void |
|
void |
|
bool |
|
Detailed Description
-
class AxisAlignedBoundingBox : public RED::Object
Axis aligned bounding box.
Box defined by bounds along the three world axis. Can be defined as volume enclosing shape geometry.
AABBs are not used internally by the engine and are computed on demand.
Public Functions
-
AxisAlignedBoundingBox()
AxisAlignedBoundingBox constructor. Construct a bounding box with zero size, centered at (0,0,0)
-
AxisAlignedBoundingBox(const double iFlatCorners[6])
AxisAlignedBoundingBox constructor from corners data.
- Parameters
iFlatCorners – min/max corners coordinates in order (minx, miny, minz, maxx, maxy, maxz)
-
AxisAlignedBoundingBox(const AxisAlignedBoundingBox &iToCopy)
AxisAlignedBoundingBox copy constructor.
- Parameters
iToCopy – AxisAlignedBoundingBox to copy.
-
~AxisAlignedBoundingBox()
AxisAlignedBoundingBox destruction method.
-
void Transform(const Matrix &iTransformMatrix)
Apply transformation matrix to this AABB.
- Parameters
iTransformMatrix – Transformation matrix to apply.
-
void GetCorners(RED::Vector3 &oMinCorner, RED::Vector3 &oMaxCorner) const
Gets the min and max corners of this AABB.
- Parameters
oMinCorner – Min corner.
oMaxCorner – Max corner.
-
bool IsEmpty() const
Indicates if this AABB is empty or not.
- Returns
Whether empty or not.
-
RED_RC EncloseVertices(const void *iVertexArray, int iVertexSize, RED::MESH_FORMAT iVertexFormat, int iVertexCount)
Compute this AABB in order to enclose a set of vertices.
- Parameters
iVertexArray – Pointer to the vertex array start.
iVertexSize – Size in Bytes of a vertex.
iVertexFormat – Format of a vertex.
iVertexCount – Number of vertex in the array.
- Returns
RED_OK if success, else error code.
-
RED_RC EncloseAxisAlignedBoundingBoxes(const RED::Vector<AxisAlignedBoundingBox> &iAabbsToEnclose)
Compute this AABB in order to enclose other AABBs.
- Parameters
iAabbsToEnclose – List of AABBs to enclose.
- Returns
RED_OK if success, else error code.
-
AxisAlignedBoundingBox()