|
rotlib 1.0.0
|
Functions | |
| void | align (const int n, const double *v, const int m, const double *old, const double *new, double *valigned) |
| Rotates vectors such that a set of mutually orthogonal unit vectors aligns with another set of mutually orthogoanl unit vectors. | |
| bool | mat_is_rotmat (const double *mat) |
| Checks whether a 2D array is a rotation matrix. | |
| void align | ( | const int | n, |
| const double * | v, | ||
| const int | m, | ||
| const double * | old, | ||
| const double * | new, | ||
| double * | valigned ) |
Rotates vectors such that a set of mutually orthogonal unit vectors aligns with another set of mutually orthogoanl unit vectors.
The vectors v are rotated using a rotation matrix that, when applied to the unit vectors old, aligns them in the direction of the unit vectors new.
| [in] | n | Number of rows of v. |
| [in] | v | A n x 3 array whose rows are the vectors to align. |
| [in] | m | Number of rows of old, same as the number of rows of new. |
| [in] | old | A m x 3 array, where m is at most 3. The rows of old form a set of mutually orthogonal unit vectors. |
| [in] | new | A m x 3 array, where m is at most 3. The rows of new form a set of mutually orthogonal unit vectors. The angles between the vectors must be the same as those of old. |
| [out] | valigned | A n x 3 array whose rows are the aligned vectors. |
| bool mat_is_rotmat | ( | const double * | mat | ) |
Checks whether a 2D array is a rotation matrix.
| [in] | mat | A 3x3 array. |