nlib
nn::nlib::simd::Sphere Class Reference

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"

Static Public Member Functions

static SimdSphere FromPoints (const Float3 *points, size_t count) noexcept
 Calculates a sphere encompassing count number of points. More...
 
static SimdSphere Merge (SimdSphereArg sphere0, SimdSphereArg sphere1) noexcept
 Calculates the smallest sphere that encompasses two spheres. More...
 
static float GetRadius (SimdSphereArg sphere) noexcept
 Gets the radius of the sphere. More...
 
static SimdSphere SetRadius (SimdSphereArg sphere, float radius) noexcept
 Returns the sphere with a changed radius. More...
 
static SimdVector GetCenter (SimdSphereArg sphere) noexcept
 Returns the center of the sphere. More...
 
static SimdSphere SetCenter (SimdSphereArg sphere, SimdVectorArg center) noexcept
 Returns the sphere with a changed center. More...
 
static SimdSphere Transform (SimdSphereArg sphere, SimdMatrixArg m) noexcept
 Calculates the smallest sphere that encompasses the shape of a sphere after it has been transformed by a matrix. More...
 

Detailed Description

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 40 of file SimdGeometry.h.

Member Function Documentation

§ FromPoints()

nn::nlib::simd::Sphere::FromPoints ( const Float3 points,
size_t  count 
)
staticnoexcept

Calculates a sphere encompassing count number of points.

Parameters
[in]pointsPointer to the region in three-dimensional space that contains the set of points.
[in]countThe number of points.
Returns
The sphere encompassing the set of points.

§ GetCenter()

nn::nlib::simd::Sphere::GetCenter ( SimdSphereArg  sphere)
staticnoexcept

Returns the center of the sphere.

Parameters
[in]sphereA sphere in three-dimensional space.
Returns
The center coordinates of the sphere.

§ GetRadius()

nn::nlib::simd::Sphere::GetRadius ( SimdSphereArg  sphere)
staticnoexcept

Gets the radius of the sphere.

Parameters
[in]sphereA sphere in three-dimensional space.
Returns
The radius of the sphere.

§ Merge()

nn::nlib::simd::Sphere::Merge ( SimdSphereArg  sphere0,
SimdSphereArg  sphere1 
)
staticnoexcept

Calculates the smallest sphere that encompasses two spheres.

Parameters
[in]sphere0A sphere in three-dimensional space.
[in]sphere1A sphere in three-dimensional space.
Returns
A sphere encompassing the two spheres.

§ SetCenter()

nn::nlib::simd::Sphere::SetCenter ( SimdSphereArg  sphere,
SimdVectorArg  center 
)
staticnoexcept

Returns the sphere with a changed center.

Parameters
[in]sphereA sphere in three-dimensional space.
[in]centerThe 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]sphereA sphere.
[in]radiusThe new radius.
Returns
The sphere with the newly set radius.

§ Transform()

nn::nlib::simd::Sphere::Transform ( SimdSphereArg  sphere,
SimdMatrixArg  m 
)
staticnoexcept

Calculates the smallest sphere that encompasses the shape of a sphere after it has been transformed by a matrix.

Parameters
[in]sphereA sphere in three-dimensional space.
[in]mA 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: