opal::Quaternion Class Reference

#include <Quaternion.h>

List of all members.

Public Member Functions

OPAL_DECL Quaternion ()
OPAL_DECL Quaternion (real ww, real xx, real yy, real zz)
OPAL_DECL Quaternion (const Quaternion &src)
OPAL_DECL void OPAL_CALL set (real ww, real xx, real yy, real zz)
OPAL_DECL real OPAL_CALL lengthSquared () const
OPAL_DECL real OPAL_CALL length () const
OPAL_DECL void OPAL_CALL normalize ()
OPAL_DECL void OPAL_CALL getAngleAxis (real &angle, Vec3r &axis) const
OPAL_DECL real OPAL_CALL getRoll () const
OPAL_DECL real OPAL_CALL getPitch () const
OPAL_DECL real OPAL_CALL getYaw () const
OPAL_DECL real &OPAL_CALL operator[] (unsigned int i)
OPAL_DECL const real &OPAL_CALL operator[] (unsigned int i) const

Public Attributes

real w
real x
real y
real z


Detailed Description

Definition at line 42 of file Quaternion.h.


Constructor & Destructor Documentation

opal::Quaternion::Quaternion  ) 
 

Definition at line 40 of file Quaternion.cpp.

References w, x, y, and z.

opal::Quaternion::Quaternion real  ww,
real  xx,
real  yy,
real  zz
 

Definition at line 48 of file Quaternion.cpp.

References w, x, y, and z.

opal::Quaternion::Quaternion const Quaternion src  ) 
 

Definition at line 56 of file Quaternion.cpp.

References w, x, y, and z.


Member Function Documentation

void opal::Quaternion::getAngleAxis real angle,
Vec3r axis
const
 

Returns the equivalent rotation.

Parameters:
angle in degrees
axis axis of rotation
Note:
Quaternion needs to be normalized first

Definition at line 92 of file Quaternion.cpp.

References opal::defaults::sensor::incline::axis, opal::radToDeg(), w, opal::Vec3r::x, x, opal::Vec3r::y, y, opal::Vec3r::z, and z.

Referenced by opal::Matrix44r::setQuaternion().

real opal::Quaternion::getPitch  )  const
 

Definition at line 123 of file Quaternion.cpp.

References opal::radToDeg(), w, x, y, and z.

real opal::Quaternion::getRoll  )  const
 

Definition at line 116 of file Quaternion.cpp.

References opal::radToDeg(), w, x, y, and z.

real opal::Quaternion::getYaw  )  const
 

Definition at line 128 of file Quaternion.cpp.

References opal::radToDeg(), w, x, y, and z.

real opal::Quaternion::length  )  const
 

Definition at line 77 of file Quaternion.cpp.

References lengthSquared().

Referenced by normalize().

real opal::Quaternion::lengthSquared  )  const
 

Definition at line 72 of file Quaternion.cpp.

References w, x, y, and z.

Referenced by length().

void opal::Quaternion::normalize  ) 
 

Length will be one.

Definition at line 82 of file Quaternion.cpp.

References length().

const real & opal::Quaternion::operator[] unsigned int  i  )  const
 

Definition at line 148 of file Quaternion.cpp.

References w, x, y, and z.

real & opal::Quaternion::operator[] unsigned int  i  ) 
 

Definition at line 135 of file Quaternion.cpp.

References w, x, y, and z.

void opal::Quaternion::set real  ww,
real  xx,
real  yy,
real  zz
 

Definition at line 64 of file Quaternion.cpp.

References w, x, y, and z.


Member Data Documentation

real opal::Quaternion::w
 

Definition at line 45 of file Quaternion.h.

Referenced by getAngleAxis(), getPitch(), getRoll(), getYaw(), lengthSquared(), opal::operator *(), opal::operator!=(), opal::operator+(), opal::operator-(), opal::operator<<(), opal::operator==(), operator[](), Quaternion(), and set().

real opal::Quaternion::x
 

Definition at line 46 of file Quaternion.h.

Referenced by getAngleAxis(), getPitch(), getRoll(), getYaw(), lengthSquared(), opal::operator *(), opal::operator!=(), opal::operator+(), opal::operator-(), opal::operator<<(), opal::operator==(), operator[](), Quaternion(), and set().

real opal::Quaternion::y
 

Definition at line 47 of file Quaternion.h.

Referenced by getAngleAxis(), getPitch(), getRoll(), getYaw(), lengthSquared(), opal::operator *(), opal::operator!=(), opal::operator+(), opal::operator-(), opal::operator<<(), opal::operator==(), operator[](), Quaternion(), and set().

real opal::Quaternion::z
 

Definition at line 48 of file Quaternion.h.

Referenced by getAngleAxis(), getPitch(), getRoll(), getYaw(), lengthSquared(), opal::operator *(), opal::operator!=(), opal::operator+(), opal::operator-(), opal::operator<<(), opal::operator==(), operator[](), Quaternion(), and set().


The documentation for this class was generated from the following files:
Generated on Tue May 16 17:49:57 2006 for OPAL by  doxygen 1.4.6-NO