Public Member Functions | Private Attributes | Friends
rotateOp::Quaternion Class Reference

This class defines a quaternion. A quaternion is a number system that extends the complex number. Quaternions are used in particular for calculations involving three-dimmensional space. Quaternions are been represented in this class as a scalar and a vector: [w, (x,y,z)]. More...

#include <Quaternion.h>

List of all members.

Public Member Functions

void fromEuler (double roll, double pitch, double yaw, TransformationTypes::EulerType type)
 This method sets the quaternion data with euler data. Sets the quaternion components [w, (x,y,z)] of the object with the specific euler data (roll, pitch, yaw). The euler system (euler321, euler123, ...) must be specified to know what is the transformation to applied.
double getW () const
double getX () const
double getY () const
double getZ () const
 Quaternion ()
 Default constructor. Initialize the quaternion as [1, (0,0,0)].
 Quaternion (double w, double x, double y, double z)
 This constructor initialize the quaternion as [w, (x,y,z)].
double * toArray ()
 This method returns a new array with the quaternion data. The size of the array will be four. The first element will be the scalar. the second element will be the x component of the vector. the third element will be the y component of the vector. the fourth element will be the z component of the vector.

Private Attributes

double w
double x
double y
double z

Friends

std::ostream & operator<< (std::ostream &o, Quaternion q)

Detailed Description

This class defines a quaternion. A quaternion is a number system that extends the complex number. Quaternions are used in particular for calculations involving three-dimmensional space. Quaternions are been represented in this class as a scalar and a vector: [w, (x,y,z)].

Definition at line 25 of file Quaternion.h.


Constructor & Destructor Documentation

Default constructor. Initialize the quaternion as [1, (0,0,0)].

Definition at line 38 of file Quaternion.h.

rotateOp::Quaternion::Quaternion ( double  w,
double  x,
double  y,
double  z 
) [inline]

This constructor initialize the quaternion as [w, (x,y,z)].

Parameters:
wThe scalar.
xThe x component of the vector.
yThe y component of the vector.
zThe z component of the vector.

Definition at line 54 of file Quaternion.h.


Member Function Documentation

void rotateOp::Quaternion::fromEuler ( double  roll,
double  pitch,
double  yaw,
TransformationTypes::EulerType  type 
) [inline]

This method sets the quaternion data with euler data. Sets the quaternion components [w, (x,y,z)] of the object with the specific euler data (roll, pitch, yaw). The euler system (euler321, euler123, ...) must be specified to know what is the transformation to applied.

Parameters:
rollThe euler roll angle in radians.
pitchThe euler pitch angle in radians.
yawThe euler yaw angle in radians.
typeThe euler system. The options can be EULER123, EULER321 or EULER 312

Definition at line 72 of file Quaternion.h.

double rotateOp::Quaternion::getW ( ) const [inline]

Definition at line 138 of file Quaternion.h.

double rotateOp::Quaternion::getX ( ) const [inline]

Definition at line 142 of file Quaternion.h.

double rotateOp::Quaternion::getY ( ) const [inline]

Definition at line 146 of file Quaternion.h.

double rotateOp::Quaternion::getZ ( ) const [inline]

Definition at line 150 of file Quaternion.h.

double* rotateOp::Quaternion::toArray ( ) [inline]

This method returns a new array with the quaternion data. The size of the array will be four. The first element will be the scalar. the second element will be the x component of the vector. the third element will be the y component of the vector. the fourth element will be the z component of the vector.

ATENTION: The array that this method returns must be deleted for the client.

Definition at line 123 of file Quaternion.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
Quaternion  q 
) [friend]

Definition at line 132 of file Quaternion.h.


Member Data Documentation

double rotateOp::Quaternion::w [private]

Definition at line 28 of file Quaternion.h.

double rotateOp::Quaternion::x [private]

Definition at line 29 of file Quaternion.h.

double rotateOp::Quaternion::y [private]

Definition at line 30 of file Quaternion.h.

double rotateOp::Quaternion::z [private]

Definition at line 31 of file Quaternion.h.


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


iri_ual_catec
Author(s): Àngel Sanatamaria Navarro
autogenerated on Fri Dec 6 2013 21:24:08