|
JPL Spatial
Sound spatialization and propagation library
|
Minimal quaternion (w + xi + yj + zk) More...
#include <JPLSpatial/Math/MinimalQuat.h>
Public Types | |
| using | Float = Internal::FloatOf< Vec3 > |
Public Member Functions | |
| bool | operator== (const Quat &rhs) const noexcept |
| Check if two quaternions are exactly equal. | |
| bool | operator!= (const Quat &rhs) const noexcept |
| JPL_INLINE Quat | Conjugated () const noexcept |
| JPL_INLINE Quat | Inversed () const noexcept |
| JPL_INLINE Vec3 | Rotate (const Vec3 &vector) const noexcept |
| Rotate a vector by this quaternion. | |
| JPL_INLINE Float | LengthSquared () const noexcept |
| JPL_INLINE Float | Length () const noexcept |
| JPL_INLINE Quat | Normalized () const noexcept |
| JPL_INLINE bool | IsNormalized (Float tolerance=Float(1.0e-5)) const noexcept |
| JPL_INLINE Float | GetRotationAngle (const Vec3 &axis) const noexcept |
| Get rotation angle around axis. | |
| Basis< Vec3 > | ToBasis () const noexcept |
| Convert to an orthonormal Basis3 (column-major) | |
Static Public Member Functions | |
| static JPL_INLINE Quat | Identity () noexcept |
| static JPL_INLINE Quat | Rotation (const Vec3 &axis, Float angleRad) noexcept |
| static Quat | FromTo (const Vec3 &from, const Vec3 &to) noexcept |
| static Quat | FromBasis (const Basis< Vec3 > &basis) noexcept |
| Construct quaternian from basis columns X, Y, Z. | |
| static JPL_INLINE Quat | FromUpAndForward (const Vec3 &up, const Vec3 &forward) noexcept |
| static JPL_INLINE Quat | LookAt (const Vec3 &direction, const Vec3 &up) noexcept |
| static JPL_INLINE Quat | MakeSlerp (const Vec3 &from, const Vec3 &to, Float t) noexcept |
| Create quaternian to slerp direction vector based on 'from' and 'to'. | |
Public Attributes | |
| Vec3 | V |
| Float | W |
Friends | |
| JPL_INLINE friend Quat | operator* (const Quat &a, const Quat &b) noexcept |
| Quaternion multiplication (rotation composition) | |
Minimal quaternion (w + xi + yj + zk)
| using JPL::Quat< Vec3 >::Float = Internal::FloatOf<Vec3> |
|
inlinenoexcept |
|
inlinestaticnoexcept |
Construct quaternian from basis columns X, Y, Z.
|
inlinestaticnoexcept |
Find quaternian rotation between two unit vectors Input vectors must be normalized
|
inlinestaticnoexcept |
Construct rotation quaternion from up and forward axis Input parameters must be normalized.
|
inlinenoexcept |
Get rotation angle around axis.
|
inlinestaticnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
Create quaternian to slerp direction vector based on 'from' and 'to'.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Check if two quaternions are exactly equal.
|
inlinenoexcept |
Rotate a vector by this quaternion.
|
inlinestaticnoexcept |
Construct quaternion from the a rotation around the given axis.
| axis | : must be a normalized direction vector |
Convert to an orthonormal Basis3 (column-major)
|
friend |
Quaternion multiplication (rotation composition)
| Vec3 JPL::Quat< Vec3 >::V |