|
Harlinn.Windows 0.1
|
#include <VectorMath.h>
Classes | |
| struct | AxisAngle |
Public Types | |
| using | value_type = T |
| using | size_type = size_t |
| using | ValueType = value_type |
| using | SizeType = size_type |
| using | Traits = SIMD::Traits<ValueType, Size> |
| using | SIMDType = typename Traits::SIMDType |
| using | ArrayType = typename Traits::ArrayType |
| using | reference = typename ArrayType::reference |
| using | const_reference = typename ArrayType::const_reference |
| using | pointer = typename ArrayType::pointer |
| using | const_pointer = typename ArrayType::const_pointer |
| using | iterator = typename ArrayType::iterator |
| using | const_iterator = typename ArrayType::const_iterator |
| using | reverse_iterator = typename ArrayType::reverse_iterator |
| using | const_reverse_iterator = typename ArrayType::const_reverse_iterator |
| using | Simd = QuaternionSimd<Quaternion> |
| using | Vector = typename Vector<value_type, 3> |
| using | VectorSimd = typename Vector::Simd |
| using | Normal = Normal3f |
| using | NormalSimd = typename Normal::Simd |
| using | Matrix = SquareMatrix<ValueType, 4> |
| using | MatrixSimd = SquareMatrixSimd<Matrix, 4> |
Public Member Functions | |
| constexpr | Quaternion () noexcept |
| constexpr | Quaternion (ValueType xv, ValueType yv, ValueType zv, ValueType wv) noexcept |
| constexpr | Quaternion (const ArrayType &a) noexcept |
| template<TupleType T> requires IsCompatible<T, Vector> | |
| constexpr | Quaternion (const T &xyz, ValueType wv) noexcept |
| template<SimdType T> requires IsCompatible<T, Vector> | |
| constexpr | Quaternion (const T &xyz, ValueType wv) noexcept |
| Quaternion (const Simd &qsimd) noexcept | |
| Quaternion (ValueType pitch, ValueType yaw, ValueType roll) noexcept | |
| Creates a quaternion based on the pitch, yaw, and roll (Euler angles). | |
| Quaternion (const Quaternion &other) noexcept | |
| AxisAngle | ToAxisAngle () const noexcept |
| Returns the axis and angle of rotation about that axis for the quaternion. | |
| VectorSimd | ToEuler () const noexcept |
| Computes rotation about y-axis (y), then x-axis (x), then z-axis (z) | |
| Quaternion & | operator= (const Simd &qsimd) noexcept |
| Quaternion & | operator= (const Quaternion &other) noexcept |
| Simd | ToSimd () const noexcept |
| operator Simd () const noexcept | |
| bool | operator== (const Simd &other) const noexcept |
| bool | operator!= (const Simd &other) const noexcept |
| bool | operator== (const Quaternion &other) const noexcept |
| bool | operator!= (const Quaternion &other) const noexcept |
| Simd | operator- () const noexcept |
| const_reference | operator[] (size_t index) const noexcept |
| reference | operator[] (size_t index) noexcept |
| const_pointer | data () const noexcept |
| pointer | data () noexcept |
| constexpr size_t | size () const noexcept |
| const_reference | front () const noexcept |
| reference | front () noexcept |
| const_reference | back () const noexcept |
| reference | back () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | cbegin () const noexcept |
| iterator | begin () noexcept |
| const_iterator | end () const noexcept |
| const_iterator | cend () const noexcept |
| iterator | end () noexcept |
| const_reverse_iterator | rbegin () const noexcept |
| reverse_iterator | rbegin () noexcept |
| const_reverse_iterator | rend () const noexcept |
| reverse_iterator | rend () noexcept |
Static Public Member Functions | |
| template<SimdType T> requires IsCompatible<T, VectorSimd> | |
| static Simd | FromNormalizedAxisAndAngle (const T &normalizedAxis, float angle) noexcept |
| Creates a rotation quaternion around a normalized axis. | |
| template<TupleType T> requires IsCompatible<T, Vector> | |
| static Simd | FromNormalizedAxisAndAngle (const T &normalizedAxis, float angle) noexcept |
| Creates a rotation quaternion around a normalized axis. | |
| template<SimdType T> requires IsCompatible<T, VectorSimd> | |
| static Simd | FromAxisAndAngle (const T &axis, float angle) noexcept |
| Creates a rotation quaternion around an axis. | |
| template<TupleType T> requires IsCompatible<T, Vector> | |
| static Simd | FromAxisAndAngle (const T &axis, float angle) noexcept |
| Creates a rotation quaternion around an axis. | |
| static Simd | FromMatrix (const MatrixSimd &matrix) noexcept |
| Creates a rotation quaternion from a rotation matrix. | |
| static Simd | FromMatrix (const Matrix &matrix) noexcept |
| Creates a rotation quaternion from a rotation matrix. | |
| template<SimdType T, SimdType U> requires IsCompatible<T, VectorSimd, U> | |
| static Simd | 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 Simd | 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 Simd | 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 Simd | ShortestArc (const T &fromDir, const U &toDir) noexcept |
| Creates the shortest-arc rotation between two directions. | |
| static constexpr Quaternion | Identity () noexcept |
| Returns the identity quaternion. | |
Public Attributes | ||
| union { | ||
| ArrayType values | ||
| struct { | ||
| Vector v | ||
| ValueType w | ||
| } | ||
| }; | ||
Static Public Attributes | |
| static constexpr size_type | Size = 4 |
| static constexpr size_type | Capacity = Size |
| T |
| using Harlinn::Math::Quaternion< T >::ArrayType = typename Traits::ArrayType |
| using Harlinn::Math::Quaternion< T >::const_iterator = typename ArrayType::const_iterator |
| using Harlinn::Math::Quaternion< T >::const_pointer = typename ArrayType::const_pointer |
| using Harlinn::Math::Quaternion< T >::const_reference = typename ArrayType::const_reference |
| using Harlinn::Math::Quaternion< T >::const_reverse_iterator = typename ArrayType::const_reverse_iterator |
| using Harlinn::Math::Quaternion< T >::iterator = typename ArrayType::iterator |
| using Harlinn::Math::Quaternion< T >::Matrix = SquareMatrix<ValueType, 4> |
| using Harlinn::Math::Quaternion< T >::MatrixSimd = SquareMatrixSimd<Matrix, 4> |
| using Harlinn::Math::Quaternion< T >::Normal = Normal3f |
| using Harlinn::Math::Quaternion< T >::NormalSimd = typename Normal::Simd |
| using Harlinn::Math::Quaternion< T >::pointer = typename ArrayType::pointer |
| using Harlinn::Math::Quaternion< T >::reference = typename ArrayType::reference |
| using Harlinn::Math::Quaternion< T >::reverse_iterator = typename ArrayType::reverse_iterator |
| using Harlinn::Math::Quaternion< T >::Simd = QuaternionSimd<Quaternion> |
| using Harlinn::Math::Quaternion< T >::SIMDType = typename Traits::SIMDType |
| using Harlinn::Math::Quaternion< T >::size_type = size_t |
| using Harlinn::Math::Quaternion< T >::SizeType = size_type |
| using Harlinn::Math::Quaternion< T >::Traits = SIMD::Traits<ValueType, Size> |
| using Harlinn::Math::Quaternion< T >::value_type = T |
| using Harlinn::Math::Quaternion< T >::ValueType = value_type |
| using Harlinn::Math::Quaternion< T >::Vector = typename Vector<value_type, 3> |
| using Harlinn::Math::Quaternion< T >::VectorSimd = typename Vector::Simd |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
|
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. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
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. |
|
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. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticconstexprnoexcept |
Returns the identity quaternion.
|
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. |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Returns the axis and angle of rotation about that axis for the quaternion.
|
inlinenoexcept |
Computes rotation about y-axis (y), then x-axis (x), then z-axis (z)
Adopted from https://github.com/microsoft/DirectXTK12
|
inlinenoexcept |
| union { ... } Harlinn::Math::Quaternion< T > |
|
staticconstexpr |
|
staticconstexpr |
| Vector Harlinn::Math::Quaternion< T >::v |
| ArrayType Harlinn::Math::Quaternion< T >::values |
| ValueType Harlinn::Math::Quaternion< T >::w |