nlib
|
The class with the collection of functions that perform calculations on four-dimensional vectors. More...
#include "nn/nlib/simd/SimdVector4.h"
Static Public Member Functions | |
static bool | IsNaN (SimdVectorArg vec) noexcept |
Evaluates whether any of the elements of vec are NaN . More... | |
static bool | IsInfinite (SimdVectorArg vec) noexcept |
Evaluates whether any of the elements of vec are positive infinity or negative infinity. More... | |
static bool | InBound (SimdVectorArg vec, SimdVectorArg bounds) noexcept |
Evaluates whether the elements of vec are inside the bounds of bounds. More... | |
static f128 | Dot (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Calculates the dot product between four-dimensional vectors. More... | |
template<bool SetLane0, bool SetLane1, bool SetLane2, bool SetLane3> | |
static f128 | DotEx (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Calculates the dot product between two four-dimensional vectors and sets the value in the various lanes. More... | |
static f128 | Dot2 (SimdVectorArg a, SimdVectorArg b0, SimdVectorArg b1) noexcept |
Calculates the dot products dot(a, b0) and dot(a, b1) between four-dimensional vectors and sets the results in lane 0 and lane 1. More... | |
static f128 | Dot3 (SimdVectorArg a, SimdVectorArg b0, SimdVectorArg b1, SimdVectorArg b2) noexcept |
Calculates the dot products dot(a, b0) , dot(a, b1) , and dot(a, b2) between four-dimensional vectors and sets the results in lanes 0, 1, and 2. More... | |
static f128 | Dot4 (SimdVectorArg a, SimdVectorArg b0, SimdVectorArg b1, SimdVectorArg b2, SimdVectorArg b3) noexcept |
Calculates the dot products dot(a, b0) , dot(a, b1) , dot(a, b2) , and dot(a, b3) between four-dimensional vectors and sets the results in lanes 0, 1, 2, and 3. More... | |
static SimdVector | Normalize (SimdVectorArg vec) noexcept |
Normalizes a four-dimensional vector. More... | |
static SimdVector | NormalizeEst (SimdVectorArg vec) noexcept |
Normalizes a four-dimensional vector with relatively low precision. More... | |
static f128 | LengthSq (SimdVectorArg vec) noexcept |
Calculates the square of the length of a four-dimensional vector. More... | |
static f128 | Length (SimdVectorArg vec) noexcept |
Calculates the length of a four-dimensional vector. More... | |
static f128 | LengthEst (SimdVectorArg vec) noexcept |
Calculates the length of a four-dimensional vector with relatively low precision. More... | |
static f128 | RecpLength (SimdVectorArg vec) noexcept |
Calculates the reciprocal of the length of a four-dimensional vector. More... | |
static f128 | RecpLengthEst (SimdVectorArg vec) noexcept |
Calculates the reciprocal of the length of a four-dimensional vector with relatively low precision. More... | |
static f128 | GetAngle (SimdVectorArg vec1_normalized, SimdVectorArg vec2_normalized) noexcept |
Calculates the angle (in radians) between two normalized four-dimensional vectors. More... | |
static SimdVector | Reflect (SimdVectorArg vec, SimdVectorArg normal) noexcept |
Reflects a four-dimensional vector using a four-dimensional normal vector. More... | |
static SimdVector | Transform (SimdVectorArg vec, SimdMatrixArg m) noexcept |
Transforms a four-dimensional vector using a matrix. More... | |
Loading and Storing | |
template<typename MyVector4 > | |
static SimdVector | LoadFloat4 (const MyVector4 *p) noexcept |
Loads a four-dimensional vector from memory. More... | |
template<typename MyVector4 > | |
static void | StoreFloat4 (MyVector4 *p, SimdVectorArg vec) noexcept |
Writes a four-dimensional vector to memory. More... | |
Comparisons | |
static bool | CmpEq (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Compares two four-dimensional vectors to see if they are equal. More... | |
static bool | CmpLt (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Checks to see whether all of the elements of vec1 are smaller than the corresponding elements of vec2. More... | |
static bool | CmpLe (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Checks to see whether all of the elements of vec1 are equal or less than the corresponding elements of vec2. More... | |
static bool | CmpGt (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Checks to see whether all of the elements of vec1 are larger than the corresponding elements of vec2. More... | |
static bool | CmpGe (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Checks to see whether all of the elements of vec1 are equal or greater than the corresponding elements of vec2. More... | |
static bool | CmpNe (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Compares vec1 and vec2 to see whether they are unequal. More... | |
static bool | CmpNearEq (SimdVectorArg vec1, SimdVectorArg vec2, SimdVectorArg eps) noexcept |
Compares vec1 and vec2 to see whether they are nearly equal. More... | |
The class with the collection of functions that perform calculations on four-dimensional vectors.
F128
class to perform independent calculations on separate elements. Definition at line 11 of file SimdVector4.h.
|
inlinestaticnoexcept |
Compares two four-dimensional vectors to see if they are equal.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
true
if the vector elements are the same, and false
otherwise. Definition at line 17 of file SimdVector4.h.
|
inlinestaticnoexcept |
Checks to see whether all of the elements of vec1 are equal or greater than the corresponding elements of vec2.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
true
if vec1 is equal or greater than vec2, and false
otherwise. Definition at line 29 of file SimdVector4.h.
|
inlinestaticnoexcept |
Checks to see whether all of the elements of vec1 are larger than the corresponding elements of vec2.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
true
if vec1 is smaller than vec2, and false
otherwise. Definition at line 26 of file SimdVector4.h.
|
inlinestaticnoexcept |
Checks to see whether all of the elements of vec1 are equal or less than the corresponding elements of vec2.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
true
if vec1 is equal or less than vec2, and false
otherwise. Definition at line 23 of file SimdVector4.h.
|
inlinestaticnoexcept |
Checks to see whether all of the elements of vec1 are smaller than the corresponding elements of vec2.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
true
if vec1 is smaller than vec2, and false
otherwise. Definition at line 20 of file SimdVector4.h.
|
inlinestaticnoexcept |
Compares vec1 and vec2 to see whether they are unequal.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
true
if vec1 is not equal to vec2, and false
otherwise. Definition at line 32 of file SimdVector4.h.
|
inlinestaticnoexcept |
Compares vec1 and vec2 to see whether they are nearly equal.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
[in] | eps | A tolerance value. |
true
if vec1 is nearly equal to vec2, and false
otherwise.Definition at line 36 of file SimdVector4.h.
|
staticnoexcept |
Calculates the dot product between four-dimensional vectors.
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
|
staticnoexcept |
Calculates the dot products dot(a, b0)
and dot(a, b1)
between four-dimensional vectors and sets the results in lane 0 and lane 1.
[in] | a | A four-dimensional vector. |
[in] | b0 | A four-dimensional vector. |
[in] | b1 | A four-dimensional vector. |
dot(a, b0)
is stored in lane 0, and the result of dot(a, b1)
is stored in lane 1.
|
staticnoexcept |
Calculates the dot products dot(a, b0)
, dot(a, b1)
, and dot(a, b2)
between four-dimensional vectors and sets the results in lanes 0, 1, and 2.
[in] | a | A four-dimensional vector. |
[in] | b0 | A four-dimensional vector. |
[in] | b1 | A four-dimensional vector. |
[in] | b2 | A four-dimensional vector. |
dot(a, b0)
is stored in lane 0, the result of dot(a, b1)
is stored in lane 1, and the result of dot(a, b2)
is stored in lane 2.
|
staticnoexcept |
Calculates the dot products dot(a, b0)
, dot(a, b1)
, dot(a, b2)
, and dot(a, b3)
between four-dimensional vectors and sets the results in lanes 0, 1, 2, and 3.
[in] | a | A four-dimensional vector. |
[in] | b0 | A four-dimensional vector. |
[in] | b1 | A four-dimensional vector. |
[in] | b2 | A four-dimensional vector. |
[in] | b3 | A four-dimensional vector. |
dot(a, b0)
is stored in lane 0, the result of dot(a, b1)
is stored in lane 1, the result of dot(a, b2)
is stored in lane 2, and the result of dot(a, b3)
is stored in lane 3.
|
staticnoexcept |
Calculates the dot product between two four-dimensional vectors and sets the value in the various lanes.
SetLane0 | Specify true to store the dot product in lane 0, or false to store 0.f . |
SetLane1 | Specify true to store the dot product in lane 1, or false to store 0.f . |
SetLane2 | Specify true to store the dot product in lane 2, or false to store 0.f . |
SetLane3 | Specify true to store the dot product in lane 3, or false to store 0.f . |
[in] | vec1 | A four-dimensional vector. |
[in] | vec2 | A four-dimensional vector. |
0.f
is stored in each element.
|
staticnoexcept |
Calculates the angle (in radians) between two normalized four-dimensional vectors.
[in] | vec1_normalized | A normalized four-dimensional vector. |
[in] | vec2_normalized | A normalized four-dimensional vector. |
|
inlinestaticnoexcept |
Evaluates whether the elements of vec are inside the bounds of bounds.
[in] | vec | A four-dimensional vector. |
[in] | bounds | The four-dimensional box that defines the bounds. |
true
if it is inside the bounds, and false
otherwise.Definition at line 45 of file SimdVector4.h.
|
inlinestaticnoexcept |
Evaluates whether any of the elements of vec are positive infinity or negative infinity.
[in] | vec | A four-dimensional vector. |
true
if vec has any infinite elements, and false
otherwise. Definition at line 42 of file SimdVector4.h.
|
inlinestaticnoexcept |
Evaluates whether any of the elements of vec are NaN
.
[in] | vec | A four-dimensional vector. |
true
if any of the elements of vec are NaN
, and false
otherwise. Definition at line 39 of file SimdVector4.h.
|
staticnoexcept |
Calculates the length of a four-dimensional vector.
[in] | vec | A four-dimensional vector. |
|
staticnoexcept |
Calculates the length of a four-dimensional vector with relatively low precision.
[in] | vec | A four-dimensional vector. |
|
staticnoexcept |
Calculates the square of the length of a four-dimensional vector.
[in] | vec | A four-dimensional vector. |
|
staticnoexcept |
Loads a four-dimensional vector from memory.
MyVector4 | A structure with a contiguous region in memory for the float -type public data members x, y, z, and w. |
[in] | p | Pointer to where the four-dimensional vector is stored. |
MyVector4
is a class like nn::nlib::simd::Float4
in nlib
or XMFLOAT4
and XMFLOAT4A
in DirectX.
|
staticnoexcept |
Normalizes a four-dimensional vector.
[in] | vec | A four-dimensional vector. |
NaN
vector. If it has a length of zero, each element returns a 0
vector.
|
staticnoexcept |
Normalizes a four-dimensional vector with relatively low precision.
[in] | vec | A four-dimensional vector. |
|
staticnoexcept |
Calculates the reciprocal of the length of a four-dimensional vector.
[in] | vec | A four-dimensional vector. |
|
staticnoexcept |
Calculates the reciprocal of the length of a four-dimensional vector with relatively low precision.
[in] | vec | A four-dimensional vector. |
|
staticnoexcept |
Reflects a four-dimensional vector using a four-dimensional normal vector.
[in] | vec | The four-dimensional vector to reflect. |
[in] | normal | The four-dimensional normal vector (unit vector). |
|
staticnoexcept |
Writes a four-dimensional vector to memory.
MyVector4 | A structure with a contiguous region in memory for the float -type public data members x, y, z, and w. |
[in,out] | p | Pointer to where the four-dimensional vector is stored. |
[in] | vec | A four-dimensional vector. |
MyVector4
is a class like XMFLOAT4
and XMFLOAT4A
in DirectX.
|
staticnoexcept |
Transforms a four-dimensional vector using a matrix.
[in] | vec | A four-dimensional vector. |
[in] | m | The transform matrix. |
© 2012-2016 Nintendo Co., Ltd. All rights reserved.