nlib
|
The class with the collection of functions that perform calculations on three-dimensional vectors. All of these functions ignore the values set in lane 3. More...
#include "nn/nlib/simd/SimdVector3.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 three-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 three-dimensional vectors and sets the value in the various lanes. More... | |
static SimdVector | Cross (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Calculates the cross product between two three-dimensional vectors. More... | |
static SimdVector | Normalize (SimdVectorArg vec) noexcept |
Normalizes a three-dimensional vector. More... | |
static SimdVector | NormalizeEst (SimdVectorArg vec) noexcept |
Normalizes a three-dimensional vector with relatively low precision. More... | |
static float | Normalize (SimdVector *normalized, SimdVectorArg vec) noexcept |
Normalizes a three-dimensional vector. More... | |
static float | NormalizeEst (SimdVector *normalized, SimdVectorArg vec) noexcept |
Normalizes a three-dimensional vector with relatively low precision. More... | |
static f128 | LengthSq (SimdVectorArg vec) noexcept |
Calculates the square of the length of a three-dimensional vector. More... | |
static f128 | Length (SimdVectorArg vec) noexcept |
Calculates the length of a three-dimensional vector. More... | |
static f128 | LengthEst (SimdVectorArg vec) noexcept |
Calculates the length of a three-dimensional vector with relatively low precision. More... | |
static f128 | RecpLength (SimdVectorArg vec) noexcept |
Calculates the reciprocal of the length of a three-dimensional vector. More... | |
static f128 | RecpLengthEst (SimdVectorArg vec) noexcept |
Calculates the reciprocal of the length of a three-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 three-dimensional vectors. More... | |
static SimdVector | Reflect (SimdVectorArg vec, SimdVectorArg normal) noexcept |
Reflects a three-dimensional vector using a three-dimensional normal vector. More... | |
static SimdVector | Transform (SimdVectorArg vec, SimdMatrixArg m) noexcept |
Transforms a three-dimensional vector using a matrix. (The calculation treats the value of lane 3 (the w element) as 1 .) More... | |
static SimdVector | TransformCoord (SimdVectorArg vec, SimdMatrixArg m) noexcept |
Transforms a three-dimensional vector using a matrix. (The calculation treats the value of lane 3 (the w element) as 1 .) More... | |
static SimdVector | TransformNormal (SimdVectorArg vec, SimdMatrixArg m) noexcept |
Transforms a three-dimensional vector using a matrix. (The calculation treats the value of lane 3 (the w element) as 1 .) More... | |
static SimdVector | Rotate (SimdVectorArg vec, SimdQuaternionArg q_normalized) noexcept |
Rotates a vector using quaternions. More... | |
static SimdVector | InvRotate (SimdVectorArg vec, SimdQuaternionArg q_normalized) noexcept |
Rotates a vector in the opposite direction using quaternions. More... | |
Loading and Storing | |
static SimdVector | LoadFloat3 (const Float3 *p) noexcept |
Loads a three-dimensional vector from memory. More... | |
template<typename MyVector3 > | |
static SimdVector | LoadFloat3 (const MyVector3 *p) noexcept |
Loads a three-dimensional vector from memory. More... | |
static void | StoreFloat3 (Float3 *p, SimdVectorArg vec) noexcept |
Writes a three-dimensional vector to memory. More... | |
template<typename MyVector3 > | |
static void | StoreFloat3 (MyVector3 *p, SimdVectorArg vec) noexcept |
Writes a three-dimensional vector to memory. More... | |
Comparisons | |
static bool | CmpEq (SimdVectorArg vec1, SimdVectorArg vec2) noexcept |
Compares two three-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 three-dimensional vectors. All of these functions ignore the values set in lane 3.
F128
class to perform independent calculations on separate elements. Definition at line 26 of file SimdVector3.h.
|
staticnoexcept |
Compares two three-dimensional vectors to see if they are equal.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
true
if the vector elements are the same, and false
otherwise.
|
staticnoexcept |
Checks to see whether all of the elements of vec1 are equal or greater than the corresponding elements of vec2.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
true
if vec1 is equal or greater than vec2, and false
otherwise.
|
staticnoexcept |
Checks to see whether all of the elements of vec1 are larger than the corresponding elements of vec2.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
true
if vec1 is smaller than vec2, and false
otherwise.
|
staticnoexcept |
Checks to see whether all of the elements of vec1 are equal or less than the corresponding elements of vec2.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
true
if vec1 is equal or less than vec2, and false
otherwise.
|
staticnoexcept |
Checks to see whether all of the elements of vec1 are smaller than the corresponding elements of vec2.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
true
if vec1 is smaller than vec2, and false
otherwise.
|
staticnoexcept |
Compares vec1 and vec2 to see whether they are unequal.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
true
if vec1 is not equal to vec2, and false
otherwise.
|
staticnoexcept |
Compares vec1 and vec2 to see whether they are nearly equal.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
[in] | eps | A tolerance value. |
true
if vec1 is nearly equal to vec2, and false
otherwise.
|
staticnoexcept |
Calculates the cross product between two three-dimensional vectors.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
|
staticnoexcept |
Calculates the dot product between three-dimensional vectors.
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
|
staticnoexcept |
Calculates the dot product between two three-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 . |
SetLane1 | Specify true to store the dot product in lane 1, or false to store 0 . |
SetLane2 | Specify true to store the dot product in lane 2, or false to store 0 . |
SetLane3 | Specify true to store the dot product in lane 3, or false to store 0 . |
[in] | vec1 | A three-dimensional vector. |
[in] | vec2 | A three-dimensional vector. |
0.f
is stored in each element.
|
staticnoexcept |
Calculates the angle (in radians) between two normalized three-dimensional vectors.
[in] | vec1_normalized | A normalized three-dimensional vector. |
[in] | vec2_normalized | A normalized three-dimensional vector. |
|
staticnoexcept |
Evaluates whether the elements of vec are inside the bounds of bounds.
[in] | vec | A three-dimensional vector. |
[in] | bounds | The three-dimensional box that defines the bounds. |
true
if it is inside the bounds, and false
otherwise.
|
staticnoexcept |
Rotates a vector in the opposite direction using quaternions.
[in] | vec | The vector to rotate. |
[in] | q_normalized | Normalized quaternion. |
|
staticnoexcept |
Evaluates whether any of the elements of vec are positive infinity or negative infinity.
[in] | vec | A three-dimensional vector. |
true
if vec has any infinite elements, and false
otherwise.
|
staticnoexcept |
Evaluates whether any of the elements of vec are NaN
.
[in] | vec | A three-dimensional vector. |
true
if any of the elements of vec are NaN
, and false
otherwise.
|
staticnoexcept |
Calculates the length of a three-dimensional vector.
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Calculates the length of a three-dimensional vector with relatively low precision.
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Calculates the square of the length of a three-dimensional vector.
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Loads a three-dimensional vector from memory.
[in] | p | Pointer to where the three-dimensional vector is stored. |
|
staticnoexcept |
Loads a three-dimensional vector from memory.
MyVector3 | A structure with a contiguous region in memory for the float -type public data members x, y, and z. |
[in] | p | Pointer to where the three-dimensional vector is stored. |
MyVector3
is a class like XMFLOAT3
and XMFLOAT3A
in DirectX.
|
staticnoexcept |
Normalizes a three-dimensional vector.
[in] | vec | A three-dimensional vector. |
NaN
vector. If it has a length of zero, each element returns a 0
vector.
|
staticnoexcept |
Normalizes a three-dimensional vector.
[out] | normalized | A normalized three-dimensional vector. |
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Normalizes a three-dimensional vector with relatively low precision.
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Normalizes a three-dimensional vector with relatively low precision.
[out] | normalized | A normalized three-dimensional vector. |
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Calculates the reciprocal of the length of a three-dimensional vector.
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Calculates the reciprocal of the length of a three-dimensional vector with relatively low precision.
[in] | vec | A three-dimensional vector. |
|
staticnoexcept |
Reflects a three-dimensional vector using a three-dimensional normal vector.
[in] | vec | The three-dimensional vector to reflect. |
[in] | normal | The three-dimensional normal vector (unit vector). |
|
staticnoexcept |
Rotates a vector using quaternions.
[in] | vec | The vector to rotate. |
[in] | q_normalized | Normalized quaternion. |
|
staticnoexcept |
Writes a three-dimensional vector to memory.
[in,out] | p | Pointer to where the three-dimensional vector is stored. |
[in] | vec | A three-dimensional vector. (The w element is not stored in memory.) |
|
staticnoexcept |
Writes a three-dimensional vector to memory.
MyVector3 | A structure with a contiguous region in memory for the float -type public data members x, y, and z. |
[in,out] | p | Pointer to where the three-dimensional vector is stored. |
[in] | vec | A three-dimensional vector. (The w element is not stored in memory.) |
MyVector3
is a class like XMFLOAT3
and XMFLOAT3A
in DirectX.
|
staticnoexcept |
Transforms a three-dimensional vector using a matrix. (The calculation treats the value of lane 3 (the w element) as 1
.)
[in] | vec | A three-dimensional vector. |
[in] | m | The transform matrix. |
1
for the value of lane 3 (the w element) of the vec argument. The vector that results from the calculation does not usually have homogenous coordinates. (Lane 3 (element w) is probably not 1.0
.)
|
staticnoexcept |
Transforms a three-dimensional vector using a matrix. (The calculation treats the value of lane 3 (the w element) as 1
.)
[in] | vec | A three-dimensional vector. |
[in] | m | The transform matrix. |
1
for the value of lane 3 (the w element) of the vec argument. The vector that results from the calculation has homogenous coordinates. (Lane 3 (element w) is 1.0
.)
|
staticnoexcept |
Transforms a three-dimensional vector using a matrix. (The calculation treats the value of lane 3 (the w element) as 1
.)
[in] | vec | A three-dimensional vector. |
[in] | m | The transform matrix. |
© 2012-2017 Nintendo Co., Ltd. All rights reserved.