nlib
nn::nlib::simd::Plane Class Reference

The class with the collection of functions that handle planes in three-dimensional space. More...

#include "nn/nlib/simd/SimdGeometry.h"

Static Public Member Functions

static f128 Dot (SimdPlaneArg plane, SimdVectorArg vec) noexcept
 Calculates the dot product between a plane and a four-dimensional vector. More...
 
static f128 DotCoord (SimdPlaneArg plane, SimdVectorArg vec) noexcept
 Calculates the dot product between a plane and a four-dimensional vector. The calculation treats vec[3] as 1. More...
 
static f128 DotNormal (SimdPlaneArg plane, SimdVectorArg vec) noexcept
 Calculates the dot product between a plane and a four-dimensional vector. The calculation treats vec[3] as 0. More...
 
static SimdPlane FromPointAndNormal (SimdVectorArg point, SimdVectorArg normal) noexcept
 Creates a plane from a point on the plane and a normal vector. More...
 
static SimdPlane FromPoint (SimdVectorArg point0, SimdVectorArg point1, SimdVectorArg point2) noexcept
 Creates a plane that passes through three points. More...
 
static SimdPlane Normalize (SimdPlaneArg plane) noexcept
 Returns a plane with its normal vector (plane[0], plane[1], plane[2]) normalized. More...
 
static SimdPlane NormalizeEst (SimdPlaneArg plane) noexcept
 Returns a plane with its normal vector (plane[0], plane[1], plane[2]) normalized with relatively low precision. More...
 
static SimdPlane Transform (SimdPlaneArg plane, SimdMatrixArg m) noexcept
 Transforms a plane using a matrix. More...
 

Detailed Description

The class with the collection of functions that handle planes in three-dimensional space.

Description
The planes handled by this class are expressed as vec[0] * x + vec[1] * y + vec[2] * z + vec[3] = 0.
All members of this class are static functions. The class cannot be instantiated.

Definition at line 21 of file SimdGeometry.h.

Member Function Documentation

nn::nlib::simd::Plane::Dot ( SimdPlaneArg  plane,
SimdVectorArg  vec 
)
staticnoexcept

Calculates the dot product between a plane and a four-dimensional vector.

Parameters
[in]planeThe plane.
[in]vecA four-dimensional vector.
Returns
Stores the dot product in each lane.
nn::nlib::simd::Plane::DotCoord ( SimdPlaneArg  plane,
SimdVectorArg  vec 
)
staticnoexcept

Calculates the dot product between a plane and a four-dimensional vector. The calculation treats vec[3] as 1.

Parameters
[in]planeThe plane.
[in]vecA four-dimensional vector. (The w element is treated as 1.)
Returns
Stores the dot product in each lane.
nn::nlib::simd::Plane::DotNormal ( SimdPlaneArg  plane,
SimdVectorArg  vec 
)
staticnoexcept

Calculates the dot product between a plane and a four-dimensional vector. The calculation treats vec[3] as 0.

Parameters
[in]planeThe plane.
[in]vecA three-dimensional vector. (The w element is treated as 0.)
Returns
Stores the dot product in each lane.
nn::nlib::simd::Plane::FromPoint ( SimdVectorArg  point0,
SimdVectorArg  point1,
SimdVectorArg  point2 
)
staticnoexcept

Creates a plane that passes through three points.

Parameters
[in]point0A point on the plane.
[in]point1A point on the plane.
[in]point2A point on the plane.
Returns
A plane.
nn::nlib::simd::Plane::FromPointAndNormal ( SimdVectorArg  point,
SimdVectorArg  normal 
)
staticnoexcept

Creates a plane from a point on the plane and a normal vector.

Parameters
[in]pointA point on the plane.
[in]normalA normal vector.
Returns
A plane.
nn::nlib::simd::Plane::Normalize ( SimdPlaneArg  plane)
staticnoexcept

Returns a plane with its normal vector (plane[0], plane[1], plane[2]) normalized.

Parameters
[in]planeThe plane.
Returns
The plane after its normal vector has been normalized.
nn::nlib::simd::Plane::NormalizeEst ( SimdPlaneArg  plane)
staticnoexcept

Returns a plane with its normal vector (plane[0], plane[1], plane[2]) normalized with relatively low precision.

Parameters
[in]planeThe plane.
Returns
The plane after its normal vector has been normalized.
nn::nlib::simd::Plane::Transform ( SimdPlaneArg  plane,
SimdMatrixArg  m 
)
staticnoexcept

Transforms a plane using a matrix.

Parameters
[in]planeThe plane.
[in]mThe matrix.
Returns
The transformed plane.

The documentation for this class was generated from the following files: