| Top |  |  |  |  | 
| HklQuaternion * | hkl_quaternion_dup () | 
| void | hkl_quaternion_free () | 
| void | hkl_quaternion_init () | 
| void | hkl_quaternion_init_from_vector () | 
| void | hkl_quaternion_init_from_angle_and_axe () | 
| void | hkl_quaternion_fprintf () | 
| int | hkl_quaternion_cmp () | 
| void | hkl_quaternion_minus_quaternion () | 
| void | hkl_quaternion_times_quaternion () | 
| double | hkl_quaternion_norm2 () | 
| void | hkl_quaternion_conjugate () | 
| void | hkl_quaternion_to_matrix () | 
| void | hkl_quaternion_to_angle_and_axe () | 
void hkl_quaternion_init (HklQuaternion *self,double a,double b,double c,double d);
initialize the four elements of an HklQuaternion
| self | the HklQuaternion to initialize | |
| a | the 1st element value | |
| b | the 2nd element value | |
| c | the 3rd element value | |
| d | the 4th element value | 
void hkl_quaternion_init_from_vector (HklQuaternion *self,const HklVector *v);
initialize an HklQuaternion from an HklVector
void hkl_quaternion_init_from_angle_and_axe (HklQuaternion *self,double angle,const HklVector *v);
initialize an HklQuaternion from a vector and a angle.
void hkl_quaternion_fprintf (FILE *file,const HklQuaternion *self);
print an HklQuaternion into a FILE stream
| file | the file to send the HklQuaternion into | |
| self | the HklQuaternion to write into the file stream. | 
int hkl_quaternion_cmp (const HklQuaternion *self,const HklQuaternion *q);
compare two HklQuaternion.
void hkl_quaternion_minus_quaternion (HklQuaternion *self,const HklQuaternion *q);
substract two HklQuaternions Todo: test
void hkl_quaternion_times_quaternion (HklQuaternion *self,const HklQuaternion *q);
multiply two quaternions
double
hkl_quaternion_norm2 (const HklQuaternion *self);
compute the norm2 of an HklQuaternion
void
hkl_quaternion_conjugate (HklQuaternion *self);
compute the conjugate of a quaternion
void hkl_quaternion_to_matrix (const HklQuaternion *self,HklMatrix *m);
Compute the rotation matrix of a Quaternion.
compute the rotation matrix corresponding to the unitary quaternion. \f$ q = a + b \cdot i + c \cdot j + d \cdot k \f$
\f$ \left( \begin{array}{ccc} a^2+b^2-c^2-d^2 & 2bc-2ad & 2ac+2bd\ 2ad+2bc & a^2-b^2+c^2-d^2 & 2cd-2ab\ 2bd-2ac & 2ab+2cd & a^2-b^2-c^2+d^2 \end{array} \right) \f$ Todo: optimize
| self | the HklQuaternion use to compute the HklMatrix | |
| m | the HklMatrix return. | [out caller-allocates] | 
void hkl_quaternion_to_angle_and_axe (const HklQuaternion *self,double *angle,HklVector *v);
compute the axe and angle of the unitary quaternion angle [-pi, pi] if q is the (1, 0, 0, 0) quaternion return the (0,0,0) axe and a 0 angle
| self | The HklQuaternion use to compute the angle and the roation axis. | |
| angle | the returned angle of the rotation. | |
| v | the returned axis of the rotation. |