The class with the collection of static member functions that handle spheres in three-dimensional space. This class cannot be instantiated.
More...
#include "nn/nlib/simd/SimdGeometry.h"
The class with the collection of static member functions that handle spheres in three-dimensional space. This class cannot be instantiated.
- Description
- In the spheres handed by this class (
SimdSphere
), lanes 0 to 2 are the xyz coordinates of the center of the sphere, and lane 3 is the radius.
Definition at line 53 of file SimdGeometry.h.
◆ FromPoints()
nn::nlib::simd::Sphere::FromPoints |
( |
const Float3 * |
points, |
|
|
size_t |
count |
|
) |
| |
|
staticnoexcept |
Calculates a sphere encompassing count number of points.
- Parameters
-
[in] | points | Pointer to the region in three-dimensional space that contains the set of points. |
[in] | count | The number of points. |
- Returns
- The sphere encompassing the set of points.
◆ GetCenter()
Returns the center of the sphere.
- Parameters
-
[in] | sphere | A sphere in three-dimensional space. |
- Returns
- The center coordinates of the sphere.
◆ GetRadius()
Gets the radius of the sphere.
- Parameters
-
[in] | sphere | A sphere in three-dimensional space. |
- Returns
- The radius of the sphere.
◆ Merge()
Calculates the smallest sphere that encompasses two spheres.
- Parameters
-
[in] | sphere0 | A sphere in three-dimensional space. |
[in] | sphere1 | A sphere in three-dimensional space. |
- Returns
- A sphere encompassing the two spheres.
◆ SetCenter()
Returns the sphere with a changed center.
- Parameters
-
[in] | sphere | A sphere in three-dimensional space. |
[in] | center | The new center coordinates. |
- Returns
- The sphere with the newly set center coordinates..
◆ SetRadius()
nn::nlib::simd::Sphere::SetRadius |
( |
SimdSphereArg |
sphere, |
|
|
float |
radius |
|
) |
| |
|
staticnoexcept |
Returns the sphere with a changed radius.
- Parameters
-
[in] | sphere | A sphere. |
[in] | radius | The new radius. |
- Returns
- The sphere with the newly set radius.
◆ Transform()
Calculates the smallest sphere that encompasses the shape of a sphere after it has been transformed by a matrix.
- Parameters
-
[in] | sphere | A sphere in three-dimensional space. |
[in] | m | A 3D transform matrix. |
- Returns
- The new sphere.
- Description
- If the scaling of the matrix is not isotropic, the transformation result is not a sphere. In this case, the function returns the smallest sphere that encompasses the transformation result.
The documentation for this class was generated from the following files: