7 #ifndef CAFU_MATH_ANGLES_HPP_INCLUDED
8 #define CAFU_MATH_ANGLES_HPP_INCLUDED
10 #include "Vector3.hpp"
93 const T&
pitch()
const {
return this->
x; }
96 const T&
roll()
const {
return this->
y; }
98 T&
yaw() {
return this->
z; }
99 const T&
yaw()
const {
return this->
z; }
102 static const double PI;
103 static T
RadToDeg(
const T Angle) {
return Angle*T(180.0/
PI); }
104 static T
DegToRad(
const T Angle) {
return Angle*T(
PI/180.0); }
114 typedef AnglesT<float> AnglesfT;
117 typedef AnglesT<double> AnglesdT;
T & yaw()
Provides the alias for the angle of rotation around the z-axis.
Definition: Angles.hpp:98
This class represents a triple of angles.
Definition: Angles.hpp:71
T & roll()
Provides the alias for the angle of rotation around the y-axis. TODO: The impl. should actually use x...
Definition: Angles.hpp:95
static T DegToRad(const T Angle)
Converts the given angle from degrees to radians.
Definition: Angles.hpp:104
AnglesT(const Vector3T< T > &v)
A constructor for initializing an Angles instance from a Vector3T.
Definition: Angles.hpp:82
T y
The y-component of this vector.
Definition: Vector3.hpp:41
T & pitch()
Provides the alias for the angle of rotation around the x-axis. TODO: The impl. should actually use y...
Definition: Angles.hpp:92
This class represents a polymorphic 3-dimensional vector.
Definition: Misc.hpp:11
const T & roll() const
Provides the alias for the angle of rotation around the y-axis.
Definition: Angles.hpp:96
AnglesT()
The default constructor. It initializes all angles to zero.
Definition: Angles.hpp:76
AnglesT(T x_, T y_, T z_)
This constructor initializes the angles from x_, y_ and z_ respectively.
Definition: Angles.hpp:79
const T & yaw() const
Provides the alias for the angle of rotation around the z-axis.
Definition: Angles.hpp:99
const T & pitch() const
Provides the alias for the angle of rotation around the x-axis.
Definition: Angles.hpp:93
static const double PI
This is PI.
Definition: Angles.hpp:102
T z
The z-component of this vector.
Definition: Vector3.hpp:42
This class represents a quaternion.
Definition: Angles.hpp:18
T x
The x-component of this vector.
Definition: Vector3.hpp:40
static T RadToDeg(const T Angle)
Converts the given angle from radians to degrees.
Definition: Angles.hpp:103
This class represents a generic 3x3 matrix.
Definition: Angles.hpp:17