Harlinn.Windows 0.1
|
#include <VectorMath.h>
Public Types | |
using | QuaternionType = QuaternionT |
using | ValueType = typename QuaternionType::ValueType |
using | size_type = size_t |
using | value_type = ValueType |
using | Vector = typename Vector<value_type, 3> |
using | VectorSimd = typename Vector::Simd |
using | Normal = Normal3f |
using | NormalSimd = typename Normal::Simd |
using | Simd = QuaternionSimd<QuaternionT> |
using | Matrix = SquareMatrix<ValueType, 4> |
using | MatrixSimd = SquareMatrixSimd<Matrix, 4> |
using | Traits = typename QuaternionType::Traits |
using | SIMDType = typename Traits::SIMDType |
Public Member Functions | |
QuaternionSimd () noexcept | |
QuaternionSimd (const QuaternionSimd &other) noexcept | |
QuaternionSimd (SIMDType other) noexcept | |
template<SimdType T> | |
QuaternionSimd (const T &pitchYawRoll) | |
Creates a quaternion based on the pitch, yaw, and roll (Euler angles). | |
template<TupleType T> | |
QuaternionSimd (const T &pitchYawRoll) | |
Creates a quaternion based on the pitch, yaw, and roll (Euler angles). | |
template<SimdType T> | |
QuaternionSimd (const T &xyz, value_type w) | |
template<TupleType T> | |
QuaternionSimd (const T &xyz, value_type w) | |
QuaternionSimd (ValueType pitch, ValueType yaw, ValueType roll) noexcept | |
Creates a quaternion based on the pitch, yaw, and roll (Euler angles). | |
QuaternionSimd (const QuaternionType &quaternion) noexcept | |
constexpr | QuaternionSimd (ValueType xv, ValueType yv, ValueType zv, ValueType wv) noexcept |
QuaternionSimd & | operator= (const QuaternionSimd &other) noexcept |
QuaternionSimd & | operator= (SIMDType other) noexcept |
QuaternionSimd & | operator= (const QuaternionType &quaternion) noexcept |
bool | operator== (const QuaternionSimd &other) const noexcept |
bool | operator!= (const QuaternionSimd &other) const noexcept |
bool | operator== (const QuaternionType &other) const noexcept |
bool | operator!= (const QuaternionType &other) const noexcept |
QuaternionSimd | operator- () const noexcept |
QuaternionSimd & | operator+= (const QuaternionSimd &other) noexcept |
QuaternionSimd & | operator+= (ValueType value) noexcept |
QuaternionSimd & | operator+= (const QuaternionType &quaternion) noexcept |
QuaternionSimd & | operator-= (const QuaternionSimd &other) noexcept |
QuaternionSimd & | operator-= (ValueType value) noexcept |
QuaternionSimd & | operator-= (const QuaternionType &quaternion) noexcept |
QuaternionSimd & | operator*= (const QuaternionSimd &other) noexcept |
QuaternionSimd & | operator*= (ValueType value) noexcept |
QuaternionSimd & | operator*= (const QuaternionType &quaternion) noexcept |
QuaternionSimd & | operator/= (ValueType value) noexcept |
VectorSimd | ToEuler () const noexcept |
Computes rotation about y-axis (y), then x-axis (x), then z-axis (z) | |
template<size_t N> requires ( N > 2 ) | |
QuaternionSimd< QuaternionT > | FromMatrix (const std::array< SIMDType, N > &matrix) noexcept |
Static Public Member Functions | |
template<SimdType T> requires IsCompatible<T, VectorSimd> | |
static QuaternionSimd | FromNormalizedAxisAndAngle (const T &normalizedAxis, float angle) noexcept |
Creates a rotation quaternion around a normalized axis. | |
template<TupleType T> requires IsCompatible<T, Vector> | |
static QuaternionSimd | FromNormalizedAxisAndAngle (const T &normalizedAxis, float angle) noexcept |
Creates a rotation quaternion around a normalized axis. | |
static QuaternionSimd | FromAxisAndAngle (const Math::Vector< float, 3 >::Simd &axis, float angle) noexcept |
Creates a rotation quaternion around an axis. | |
static QuaternionSimd | FromAxisAndAngle (const Math::Vector< float, 3 > &axis, float angle) noexcept |
Creates a rotation quaternion around an axis. | |
template<size_t N> requires ( N > 2 ) | |
static QuaternionSimd | FromMatrix (const std::array< SIMDType, N > &matrix) noexcept |
Creates a rotation quaternion from a rotation matrix. | |
static QuaternionSimd | FromMatrix (const MatrixSimd &matrix) noexcept |
Creates a rotation quaternion from a rotation matrix. | |
static QuaternionSimd | FromMatrix (const Matrix &matrix) noexcept |
Creates a rotation quaternion from a rotation matrix. | |
template<SimdType T, SimdType U> requires IsCompatible<T, VectorSimd, U> | |
static QuaternionSimd | ShortestArc (const T &fromDir, const U &toDir) noexcept |
Creates the shortest-arc rotation between two directions. | |
template<SimdType T, TupleType U> requires IsCompatible<T, VectorSimd, U> | |
static QuaternionSimd | ShortestArc (const T &fromDir, const U &toDir) noexcept |
Creates the shortest-arc rotation between two directions. | |
template<TupleType T, SimdType U> requires IsCompatible<T, VectorSimd, U> | |
static QuaternionSimd | ShortestArc (const T &fromDir, const U &toDir) noexcept |
Creates the shortest-arc rotation between two directions. | |
template<TupleType T, TupleType U> requires IsCompatible<T, VectorSimd, U> | |
static QuaternionSimd | ShortestArc (const T &fromDir, const U &toDir) noexcept |
Creates the shortest-arc rotation between two directions. | |
static constexpr QuaternionSimd | Identity () noexcept |
Returns the identity quaternion. | |
static constexpr QuaternionSimd | Zero () noexcept |
Returns a quaternion with all elements set to zero. | |
Public Attributes | |
SIMDType | simd |
Static Public Attributes | |
static constexpr size_type | Size = 4 |
static constexpr size_type | Capacity = Traits::SIMDTypeCapacity |
using Harlinn::Math::QuaternionSimd< QuaternionT >::Matrix = SquareMatrix<ValueType, 4> |
using Harlinn::Math::QuaternionSimd< QuaternionT >::MatrixSimd = SquareMatrixSimd<Matrix, 4> |
using Harlinn::Math::QuaternionSimd< QuaternionT >::Normal = Normal3f |
using Harlinn::Math::QuaternionSimd< QuaternionT >::NormalSimd = typename Normal::Simd |
using Harlinn::Math::QuaternionSimd< QuaternionT >::QuaternionType = QuaternionT |
using Harlinn::Math::QuaternionSimd< QuaternionT >::Simd = QuaternionSimd<QuaternionT> |
using Harlinn::Math::QuaternionSimd< QuaternionT >::SIMDType = typename Traits::SIMDType |
using Harlinn::Math::QuaternionSimd< QuaternionT >::size_type = size_t |
using Harlinn::Math::QuaternionSimd< QuaternionT >::Traits = typename QuaternionType::Traits |
using Harlinn::Math::QuaternionSimd< QuaternionT >::value_type = ValueType |
using Harlinn::Math::QuaternionSimd< QuaternionT >::ValueType = typename QuaternionType::ValueType |
using Harlinn::Math::QuaternionSimd< QuaternionT >::Vector = typename Vector<value_type, 3> |
using Harlinn::Math::QuaternionSimd< QuaternionT >::VectorSimd = typename Vector::Simd |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inline |
Creates a quaternion based on the pitch, yaw, and roll (Euler angles).
pitchYawRoll | A vector containing the Euler angles in the order pitch (around x-axis), then yaw (around y-axis), and then roll (around z-axis). |
|
inline |
Creates a quaternion based on the pitch, yaw, and roll (Euler angles).
pitchYawRoll | A vector containing the Euler angles in the order pitch (around x-axis), then yaw (around y-axis), and then roll (around z-axis). |
|
inline |
|
inline |
|
inlinenoexcept |
Creates a quaternion based on the pitch, yaw, and roll (Euler angles).
pitch | Angle of rotation around the x-axis, in radians. |
yaw | Angle of rotation around the y-axis, in radians. |
roll | Angle of rotation around the z-axis, in radians. |
|
inlineexplicitnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticnoexcept |
Creates a rotation quaternion around an axis.
normalizedAxis | A vector describing the axis of rotation. |
angle | The angle of rotation in radians. |
|
inlinestaticnoexcept |
Creates a rotation quaternion around an axis.
normalizedAxis | A vector describing the axis of rotation. |
angle | The angle of rotation in radians. |
|
inlinestaticnoexcept |
Creates a rotation quaternion from a rotation matrix.
matrix | The rotation matrix. |
|
inlinestaticnoexcept |
Creates a rotation quaternion from a rotation matrix.
matrix | The rotation matrix. |
|
staticnoexcept |
Creates a rotation quaternion from a rotation matrix.
matrix | The rotation matrix. |
|
inlinenoexcept |
|
inlinestaticnoexcept |
Creates a rotation quaternion around a normalized axis.
normalizedAxis | A normalized vector describing the axis of rotation. |
angle | The angle of rotation in radians. |
|
inlinestaticnoexcept |
Creates a rotation quaternion around a normalized axis.
normalizedAxis | A normalized vector describing the axis of rotation. |
angle | The angle of rotation in radians. |
|
inlinestaticconstexprnoexcept |
Returns the identity quaternion.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
Creates the shortest-arc rotation between two directions.
fromDir | The from direction. |
///
toDir | The to direction. |
|
inlinestaticnoexcept |
Creates the shortest-arc rotation between two directions.
fromDir | The from direction. |
///
toDir | The to direction. |
|
inlinestaticnoexcept |
Creates the shortest-arc rotation between two directions.
fromDir | The from direction. |
///
toDir | The to direction. |
|
inlinestaticnoexcept |
Creates the shortest-arc rotation between two directions.
fromDir | The from direction. |
///
toDir | The to direction. |
|
inlinenoexcept |
Computes rotation about y-axis (y), then x-axis (x), then z-axis (z)
|
inlinestaticconstexprnoexcept |
Returns a quaternion with all elements set to zero.
|
staticconstexpr |
SIMDType Harlinn::Math::QuaternionSimd< QuaternionT >::simd |
|
staticconstexpr |