next up previous contents
Next: constructors Up: Reference manual Previous: trans   Contents

The Quaternion class

The Quaternion class deals with quaternions. Unit quaternions are used to represent rotations. It is composed of two elements: a scalar $s$ (Real s_) and a vector $\mbox{\boldmath$ v $}$ (ColumnVector v_) representing a quaternion (see[1]).

$\displaystyle q$ $\textstyle =$ $\displaystyle w + xi + yj + zk$ (2.16)
  $\textstyle =$ $\displaystyle (s, v)$ (2.17)

An object of this class can be initialize with no parameter ($s=1$ and $\mbox{\boldmath$ v=0 $}$), from an other unit quaternion, from an angle of rotation around a unit vector, from a rotation matrix, from a quaternion object or from the four components of a quaternion. The constructors does not guarantee that quaternions will be unit.



Subsections

Richard Gourdeau 2004-07-06