Class for representing axis-aligned bounding boxes (AABB). The class has data members to hold the minimum coordinates (point_min
) and the maximum coordinates (point_max
).
More...
#include "nn/nlib/simd/SimdGeometry.h"
|
| AxisAlignedBox () noexcept |
| Instantiates the object with default parameters (default constructor). Does not configure the default settings for the data members.
|
|
| AxisAlignedBox (const Float3 &pmin, const Float3 &pmax) |
| Constructs an AABB with the specified minimum and maximum coordinates. More...
|
|
void | GetCorners (Float3 *corners) const noexcept |
| Writes the vertex coordinates of the AABB. More...
|
|
void | Transform (AxisAlignedBox *box, SimdMatrixArg m) noexcept |
| Transforms an AABB using the 4x4 matrix m, and stores the smallest AABB that can encompass that post-transformed shape in box. More...
|
|
Class for representing axis-aligned bounding boxes (AABB). The class has data members to hold the minimum coordinates (point_min
) and the maximum coordinates (point_max
).
Definition at line 74 of file SimdGeometry.h.
◆ AxisAlignedBox()
nn::nlib::simd::AxisAlignedBox::AxisAlignedBox |
( |
const Float3 & |
pmin, |
|
|
const Float3 & |
pmax |
|
) |
| |
Constructs an AABB with the specified minimum and maximum coordinates.
- Parameters
-
[in] | pmin | The minimum xyz coordinates. |
[in] | pmax | The maximum xyz coordinates. |
◆ FromPoints() [1/2]
Creates the smallest AABB that encompasses two points.
- Parameters
-
[out] | box | The region storing the created AABB. |
[in] | point0 | A point in three-dimensional space. |
[in] | point1 | A point in three-dimensional space. |
◆ FromPoints() [2/2]
nn::nlib::simd::AxisAlignedBox::FromPoints |
( |
AxisAlignedBox * |
box, |
|
|
const Float3 * |
points, |
|
|
size_t |
count |
|
) |
| |
|
staticnoexcept |
Creates the smallest AABB that encompasses the count number of points.
- Parameters
-
[out] | box | The region storing the created AABB. |
[in] | points | The region in three-dimensional space that contains the points. |
[in] | count | The number of points. |
◆ FromSphere()
Creates the smallest AABB that encompasses a sphere.
- Parameters
-
[out] | box | The region storing the created AABB. |
[in] | sphere | A sphere in three-dimensional space. |
◆ GetCorners()
nn::nlib::simd::AxisAlignedBox::GetCorners |
( |
Float3 * |
corners | ) |
const |
|
noexcept |
Writes the vertex coordinates of the AABB.
- Parameters
-
[out] | corners | Pointer to the region where the vertex coordinates are written. |
- Description
- Eight sets of vertex coordinates are written by corners, so you need a writable region for them.
◆ Merge()
Creates the smallest AABB that encompasses two AABBs.
- Parameters
-
[out] | box | The region storing the AABB encompassing box0 and box1. |
[in] | box0 | AABB. |
[in] | box1 | AABB. |
◆ Transform()
Transforms an AABB using the 4x4 matrix m, and stores the smallest AABB that can encompass that post-transformed shape in box.
- Parameters
-
[out] | box | The region storing the AABB after it has been transformed. |
[in] | m | A 3D transform matrix. |
The documentation for this class was generated from the following files: