Documentation


animal::Rotation2d< RealT, TraitsT > Class Template Reference

#include <rotation2d.h>

List of all members.


Detailed Description

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
class animal::Rotation2d< RealT, TraitsT >

Matrix 2x2 used to model a rotation in 2D.

Author:
François Faure, April 2000, animal/rotation2d.h
See also:
Rotation2d_Traits
Examples:

rotation2d_test.cpp.

Definition at line 30 of file rotation2d.h.

Constructors/Destructors

 Rotation2d ()
 Default constructor: does nothing.

 Rotation2d (const Real angle)
 Define angle.

Rotation2d identity ()
 Identity.


Public Types

Typedefs
typedef TraitsT Traits
 Type used for class customization.

typedef RealT Real
 Floating point type.


Public Member Functions

Value
Real angle () const
 Get angle.

Rotation2dsetAngle (const Real angle)
 Set angle.

Rotation2d inverse () const
 Get the inverse.

Rotation2d operator * (const Real u) const
 Interpolate.

Combination of rotations
Rotation2d operator * (const Rotation2d &r) const
 Product.

Rotation2doperator *= (const Rotation2d &r)
 In-place product.

Rotation2d operator/ (const Rotation2d &r) const
 Division (product with the inverse).

Rotation2doperator/= (const Rotation2d &r)
 In-place division (product with the inverse).


Static Public Member Functions

Time integration
template<class RotationVelocity> Rotation2d eulerIncrement (const RotationVelocity &omega, const double h)
 Euler step.


Private Member Functions

 Rotation2d (const Real xx, const Real xy, const Real yx, const Real yy)
 A private constructor.


Private Attributes

Array< 2, Array< 2, Real > > _matrix
 The value.


Friends

Apply to vectors
template<class R, class T, class Vector> Vector operator * (const Vector &, const Rotation2d< R, T > &)
 Apply rotation to a vector.

template<class R, class T, class Vector> Vector & operator *= (Vector &, const Rotation2d< R, T > &)
 Apply rotation to a vector.

template<class R, class T, class Vector> Vector operator/ (const Vector &, const Rotation2d< R, T > &)
 Apply inverse rotation to a vector.

template<class R, class T, class Vector> Vector & operator/= (Vector &, const Rotation2d< R, T > &)
 Apply inverse rotation to a vector.

Input/Output
template<class R, class T> std::istream & operator>> (std::istream &, Rotation2d< R, T > &)
 Input.

template<class R, class T> std::ostream & operator<< (std::ostream &, const Rotation2d< R, T > &)
 Output.


Member Typedef Documentation

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
typedef RealT animal::Rotation2d< RealT, TraitsT >::Real
 

Floating point type.

Definition at line 41 of file rotation2d.h.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
typedef TraitsT animal::Rotation2d< RealT, TraitsT >::Traits
 

Type used for class customization.

Definition at line 38 of file rotation2d.h.


Constructor & Destructor Documentation

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
animal::Rotation2d< RealT, TraitsT >::Rotation2d  )  [inline]
 

Default constructor: does nothing.

Definition at line 49 of file rotation2d.h.

Referenced by animal::Rotation2d< RealT, TraitsT >::eulerIncrement(), animal::Rotation2d< RealT, TraitsT >::identity(), animal::Rotation2d< RealT, TraitsT >::inverse(), animal::Rotation2d< RealT, TraitsT >::operator *(), animal::Rotation2d< RealT, TraitsT >::operator *=(), animal::Rotation2d< RealT, TraitsT >::operator/(), and animal::Rotation2d< RealT, TraitsT >::operator/=().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
animal::Rotation2d< RealT, TraitsT >::Rotation2d const Real  angle  )  [inline]
 

Define angle.

Definition at line 52 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
animal::Rotation2d< RealT, TraitsT >::Rotation2d const Real  xx,
const Real  xy,
const Real  yx,
const Real  yy
[inline, private]
 

A private constructor.

Definition at line 213 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix.


Member Function Documentation

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Real animal::Rotation2d< RealT, TraitsT >::angle  )  const [inline]
 

Get angle.

Definition at line 69 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix.

