|
SA_Maths
Sapphire Suite's C++ Maths Library
|
Quaternion type implementation. More...
#include <cstdint>#include <SA/Maths/Debug.hpp>#include <SA/Maths/Config.hpp>#include <SA/Maths/Angle/Degree.hpp>#include <SA/Maths/Algorithms/Cos.hpp>#include <SA/Maths/Algorithms/Sin.hpp>#include <SA/Maths/Algorithms/Tan.hpp>#include <SA/Maths/Algorithms/Sqrt.hpp>#include <SA/Maths/Algorithms/Lerp.hpp>#include <SA/Maths/Algorithms/Equals.hpp>#include <SA/Maths/Space/Quaternion.inl>Go to the source code of this file.
Classes | |
| struct | SA::Quat< T > |
| Quaternion Sapphire-Maths class. More... | |
Typedefs | |
| using | SA::Quatf = Quat<float> |
| Alias for float Quat. | |
| using | SA::Quatd = Quat<double> |
| Alias for double Quat. | |
| template<typename T > | |
| using | SA::Quaternion = Quat<T> |
| Template alias of Quat. | |
| using | SA::Quaternionf = Quaternion<float> |
| Alias for float Quaternion. | |
| using | SA::Quaterniond = Quaternion<double> |
| Alias for double Quaternion. | |
Functions | |
| template<typename T > | |
| constexpr Quat< T > | SA::operator* (typename std::remove_cv< T >::type _lhs, const Quat< T > &_rhs) noexcept |
| Scale each quaternion components by _lhs. | |
| template<typename T > | |
| Quat< T > | SA::operator/ (typename std::remove_cv< T >::type _lhs, const Quat< T > &_rhs) |
| Inverse Scale each quaternion components by _lhs. | |
| template<typename T > | |
| constexpr Vec3< T > | SA::operator* (const Vec3< T > &_lhs, const Quat< T > &_rhs) noexcept |
| Rotate _lhs vector by _rhs quaternion. | |
| template<typename T > | |
| constexpr Vec3< T > | SA::operator/ (const Vec3< T > &_lhs, const Quat< T > &_rhs) noexcept |
| Inverse-Rotate _lhs vector by _rhs quaternion. | |
Quaternion type implementation.
|
constexprnoexcept |
Rotate _lhs vector by _rhs quaternion.
Apply quaternion rotation to vector. Quaternion must be normalized.
| [in] | _lhs | Vector to rotate. |
| [in] | _rhs | Quaternion used for rotation. |
|
constexprnoexcept |
Scale each quaternion components by _lhs.
| [in] | _lhs | Scale value to apply on all axis. |
| [in] | _rhs | Quaternion to scale. |
|
constexprnoexcept |
Inverse-Rotate _lhs vector by _rhs quaternion.
Apply quaternion rotation to vector. Quaternion must be normalized.
| [in] | _lhs | Vector to rotate. |
| [in] | _rhs | Quaternion used for rotation. |
| Quat< T > SA::operator/ | ( | typename std::remove_cv< T >::type | _lhs, |
| const Quat< T > & | _rhs ) |
Inverse Scale each quaternion components by _lhs.
| [in] | _lhs | Inverse scale value to apply on all axis. |
| [in] | _rhs | Quaternion to scale. |