Math/Angle: Adds conversion to euler angles and quaternions

This commit is contained in:
Lynix
2018-09-05 21:51:32 +02:00
parent 1114bb0fdd
commit 1ee75f2699
3 changed files with 132 additions and 9 deletions

View File

@@ -18,6 +18,9 @@ namespace Nz
{
struct SerializationContext;
template<typename T> class EulerAngles;
template<typename T> class Quaternion;
template<AngleUnit Unit, typename T>
class Angle
{
@@ -45,13 +48,20 @@ namespace Nz
template<typename U> Angle& Set(const Angle<Unit, U>& Angle);
Angle<AngleUnit::Degree, T> ToDegrees() const;
EulerAngles<T> ToEulerAngles() const;
Quaternion<T> ToQuaternion() const;
Angle<AngleUnit::Radian, T> ToRadians() const;
String ToString() const;
operator EulerAngles<T>() const;
operator Quaternion<T>() const;
Angle& operator=(const Angle&) = default;
Angle operator+(const Angle& other) const;
Angle operator-(const Angle& other) const;
Angle operator*(T scalar) const;
Angle operator/(T divider) const;
Angle& operator+=(const Angle& other);
Angle& operator-=(const Angle& other);