Referenced by animal::Rotation2d< RealT, TraitsT >::operator *(), and animal::operator<<().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class RotationVelocity>
Rotation2d animal::Rotation2d< RealT, TraitsT >::eulerIncrement const RotationVelocity &  omega,
const double  h
[inline, static]
 

Euler step.

Definition at line 166 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d animal::Rotation2d< RealT, TraitsT >::identity  )  [inline, static]
 

Identity.

Definition at line 61 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d animal::Rotation2d< RealT, TraitsT >::inverse  )  const [inline]
 

Get the inverse.

Definition at line 90 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix, and animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d animal::Rotation2d< RealT, TraitsT >::operator * const Rotation2d< RealT, TraitsT > &  r  )  const [inline]
 

Product.

Definition at line 114 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix, and animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d animal::Rotation2d< RealT, TraitsT >::operator * const Real  u  )  const [inline]
 

Interpolate.

Definition at line 99 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::angle().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d& animal::Rotation2d< RealT, TraitsT >::operator *= const Rotation2d< RealT, TraitsT > &  r  )  [inline]
 

In-place product.

Definition at line 125 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix, and animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d animal::Rotation2d< RealT, TraitsT >::operator/ const Rotation2d< RealT, TraitsT > &  r  )  const [inline]
 

Division (product with the inverse).

Definition at line 137 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix, and animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d& animal::Rotation2d< RealT, TraitsT >::operator/= const Rotation2d< RealT, TraitsT > &  r  )  [inline]
 

In-place division (product with the inverse).

Definition at line 148 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix, and animal::Rotation2d< RealT, TraitsT >::Rotation2d().

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Rotation2d& animal::Rotation2d< RealT, TraitsT >::setAngle const Real  angle  )  [inline]
 

Set angle.

Examples:
rotation2d_test.cpp.

Definition at line 80 of file rotation2d.h.

References animal::Rotation2d< RealT, TraitsT >::_matrix.

Referenced by animal::operator>>().


Friends And Related Function Documentation

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class R, class T, class Vector>
Vector operator * const Vector &  v,
const Rotation2d< R, T > &  m
[friend]
 

Apply rotation to a vector.

Definition at line 264 of file rotation2d.h.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class R, class T, class Vector>
Vector& operator *= Vector &  v,
const Rotation2d< R, T > &  m
[friend]
 

Apply rotation to a vector.

Definition at line 278 of file rotation2d.h.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class R, class T, class Vector>
Vector operator/ const Vector &  v,
const Rotation2d< R, T > &  m
[friend]
 

Apply inverse rotation to a vector.

Definition at line 235 of file rotation2d.h.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class R, class T, class Vector>
Vector& operator/= Vector &  v,
const Rotation2d< R, T > &  m
[friend]
 

Apply inverse rotation to a vector.

Definition at line 249 of file rotation2d.h.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class R, class T>
std::ostream& operator<< std::ostream &  stream,
const Rotation2d< R, T > &  r
[friend]
 

Output.

Definition at line 305 of file rotation2d.h.

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
template<class R, class T>
std::istream& operator>> std::istream &  stream,
Rotation2d< R, T > &  r
[friend]
 

Input.

Definition at line 292 of file rotation2d.h.


Member Data Documentation

template<class RealT = double, class TraitsT = Rotation2d_Traits<RealT>>
Array<2 , Array< 2, Real> > animal::Rotation2d< RealT, TraitsT >::_matrix [private]
 

The value.

Definition at line 210 of file rotation2d.h.

Referenced by animal::Rotation2d< RealT, TraitsT >::angle(), animal::Rotation2d< RealT, TraitsT >::inverse(), animal::operator *(), animal::Rotation2d< RealT, TraitsT >::operator *(), animal::operator *=(), animal::Rotation2d< RealT, TraitsT >::operator *=(), animal::operator/(), animal::Rotation2d< RealT, TraitsT >::operator/(), animal::operator/=(), animal::Rotation2d< RealT, TraitsT >::operator/=(), animal::Rotation2d< RealT, TraitsT >::Rotation2d(), and animal::Rotation2d< RealT, TraitsT >::setAngle().


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:52:31 2004 by doxygen 1.3.6