HyperspaceExplorer 0.7.1
|
How to generate a Rotation matrix from a Rotation component. More...
#include <Rotation.h>
Static Public Member Functions | |
static unsigned | axis (unsigned which, unsigned index) |
Static Private Attributes | |
static unsigned | _axis [2][NumAxes< D >::num] |
explicitly stores the values for ii and jj |
How to generate a Rotation matrix from a Rotation component.
A Rotation matrix about a coordinate axis is created with the c'tor Matrix<D, N>::Matrix (unsigned ii, unsigned jj, N Theta), where ii
and jj
describe the axis about which is rotated.
Unfortunately the position of the angle in the Rotation vector does not map to the axis indicators ii
and jj
straightforwardly. This class provides the static method axis(), which computes them.
In fact, though, it works only in the three- and four-dimensional cases. In these dimensions, I have manually specified the axes. For higher dimensions, a NotYetImplementedException is thrown.
D
dimensions D | dimension of the vector space |
unsigned VecMath::RotationAxes< D >::axis | ( | unsigned | which, |
unsigned | index | ||
) | [static] |
Compute the row/column in a rotation Matrix from the dimension of the vector space and the position of the rotation angle in the Rotation vector.
which | 0 for ii or 1 for jj |
index | position in the Rotation vector |
References Util::itoa().
Referenced by VecMath::Rotation< D, N >::operator Matrix< D, N >().