Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes

mln::fun::x2x::rotation< n, C > Struct Template Reference

Represent a rotation function. More...

#include <rotation.hh>

Inheritance diagram for mln::fun::x2x::rotation< n, C >:
Inheritance graph

List of all members.

Public Types

typedef algebra::vec< n, C > argument
typedef Function_v2v< void > category
typedef C data_t
 Type of the underlying data stored in vectors and matrices.
typedef rotation< n, C > exact_t
typedef rotation< n, C > invert
 Type of the inverse function.
typedef algebra::h_mat< dim, C > matrix
typedef void mutable_result
typedef algebra::vec< n, C > result

Public Member Functions

invert inv () const
 Return the inverse function.
const matrixmat () 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

alpha_
algebra::vec< n, C > axis_
matrix m_

Detailed Description

template<unsigned n, typename C>
struct mln::fun::x2x::rotation< n, C >

Represent a rotation function.

Definition at line 147 of file rotation.hh.


Member Typedef Documentation

typedef algebra::vec< n, C > mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , C, rotation< n, C > >::argument [inherited]

Definition at line 53 of file x2x_linear_impl.hh.

typedef Function_v2v<void> mln::Function_v2v< rotation< n, C > >::category [inherited]

Reimplemented from mln::Function< rotation< n, C > >.

Definition at line 126 of file function.hh.

template<unsigned n, typename C>
typedef C mln::fun::x2x::rotation< n, C >::data_t

Type of the underlying data stored in vectors and matrices.

Definition at line 152 of file rotation.hh.

typedef rotation< n, C > mln::Object< rotation< n, C > >::exact_t [inherited]

Definition at line 173 of file object.hh.

template<unsigned n, typename C>
typedef rotation<n,C> mln::fun::x2x::rotation< n, C >::invert

Type of the inverse function.

Definition at line 155 of file rotation.hh.

typedef algebra::h_mat<dim, C> mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , C, rotation< n, C > >::matrix [inherited]

Definition at line 55 of file x2x_linear_impl.hh.

typedef void mln::Function_v2v< rotation< n, C > >::mutable_result [inherited]

Definition at line 127 of file function.hh.

typedef algebra::vec< n, C > mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , C, rotation< n, C > >::result [inherited]

Definition at line 54 of file x2x_linear_impl.hh.


Constructor & Destructor Documentation

template<unsigned n, typename C >
mln::fun::x2x::rotation< n, C >::rotation (  )  [inline]

Constructor without argument.

Definition at line 192 of file rotation.hh.

template<unsigned n, typename C >
mln::fun::x2x::rotation< n, C >::rotation ( alpha,
const algebra::vec< n, C > &  axis 
) [inline]

Constructor with radian alpha and a facultative direction (rotation axis).

Definition at line 198 of file rotation.hh.

References mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, C, rotation< n, C > >::m_, and mln::fun::x2x::rotation< n, C >::update().

template<unsigned n, typename C >
mln::fun::x2x::rotation< n, C >::rotation ( const algebra::quat q  )  [inline]
template<unsigned n, typename C >
mln::fun::x2x::rotation< n, C >::rotation ( const algebra::h_mat< n, C > &  m  )  [inline]

Constructor with h_mat.

Definition at line 238 of file rotation.hh.

References mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, C, rotation< n, C > >::m_.


Member Function Documentation

template<unsigned n, typename C >
bool mln::fun::x2x::rotation< n, C >::check_rotation ( const algebra::quat q  )  [inline, protected]
template<unsigned n, typename C >
rotation< n, C > mln::fun::x2x::rotation< n, C >::inv (  )  const [inline]

Return the inverse function.

Definition at line 265 of file rotation.hh.

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 > , C, rotation< n, C > >::mat (  )  const [inherited]
template<unsigned n, typename C >
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.

Definition at line 247 of file rotation.hh.

References mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C >, C, rotation< n, C > >::m_.

algebra::vec< n, C > mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , C, rotation< n, C > >::operator() ( const algebra::vec< n, C > &  x  )  const [inline, inherited]

Definition at line 57 of file x2x_linear_impl.hh.

template<unsigned n, typename C >
void mln::fun::x2x::rotation< n, C >::set_alpha ( alpha  )  [inline]

Set a new grade alpha.

Definition at line 274 of file rotation.hh.

References mln::fun::x2x::rotation< n, C >::alpha_, and mln::fun::x2x::rotation< n, C >::update().

template<unsigned n, typename C >
void mln::fun::x2x::rotation< n, C >::set_axis ( const algebra::vec< n, C > &  axis  )  [inline]

Set a new rotation axis.

Definition at line 283 of file rotation.hh.

References mln::fun::x2x::rotation< n, C >::axis_, and mln::fun::x2x::rotation< n, C >::update().

template<unsigned n, typename C >
void mln::fun::x2x::rotation< n, C >::update (  )  [inline, protected]

Member Data Documentation

template<unsigned n, typename C>
C mln::fun::x2x::rotation< n, C >::alpha_ [protected]
template<unsigned n, typename C>
algebra::vec<n,C> mln::fun::x2x::rotation< n, C >::axis_ [protected]
const unsigned mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , C, rotation< n, C > >::dim [static, inherited]

Definition at line 51 of file x2x_linear_impl.hh.

matrix mln::fun::internal::x2x_linear_impl_< algebra::vec< n, C > , C, rotation< n, C > >::m_ [protected, inherited]