Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Math class that represents an Euler angle. Those describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order. More...
Public Member Functions | |
EulerAngles (T P, T Y, T R) | |
Constructs a EulerAngles object from its components. More... | |
EulerAngles (const T angles[3]) | |
Constructs a EulerAngles object from an array of three elements. More... | |
EulerAngles (const Quaternion< T > &quat) | |
Constructs a EulerAngles object from a quaternion. More... | |
template<typename U > | |
EulerAngles (const EulerAngles< U > &angles) | |
Constructs a EulerAngles object from another type of EulerAngles. More... | |
EulerAngles (const EulerAngles &angles)=default | |
void | MakeZero () |
Makes the euler angle (0, 0, 0) More... | |
EulerAngles & | Normalize () |
Normalizes the euler angle. More... | |
EulerAngles & | Set (T P, T Y, T R) |
Sets the components of the euler angle. More... | |
EulerAngles & | Set (const T angles[3]) |
Sets the components of the euler angle from an array of three elements. More... | |
EulerAngles & | Set (const EulerAngles< T > &angles) |
Sets the components of the euler angle from another euler angle. More... | |
EulerAngles & | Set (const Quaternion< T > &quat) |
Sets the components of the euler angle from a quaternion. More... | |
template<typename U > | |
EulerAngles & | Set (const EulerAngles< U > &angles) |
Quaternion< T > | ToQuaternion () const |
Converts the euler angle to quaternion. More... | |
String | ToString () const |
Gives a string representation. More... | |
EulerAngles | operator+ (const EulerAngles &angles) const |
Adds the components of the euler angle with other euler angle. More... | |
EulerAngles | operator- (const EulerAngles &angles) const |
Substracts the components of the euler angle with other euler angle. More... | |
EulerAngles & | operator= (const EulerAngles &other)=default |
EulerAngles & | operator+= (const EulerAngles &angles) |
Adds the components of other euler angle to this euler angle. More... | |
EulerAngles & | operator-= (const EulerAngles &angles) |
Substracts the components of other euler angle to this euler angle. More... | |
bool | operator== (const EulerAngles &angles) const |
Compares the euler angle to other one. More... | |
bool | operator!= (const EulerAngles &angles) const |
Compares the euler angle to other one. More... | |
template<typename U > | |
EulerAngles< T > & | Set (const EulerAngles< U > &angles) |
Sets the components of the euler angle from another type of EulerAngles. More... | |
Static Public Member Functions | |
static EulerAngles | Zero () |
Shorthand for the euler angle (0, 0, 0) More... | |
Public Attributes | |
T | pitch |
T | yaw |
T | roll |
Math class that represents an Euler angle. Those describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
Nz::EulerAngles< T >::EulerAngles | ( | T | P, |
T | Y, | ||
T | R | ||
) |
Constructs a EulerAngles object from its components.
P | Pitch component = X axis |
Y | Yaw component = Y axis |
R | Roll component = Z axis |
Nz::EulerAngles< T >::EulerAngles | ( | const T | angles[3] | ) |
Constructs a EulerAngles object from an array of three elements.
angles[3] | angles[0] is pitch component, angles[1] is yaw component and angles[2] is roll component |
Nz::EulerAngles< T >::EulerAngles | ( | const Quaternion< T > & | quat | ) |
Constructs a EulerAngles object from a quaternion.
quat | Quaternion representing a rotation of space |
|
explicit |
Constructs a EulerAngles object from another type of EulerAngles.
angles | EulerAngles of type U to convert to type T |
void Nz::EulerAngles< T >::MakeZero | ( | ) |
Makes the euler angle (0, 0, 0)
EulerAngles< T > & Nz::EulerAngles< T >::Normalize | ( | ) |
Normalizes the euler angle.
bool Nz::EulerAngles< T >::operator!= | ( | const EulerAngles< T > & | angles | ) | const |
Compares the euler angle to other one.
angles | Other euler angle to compare with |
EulerAngles< T > Nz::EulerAngles< T >::operator+ | ( | const EulerAngles< T > & | angles | ) | const |
Adds the components of the euler angle with other euler angle.
angles | The other euler angle to add components with |
EulerAngles< T > & Nz::EulerAngles< T >::operator+= | ( | const EulerAngles< T > & | angles | ) |
Adds the components of other euler angle to this euler angle.
angles | The other euler angle to add components with |
EulerAngles< T > Nz::EulerAngles< T >::operator- | ( | const EulerAngles< T > & | angles | ) | const |
Substracts the components of the euler angle with other euler angle.
angles | The other euler angle to substract components with |
EulerAngles< T > & Nz::EulerAngles< T >::operator-= | ( | const EulerAngles< T > & | angles | ) |
Substracts the components of other euler angle to this euler angle.
angle | The other euler angle to substract components with |
bool Nz::EulerAngles< T >::operator== | ( | const EulerAngles< T > & | angles | ) | const |
Compares the euler angle to other one.
angles | Other euler angle to compare with |
EulerAngles< T > & Nz::EulerAngles< T >::Set | ( | T | P, |
T | Y, | ||
T | R | ||
) |
Sets the components of the euler angle.
P | Pitch component = X axis |
Y | Yaw component = Y axis |
R | Roll component = Z axis |
EulerAngles< T > & Nz::EulerAngles< T >::Set | ( | const T | angles[3] | ) |
Sets the components of the euler angle from an array of three elements.
angles[3] | angles[0] is pitch component, angles[1] is yaw component and angles[2] is roll component |
EulerAngles< T > & Nz::EulerAngles< T >::Set | ( | const EulerAngles< T > & | angles | ) |
Sets the components of the euler angle from another euler angle.
angles | The other euler angle |
EulerAngles< T > & Nz::EulerAngles< T >::Set | ( | const Quaternion< T > & | quat | ) |
Sets the components of the euler angle from a quaternion.
quat | Quaternion representing a rotation of space |
EulerAngles<T>& Nz::EulerAngles< T >::Set | ( | const EulerAngles< U > & | angles | ) |
Sets the components of the euler angle from another type of EulerAngles.
angles | EulerAngles of type U to convert its components |
Quaternion< T > Nz::EulerAngles< T >::ToQuaternion | ( | ) | const |
Converts the euler angle to quaternion.
String Nz::EulerAngles< T >::ToString | ( | ) | const |
Gives a string representation.
|
static |
Shorthand for the euler angle (0, 0, 0)