Class for representing oriented bounding boxes (OBB). This class has data members to hold the center coordinates (center
), the size in the xyz directions (extent
), and the rotation quaternion (rotation
).
More...
#include "nn/nlib/simd/SimdGeometry.h"
|
SimdVector | center |
| The center coordinates of the OBB. A 3D vector.
|
|
SimdVector | extent |
| The size of the x-coordinate, y-coordinate, and z-coordinate of the OBB. All of the elements must have positive values. A 3D vector.
|
|
SimdQuaternion | rotation |
| A quaternion representing the orientation of the OBB.
|
|
Class for representing oriented bounding boxes (OBB). This class has data members to hold the center coordinates (center
), the size in the xyz directions (extent
), and the rotation quaternion (rotation
).
- Description
- The object is the AABB defined by
(-extent.x, -extent.y, -extent.z), (extent.x, extent.y, extent.z)
that has been rotated by the amount of rotation
and translated by the amount of center
.
- In other words, if there is no rotation, and if the sizes in the xyz directions are all 1 with the center coordinates at the origin, it is the same as an AABB with maximum and minimum coordinates of (-1,-1,-1) and (1, 1, 1).
- Note that
rotation
must be a normalized quaternion.
Definition at line 80 of file SimdGeometry.h.
Converts an AABB into an OBB.
- Parameters
-
[out] | box | The region storing the OBB. |
[in] | aabb | The region storing the AABB. |
nn::nlib::simd::OrientedBox::GetCorners |
( |
Float3 * |
corners | ) |
const |
|
noexcept |
Gets the vertex coordinates of an OBB.
- Parameters
-
[out] | corners | The region storing the vertex coordinates. |
- Description
- Eight sets of vertex coordinates are written by corners, so you need a writable region for them.
Stores the 3D transformed OBB of an OBB object.
- Parameters
-
[out] | box | The region storing the transformed OBB. |
[in] | m | A 3D transform matrix. |
The documentation for this class was generated from the following files: