Base::Rotation Class Reference

#include <Rotation.h>

List of all members.

Public Member Functions



void getValue (Matrix4D &matrix) const
 Returns this rotation in form of a matrix.
void getValue (Vector3d &axis, double &rfAngle) const
void getValue (double &q0, double &q1, double &q2, double &q3) const
const double * getValue (void) const
 Methods to get or set rotations.
void getYawPitchRoll (double &y, double &p, double &r) const
 Euler angles in yaw,pitch,roll notation.
Rotation inverse (void) const
Rotationinvert (void)
 Invert rotations.
void multVec (const Vector3d &src, Vector3d &dst) const
bool operator!= (const Rotation &q) const
Rotation operator* (const Rotation &q) const
Rotationoperator*= (const Rotation &q)
 Operators.
bool operator== (const Rotation &q) const
const double & operator[] (unsigned short usIndex) const
double & operator[] (unsigned short usIndex)
 Rotation (const Rotation &rot)
 Rotation (const Vector3d &rotateFrom, const Vector3d &rotateTo)
 Rotation (const double q0, const double q1, const double q2, const double q3)
 Construct a rotation initialized with the given quaternion components: q0 = x, q1 = y, q2 = z and q3 = w, where the quaternion is specified by q=w+xi+yj+zk.
 Rotation (const double q[4])
 Construct a rotation initialized with the given quaternion components: q[0] = x, q[1] = y, q[2] = z and q[3] = w, where the quaternion is specified by q=w+xi+yj+zk.
 Rotation (const Matrix4D &matrix)
 Rotation (const Vector3d &axis, const double fAngle)
 Construct a rotation by rotation axis and angle.
 Rotation ()
 Construction.
void scaleAngle (const double scaleFactor)
void setValue (const Vector3d &rotateFrom, const Vector3d &rotateTo)
void setValue (const Vector3d &axis, const double fAngle)
void setValue (const Matrix4D &matrix)
void setValue (const double q[4])
void setValue (const double q0, const double q1, const double q2, const double q3)
void setYawPitchRoll (double y, double p, double r)
 Euler angles in yaw,pitch,roll notation.

Static Public Member Functions

static Rotation identity (void)
static Rotation slerp (const Rotation &rot0, const Rotation &rot1, double t)

Detailed Description

Definition at line 34 of file Rotation.h.


Constructor & Destructor Documentation

Rotation::Rotation (  ) 

Construction.

Definition at line 35 of file Rotation.cpp.

Referenced by identity(), and slerp().

Rotation::Rotation ( const Vector3d axis,
const double  fAngle 
)

Construct a rotation by rotation axis and angle.

Definition at line 41 of file Rotation.cpp.

References setValue().

Rotation::Rotation ( const Matrix4D matrix  ) 

Definition at line 46 of file Rotation.cpp.

References setValue().

Rotation::Rotation ( const double  q[4]  ) 

Construct a rotation initialized with the given quaternion components: q[0] = x, q[1] = y, q[2] = z and q[3] = w, where the quaternion is specified by q=w+xi+yj+zk.

Definition at line 55 of file Rotation.cpp.

References setValue().

Rotation::Rotation ( const double  q0,
const double  q1,
const double  q2,
const double  q3 
)

Construct a rotation initialized with the given quaternion components: q0 = x, q1 = y, q2 = z and q3 = w, where the quaternion is specified by q=w+xi+yj+zk.

Definition at line 64 of file Rotation.cpp.

References setValue().

Rotation::Rotation ( const Vector3d rotateFrom,
const Vector3d rotateTo 
)

Definition at line 69 of file Rotation.cpp.

References setValue().

Rotation::Rotation ( const Rotation rot  ) 

Definition at line 74 of file Rotation.cpp.


Member Function Documentation

void Rotation::getValue ( Matrix4D matrix  )  const

Returns this rotation in form of a matrix.

Definition at line 127 of file Rotation.cpp.

References RobotExample::w, MovieTool::x, and MovieTool::y.

void Rotation::getValue ( Vector3d axis,
double &  rfAngle 
) const
void Rotation::getValue ( double &  q0,
double &  q1,
double &  q2,
double &  q3 
) const

Definition at line 87 of file Rotation.cpp.

const double * Rotation::getValue ( void   )  const
void Rotation::getYawPitchRoll ( double &  y,
double &  p,
double &  r 
) const

Euler angles in yaw,pitch,roll notation.

Definition at line 395 of file Rotation.cpp.

References KDL::asin(), KDL::atan2(), and D_PI.

Referenced by Robot::WaypointPy::representation(), Base::PlacementPy::representation(), and Base::RotationPy::toEuler().

Rotation Rotation::identity ( void   )  [static]

Definition at line 373 of file Rotation.cpp.

References SketcherExample::f, and Rotation().

Rotation Rotation::inverse ( void   )  const

Definition at line 264 of file Rotation.cpp.

Referenced by Base::Placement::invert().

Rotation & Rotation::invert ( void   ) 

Invert rotations.

Definition at line 255 of file Rotation.cpp.

Referenced by Base::RotationPy::invert().

void Rotation::multVec ( const Vector3d src,
Vector3d dst 
) const
bool Rotation::operator!= ( const Rotation q  )  const

Definition at line 304 of file Rotation.cpp.

Rotation Rotation::operator* ( const Rotation q  )  const

Definition at line 289 of file Rotation.cpp.

Rotation & Rotation::operator*= ( const Rotation q  ) 

Operators.

Definition at line 274 of file Rotation.cpp.

References getValue(), and setValue().

bool Rotation::operator== ( const Rotation q  )  const

Definition at line 296 of file Rotation.cpp.

const double& Base::Rotation::operator[] ( unsigned short  usIndex  )  const [inline]

Definition at line 78 of file Rotation.h.

double& Base::Rotation::operator[] ( unsigned short  usIndex  )  [inline]

Definition at line 77 of file Rotation.h.

void Rotation::scaleAngle ( const double  scaleFactor  ) 

Definition at line 328 of file Rotation.cpp.

References getValue(), and setValue().

void Rotation::setValue ( const Vector3d rotateFrom,
const Vector3d rotateTo 
)
void Rotation::setValue ( const Vector3d axis,
const double  fAngle 
)
void Rotation::setValue ( const Matrix4D matrix  ) 

Definition at line 166 of file Rotation.cpp.

References SketcherExample::f, k, KDL::sqrt(), and Py::trace().

void Rotation::setValue ( const double  q[4]  ) 

Definition at line 157 of file Rotation.cpp.

void Rotation::setValue ( const double  q0,
const double  q1,
const double  q2,
const double  q3 
)
void Rotation::setYawPitchRoll ( double  y,
double  p,
double  r 
)

Euler angles in yaw,pitch,roll notation.

Definition at line 378 of file Rotation.cpp.

References Mod::PartDesign::Scripts::Gear::c1, KDL::cos(), D_PI, and KDL::sin().

Referenced by Base::RotationPy::PyInit().

Rotation Rotation::slerp ( const Rotation rot0,
const Rotation rot1,
double  t 
) [static]

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

Generated on Wed Nov 23 19:01:48 2011 for FreeCAD by  doxygen 1.6.1