Represent a rotation function. More...
#include <rotation.hh>
Public Types | |
typedef algebra::vec< n, C > | argument |
typedef Function_v2v< void > | category |
typedef algebra::vec< n, C >::coord | coord |
typedef rotation< n, C > | exact_t |
typedef rotation< n, C > | invert |
Type of the inverse function. | |
typedef algebra::h_mat< dim, coord > | matrix |
typedef void | mutable_result |
typedef algebra::vec< n, C > | result |
Public Member Functions | |
invert | inv () const |
Return the invere function. | |
const matrix & | mat () const |
algebra::vec< n, C > | operator() (const algebra::vec< n, C > &x) const |
algebra::vec< n, C > | operator() (const algebra::vec< n, C > &v) const |
Perform the rotation of the given vector. | |
rotation (const algebra::quat &q) | |
Constructor with quaternion. | |
rotation () | |
Constructor without argument. | |
rotation (const algebra::h_mat< n, C > &m) | |
Constructor with h_mat. | |
rotation (C alpha, const algebra::vec< n, C > &axis) | |
Constructor with radian alpha and a facultative direction (rotation axis). | |
void | set_alpha (C alpha) |
Set a new grade alpha. | |
void | set_axis (const algebra::vec< n, C > &axis) |
Set a new rotation axis. | |
Static Public Attributes | |
static const unsigned | dim |
Protected Member Functions | |
bool | check_rotation (const algebra::quat &q) |
void | update () |
Protected Attributes | |
C | alpha_ |
FIXME: Is it useful? | |
algebra::vec< n, C > | axis_ |
matrix | m_ |
Represent a rotation function.
typedef algebra::vec< n, C > mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::argument [inherited] |
typedef Function_v2v<void> mln::Function_v2v< rotation< n, C > >::category [inherited] |
Reimplemented from mln::Function< rotation< n, C > >.
typedef algebra::vec< n, C > ::coord mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::coord [inherited] |
typedef rotation< n, C > mln::Object< rotation< n, C > >::exact_t [inherited] |
typedef rotation<n,C> mln::fun::x2x::rotation< n, C >::invert |
Type of the inverse function.
typedef algebra::h_mat<dim, coord> mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::matrix [inherited] |
typedef void mln::Function_v2v< rotation< n, C > >::mutable_result [inherited] |
typedef algebra::vec< n, C > mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::result [inherited] |
mln::fun::x2x::rotation< n, C >::rotation | ( | ) | [inline] |
Constructor without argument.
mln::fun::x2x::rotation< n, C >::rotation | ( | C | alpha, | |
const algebra::vec< n, C > & | axis | |||
) | [inline] |
Constructor with radian alpha and a facultative direction (rotation axis).
References mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, rotation< n, C > >::m_, and mln::fun::x2x::rotation< n, C >::update().
mln::fun::x2x::rotation< n, C >::rotation | ( | const algebra::quat & | q | ) | [inline] |
Constructor with quaternion.
Update attributes
References mln::fun::x2x::rotation< n, C >::alpha_, mln::fun::x2x::rotation< n, C >::axis_, mln::fun::x2x::rotation< n, C >::check_rotation(), mln::make::h_mat(), mln::algebra::quat::is_unit(), mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, rotation< n, C > >::m_, mln::algebra::vec< n, T >::normalize(), and mln::algebra::quat::to_vec().
mln::fun::x2x::rotation< n, C >::rotation | ( | const algebra::h_mat< n, C > & | m | ) | [inline] |
Constructor with h_mat.
References mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, rotation< n, C > >::m_.
bool mln::fun::x2x::rotation< n, C >::check_rotation | ( | const algebra::quat & | q | ) | [inline, protected] |
References mln::algebra::quat::is_unit(), mln::algebra::quat::rotate(), and mln::make::vec().
Referenced by mln::fun::x2x::rotation< n, C >::rotation().
rotation< n, C > mln::fun::x2x::rotation< n, C >::inv | ( | ) | const [inline] |
Return the invere function.
References mln::fun::x2x::rotation< n, C >::alpha_, and mln::fun::x2x::rotation< n, C >::axis_.
const matrix& mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::mat | ( | ) | const [inherited] |
algebra::vec< n, C > mln::fun::x2x::rotation< n, C >::operator() | ( | const algebra::vec< n, C > & | v | ) | const [inline] |
Perform the rotation of the given vector.
References mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, rotation< n, C > >::m_.
algebra::vec< n, C > mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::operator() | ( | const algebra::vec< n, C > & | x | ) | const [inline, inherited] |
void mln::fun::x2x::rotation< n, C >::set_alpha | ( | C | alpha | ) | [inline] |
Set a new grade alpha.
References mln::fun::x2x::rotation< n, C >::alpha_, and mln::fun::x2x::rotation< n, C >::update().
void mln::fun::x2x::rotation< n, C >::set_axis | ( | const algebra::vec< n, C > & | axis | ) | [inline] |
Set a new rotation axis.
References mln::fun::x2x::rotation< n, C >::axis_, and mln::fun::x2x::rotation< n, C >::update().
void mln::fun::x2x::rotation< n, C >::update | ( | ) | [inline, protected] |
References mln::fun::x2x::rotation< n, C >::alpha_, mln::fun::x2x::rotation< n, C >::axis_, mln::fun::x2x::internal::get_rot_h_mat(), and mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, rotation< n, C > >::m_.
Referenced by mln::fun::x2x::rotation< n, C >::rotation(), mln::fun::x2x::rotation< n, C >::set_alpha(), and mln::fun::x2x::rotation< n, C >::set_axis().
C mln::fun::x2x::rotation< n, C >::alpha_ [protected] |
FIXME: Is it useful?
Referenced by mln::fun::x2x::rotation< n, C >::inv(), mln::fun::x2x::rotation< n, C >::rotation(), mln::fun::x2x::rotation< n, C >::set_alpha(), and mln::fun::x2x::rotation< n, C >::update().
algebra::vec<n,C> mln::fun::x2x::rotation< n, C >::axis_ [protected] |
const unsigned mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::dim [static, inherited] |
matrix mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , rotation< n, C > >::m_ [protected, inherited] |