Public Member Functions
rtc::EulerAngles< T > Class Template Reference

#include <rtcEulerAngles.h>

Inheritance diagram for rtc::EulerAngles< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void bound ()
 EulerAngles ()
 Constructor.
 EulerAngles (const T roll, const T pitch, const T yaw)
 EulerAngles (const Vec< T, 3 > &v)
 EulerAngles (const Quaternion< T > &q)
 EulerAngles (const Rotation< T > &r)
pitch () const
roll () const
void set (const Vec< T, 3 > &v)
 Mutators.
void set (const T roll, const T pitch, const T yaw)
void set (const Quaternion< T > &q)
void set (const Rotation< T > &r)
Vec3< T > toDegrees ()
yaw () const
 Accessors.

Detailed Description

template<class T>
class rtc::EulerAngles< T >

The Euler Angle Class

Defines euler angles class for rigid body rotations that knows how to construct itself from several other common rotation representations, such as quaternions, axis angles, and rotation matrices.

Euler Angle Sequence is: (3,2,1)

The rotations are (in this order) roll about x, pitch about y, and yaw about z. These are the conventions that are used in aerospace. Another important point is that this represents the rotation that takes something in the local frame and rotates it into the global frame. That is, if we have a measurement in some local frame that we want to translate into the world coordinates, we'd use these rotations. Take, for example a 3d model of an object, or a dynamical measurement on a moving body. The opposite, which takes something in the global frame and rotates it into the local frame is more common in the computer vision community. This is, of course, just the transpose of the other case, but it is useful to think of things in a manner that is consistent with the library. So to be absolutely clear, I'll give an example: Consider an airplane, which we know to be at a particular roll, pitch, and yaw, and at a particular position x0, y0, z0 in some global coordinate system. In aero, the coordinates for the airplane are: x-axis points to the front of the airplane, y-axis points out to the right wing, and z-axis points downward. Don't ask why the z-axis points downward, that's another story. Ok, so Let's imagine that we measure something to be straight off the right wing 10 units away. We could compute the global coordinates of that thing by the following commands:

Rotationf r = Rotationf(EulerAnglesf(roll,pitch,yaw)); Vec3f x = r*Vec3f(0,10,0) + Vec3f(x0,y0,z0);

Definition at line 75 of file rtcEulerAngles.h.


Constructor & Destructor Documentation

template<class T >
rtc::EulerAngles< T >::EulerAngles ( ) [inline]

Constructor.

Ctor that initializes to zero rotation angles

Definition at line 112 of file rtcEulerAngles.h.

template<class T >
rtc::EulerAngles< T >::EulerAngles ( const T  roll,
const T  pitch,
const T  yaw 
) [inline]

Ctor that initializes to passed roll (about x), pitch (about y), and yaw (about z)

Definition at line 120 of file rtcEulerAngles.h.

template<class T >
rtc::EulerAngles< T >::EulerAngles ( const Vec< T, 3 > &  v) [inline]

Ctor that initializes from Vec<T,3>

Definition at line 129 of file rtcEulerAngles.h.

template<class T >
rtc::EulerAngles< T >::EulerAngles ( const Quaternion< T > &  q) [inline]

Ctor that computes euler angles from passed quaternion

Definition at line 136 of file rtcEulerAngles.h.

template<class T >
rtc::EulerAngles< T >::EulerAngles ( const Rotation< T > &  r) [inline]

Ctor that computes euler angles from passed rotation matrix

Definition at line 143 of file rtcEulerAngles.h.


Member Function Documentation

template<class T >
void rtc::EulerAngles< T >::bound ( ) [inline]

Bound euler angles so that roll: [-180, 180], pitch: [-90, 90], yaw: [-180,180]

Definition at line 187 of file rtcEulerAngles.h.

template<class T >
T rtc::EulerAngles< T >::pitch ( ) const [inline]

Return the pitch

Definition at line 208 of file rtcEulerAngles.h.

template<class T >
T rtc::EulerAngles< T >::roll ( ) const [inline]

Return the roll

Definition at line 203 of file rtcEulerAngles.h.

template<class T >
void rtc::EulerAngles< T >::set ( const Vec< T, 3 > &  v) [inline]

Mutators.

Set euler angles to passed values, stored in Vec<T,3>

Definition at line 152 of file rtcEulerAngles.h.

template<class T >
void rtc::EulerAngles< T >::set ( const T  roll,
const T  pitch,
const T  yaw 
) [inline]

Set euler angles to passed values

Reimplemented from rtc::Vec3< T >.

Definition at line 160 of file rtcEulerAngles.h.

template<class T >
void rtc::EulerAngles< T >::set ( const Quaternion< T > &  q) [inline]

Set euler angles according to passed unit quaternion

Definition at line 168 of file rtcEulerAngles.h.

template<class T >
void rtc::EulerAngles< T >::set ( const Rotation< T > &  r) [inline]

Set euler angles according to passed rotation matrix

Definition at line 177 of file rtcEulerAngles.h.

template<class T >
Vec3< T > rtc::EulerAngles< T >::toDegrees ( ) [inline]

Return a Vec3<T> of the euler angles in degrees

Definition at line 218 of file rtcEulerAngles.h.

template<class T >
T rtc::EulerAngles< T >::yaw ( ) const [inline]

Accessors.

Return the yaw

Definition at line 213 of file rtcEulerAngles.h.


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


rtc
Author(s): Benjamin Pitzer
autogenerated on Thu Jan 2 2014 11:04:54