Ocular Engine
Ocular::Math::Euler Class Reference

#include <Euler.hpp>

Public Member Functions

 Euler (float const pPitch, float const pYaw, float const pRoll)
 
 Euler (Vector3< float > const &vector)
 
 Euler (Matrix3x3 const &rotationMatrix)
 
 Euler (Quaternion const &quaternion)
 
float getYaw () const
 
float getYawRadians () const
 
float getPitch () const
 
float getPitchRadians () const
 
float getRoll () const
 
float getRollRadians () const
 
void setYaw (float const yaw)
 
void setYawRadians (float const yaw)
 
void setPitch (float const pitch)
 
void setPitchRadians (float const pitch)
 
void setRoll (float const roll)
 
void setRollRadians (float const roll)
 
Matrix3x3 toRotationMatrix () const
 
Quaternion toQuaternion () const
 
void normalize ()
 
Euler getNormalized () const
 
void denormalize ()
 
Euler getDenormalized () const
 

Static Public Member Functions

static float normalizeAxis (float const &angle)
 
static float denormalizeAxis (float const &angle)
 

Friends

class Matrix3x3
 
class Quaternion
 

Detailed Description

Implementation of Euler (Tait-Bryan) angles - yaw, pitch, roll. In NASA Standard Aeroplace notation, these correspond to heading, altitude, and bearing respectively.

All input and output from the Euler class is in degrees, but internally the components are stored as radians.

Constructor & Destructor Documentation

Ocular::Math::Euler::Euler ( float const  pPitch,
float const  pYaw,
float const  pRoll 
)
Parameters
[in]pPitchRotation (in degrees) around the local x-axis
[in]pYawRotation (in degrees) around the local y-axis
[in]pRollRotation (in degrees) around the local z-axis
Ocular::Math::Euler::Euler ( Vector3< float > const &  vector)
Parameters
[in]vectorVector expected in form of (Pitch, Yaw, Roll) or (X-Rotation, Y-Rotation, Z-Rotation)
Ocular::Math::Euler::Euler ( Matrix3x3 const &  rotationMatrix)

Initializes the Euler angles from a rotation matrix.

Parameters
[in]rotationMatrix
Ocular::Math::Euler::Euler ( Quaternion const &  quaternion)

Initializes the Euler angles from a quaternion.

Parameters
[in]quaternion

Member Function Documentation

void Ocular::Math::Euler::denormalize ( )
Note
This method modifies the internal data stored in the vector. See getNormalized if this is not desired.
float Ocular::Math::Euler::denormalizeAxis ( float const &  angle)
static
Parameters
[in]angle
Returns
The angle in the range [0, 360)
float Ocular::Math::Euler::getPitch ( ) const
Returns
The Pitch in degrees.
float Ocular::Math::Euler::getPitchRadians ( ) const
Returns
The Pitch in radians.
float Ocular::Math::Euler::getRoll ( ) const
Returns
The Roll in degrees.
float Ocular::Math::Euler::getRollRadians ( ) const
Returns
The Roll in radians.
float Ocular::Math::Euler::getYaw ( ) const
Returns
The Yaw in degrees.
float Ocular::Math::Euler::getYawRadians ( ) const
Returns
The Yaw in radians.
void Ocular::Math::Euler::normalize ( )
Note
This method modifies the internal data stored in the vector. See getNormalized if this is not desired.
float Ocular::Math::Euler::normalizeAxis ( float const &  angle)
static
Parameters
[in]angle
Returns
The angle in the range (-180, 180]
void Ocular::Math::Euler::setPitch ( float const  pitch)

Directly sets the pitch of this Euler angles. This method should only be used if you know exactly what you are doing.

Parameters
[in]pitchThe Pitch in degrees.
void Ocular::Math::Euler::setPitchRadians ( float const  pitch)
Parameters
[in]pitchThe Pitch in radians.
void Ocular::Math::Euler::setRoll ( float const  roll)

Directly sets the roll of this Euler angles. This method should only be used if you know exactly what you are doing.

Parameters
[in]rollThe Roll in degrees.
void Ocular::Math::Euler::setRollRadians ( float const  roll)
Parameters
[in]rollThe Roll in radians.
void Ocular::Math::Euler::setYaw ( float const  yaw)

Directly sets the yaw of this Euler angles. This method should only be used if you know exactly what you are doing.

Parameters
[in]yawThe Yaw in degrees.
void Ocular::Math::Euler::setYawRadians ( float const  yaw)
Parameters
[in]yawThe Yaw in radians.
Quaternion Ocular::Math::Euler::toQuaternion ( ) const

Converts this Euler angle representation of a rotation to a Quaternion.

Returns
The converted quaternion.
Matrix3x3 Ocular::Math::Euler::toRotationMatrix ( ) const

Converts this Euler angle representation of a rotation to a 3x3 rotation matrix.

Returns
The converted matrix.

The documentation for this class was generated from the following files: