csOBB Class Reference
[Geometry utilities]
Oriented bounding box (OBB).
More...
#include <csgeom/obb.h>
Inheritance diagram for csOBB:

Public Member Functions | |
csOBB () | |
Initialize the OBB to empty with identity transform. | |
csOBB (const csOBB &b) | |
Copy constructor. | |
csOBB (const csBox3 &b) | |
Initialize the OBB to the given AABB with identity transform. | |
csOBB (const csVector3 &dir1, const csVector3 &dir2, const csVector3 &dir3) | |
Construct an OBB from the three given vectors. | |
void | AddBoundingVertex (const csVector3 &v) |
Add a new vertex and recalculate the bounding box. | |
csVector3 | GetCorner (int corner) const |
Return every corner of this bounding box from 0 to 7. | |
float | Diameter () |
Get the diameter of this OBB. | |
float | Volume () |
Get the volume of this OBB. | |
void | FindOBB (const csVector3 *vertex_table, int num, float eps=0.0) |
Given the table of vertices find a csOBB that matches this table. | |
void | FindOBBAccurate (const csVector3 *vertex_table, int num) |
Given the table of vertices find a csOBB that matches this table. |
Detailed Description
Oriented bounding box (OBB).This is basically a csBox3 with a matrix to rotate it.
Definition at line 41 of file obb.h.
Constructor & Destructor Documentation
|
Initialize the OBB to empty with identity transform.
|
|
Copy constructor.
|
|
Initialize the OBB to the given AABB with identity transform.
|
|
Construct an OBB from the three given vectors. This will setup the orientation. dir1 are the two vertices furthest appart. dir2 is the two vertices after moving them to the plane perpendicular to dir1 and dir3 is the cross of dir1 and dir2. |
Member Function Documentation
|
Add a new vertex and recalculate the bounding box.
Reimplemented from csBox3. |
|
Get the diameter of this OBB.
|
|
Given the table of vertices find a csOBB that matches this table. This is a faster version that FindOBBAccurate() but it is less accurate. |
|
Given the table of vertices find a csOBB that matches this table. This version is a lot slower than FindOBB but it gives a more accurate OBB. |
|
Return every corner of this bounding box from 0 to 7. This contrasts with Min() and Max() because those are only the min and max corners. Corner 0 = xyz, 1 = xyZ, 2 = xYz, 3 = xYZ, 4 = Xyz, 5 = XyZ, 6 = XYz, 7 = XYZ. Use CS_BOX_CORNER_xyz etc. defines. CS_BOX_CENTER3 also works. Reimplemented from csBox3. Referenced by csOBBFrozen::Copy(). |
|
Get the volume of this OBB.
|
The documentation for this class was generated from the following file:
- csgeom/obb.h
Generated for Crystal Space by doxygen 1.3.9.1