|
rotlib 1.0.0
|
Functions | |
| void | aa_fix (double axis[3], double *angle, const bool normalize) |
| Modifies axis and angle to ensure a right handed rotation with angle | |
| void | aa_rand (double axis[3], double *angle) |
| Generates a random orientation in axis-angle representation. | |
| void | aa_rotmat (const double axis[3], const double angle, double *rotmat) |
| Calculates the rotation matrix corresponding to an axis-angle representation. | |
| void | aa_from_rotmat (const double *rotmat, double axis[3], double *angle) |
| Extracts axis and angle from a rotation matrix. | |
| void | aa_rotate_vectors (const int n, const double *v, const double axis[3], const double angle, double *vrot) |
| Rotates vectors about axis by angle. | |
| void | aa_shiftmat (const double axis[3], const double angle, const bool forward, double *shiftmat) |
| Calculates the shifter matrix corresponding to an axis-angle representation. | |
| void | aa_shift_vectors (const int n, const double *v, const double axis[3], const double angle, const bool forward, double *vshift) |
| Given two frames A and B such that the orientation of frame B with respect to frame A is given by an axis-angle representation, shifts vectors from A to B or B to A. | |
| void | aa_shift_tensor2 (const double *A, const double axis[3], const double angle, const bool forward, double *Ashift) |
| Given two frames A and B such that the orientation of frame B with respect to frame A is given by axis-angle representation, shifts second-order tensors from A to B or B to A. | |
| void | aa_shift_tensor3 (const double *A, const double axis[3], const double angle, const bool forward, double *Ashift) |
| Given two frames A and B such that the orientation of frame B with respect to frame A is given by axis-angle representation, shifts third-order tensors from A to B or B to A. | |
| void | aa_to_quat (const double axis[3], const double angle, double q[4]) |
| Converts an axis-angle representation to a unit quaternion. | |
| void | aa_to_dcm (const double axis[3], const double angle, double *dcm) |
| Converts an axis-angle representation to a direction cosine matrix. | |
| void | aa_to_euler (const double axis[3], const double angle, enum EulangSeq seq, const bool world, double euler[3]) |
| Converts an axis-angle representation to an Euler angle sequence. | |
| void aa_fix | ( | double | axis[3], |
| double * | angle, | ||
| const bool | normalize ) |
Modifies axis and angle to ensure a right handed rotation with angle ![]()
.
| [in,out] | axis | Axis of rotation. If this is not a unit vector, set normalize to true. |
| [in,out] | angle | Angle in radian. |
| [in] | normalize | Whether to normalize axis to a unit vector. |
| void aa_from_rotmat | ( | const double * | rotmat, |
| double | axis[3], | ||
| double * | angle ) |
Extracts axis and angle from a rotation matrix.
| [in] | rotmat | 3 x 3 rotation matrix. |
| [out] | axis | Unit vector along the axis. |
| [out] | angle | Angle in radian. |
| void aa_rand | ( | double | axis[3], |
| double * | angle ) |
Generates a random orientation in axis-angle representation.
The axis is a random vector drawn from a uniform distribution on the surface of a unit sphere. The current implementation in based on the algorithm from Allen & Tildesley p. 349.
| [out] | axis | Axis of rotation. |
| [out] | angle | Angle in radian. |
| void aa_rotate_vectors | ( | const int | n, |
| const double * | v, | ||
| const double | axis[3], | ||
| const double | angle, | ||
| double * | vrot ) |
Rotates vectors about axis by angle.
| [in] | n | Number of rows of v. |
| [in] | v | n x 3 array whose rows are the vectors to rotate. |
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [out] | vrot | n x 3 array whose rows are the rotated vectors. |
| void aa_rotmat | ( | const double | axis[3], |
| const double | angle, | ||
| double * | rotmat ) |
Calculates the rotation matrix corresponding to an axis-angle representation.
| [in] | axis | Axis of rotation. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [out] | rotmat | 3 x 3 rotation matrix. |
| void aa_shift_tensor2 | ( | const double * | A, |
| const double | axis[3], | ||
| const double | angle, | ||
| const bool | forward, | ||
| double * | Ashift ) |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by axis-angle representation, shifts second-order tensors from A to B or B to A.
| [in] | A | 3 x 3 second-order tensor. |
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [in] | forward | Whether to shift forward, i.e., along the orientation or shift reverse. |
| [out] | Ashift | 3 x 3 shifted second-order tensor. |
| void aa_shift_tensor3 | ( | const double * | A, |
| const double | axis[3], | ||
| const double | angle, | ||
| const bool | forward, | ||
| double * | Ashift ) |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by axis-angle representation, shifts third-order tensors from A to B or B to A.
| [in] | A | 3 x 3 x 3 third-order tensor. |
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [in] | forward | Whether to shift forward, i.e., along the orientation or shift reverse. |
| [out] | Ashift | 3 x 3 x 3 shifted second-order tensor. |
| void aa_shift_vectors | ( | const int | n, |
| const double * | v, | ||
| const double | axis[3], | ||
| const double | angle, | ||
| const bool | forward, | ||
| double * | vshift ) |
Given two frames A and B such that the orientation of frame B with respect to frame A is given by an axis-angle representation, shifts vectors from A to B or B to A.
| [in] | n | Number of rows of v. |
| [in] | v | n x 3 array whose rows are the vectors to shift. |
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [in] | forward | Whether to shift forward, i.e., along the orientation or shift reverse. |
| [out] | vshift | n x 3 array whose rows are the rotated vectors. |
| void aa_shiftmat | ( | const double | axis[3], |
| const double | angle, | ||
| const bool | forward, | ||
| double * | shiftmat ) |
Calculates the shifter matrix corresponding to an axis-angle representation.
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [in] | forward | Whether to shift forward, i.e., along the orientation or shift reverse. |
| [out] | shiftmat | 3 x 3 shifter matrix. |
| void aa_to_dcm | ( | const double | axis[3], |
| const double | angle, | ||
| double * | dcm ) |
Converts an axis-angle representation to a direction cosine matrix.
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [out] | dcm | 3 x 3 direction cosine matrix. |
| void aa_to_euler | ( | const double | axis[3], |
| const double | angle, | ||
| enum EulangSeq | seq, | ||
| const bool | world, | ||
| double | euler[3] ) |
Converts an axis-angle representation to an Euler angle sequence.
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [in] | seq | ES_XYZ | ES_XZY | ES_YXZ | ES_YZX | ES_ZXY | ES_ZYX. Euler angle sequence. |
| [in] | world | Whether the Euler angles are with respect to the world frame or not. |
| [out] | euler | Euler angles. |
| void aa_to_quat | ( | const double | axis[3], |
| const double | angle, | ||
| double | q[4] ) |
Converts an axis-angle representation to a unit quaternion.
| [in] | axis | Unit vector along the axis. |
| [in] | angle | Angle in radian. 0 <= angle < pi. |
| [out] | q | A unit quaternion. |