HyperspaceExplorer 0.7.1
Public Member Functions | Private Attributes
VecMath::Rotation< D, N > Class Template Reference

Rotation in D-dimensional space defined by angles about the main axes. More...

#include <Rotation.h>

Inheritance diagram for VecMath::Rotation< D, N >:
Inheritance graph
[legend]
Collaboration diagram for VecMath::Rotation< D, N >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Rotation ()
 default constructor, zero rotation
 Rotation (N r0,...)
 Constructor with variable arglist.
N & operator[] (unsigned i)
 Returns a reference to component i.
operator[] (unsigned i) const
 Returns component i by value.
 operator Matrix< D, N > () const
 Creates a rotation Matrix from the angles.
Rotation< D, N > & operator+= (const Rotation< D, N > &that)
 Adds another Rotation to this.
 operator bool () const
 true if rotation is nonzero
const Vector< NumAxes< D >
::num, N > & 
r () const
 access the stored values (needed by output operator <<())
Vector< NumAxes< D >::num, N > & r ()
 write access the stored values (needed by input operator >>())
std::string toString () const
 Convert Rotation to a std::string.

Private Attributes

Vector< NumAxes< D >::num, N > axis
 Rotation angles are stored as a Vector, operations are delegated.

Detailed Description

template<unsigned D, typename N = double>
class VecMath::Rotation< D, N >

Rotation in D-dimensional space defined by angles about the main axes.

Template Parameters:
Ddimension of the vector space
Nnumerical type of the rotation angles
Author:
Helge Preuss <lene.preuss@gmail.com>

Constructor & Destructor Documentation

template<unsigned D, typename N>
VecMath::Rotation< D, N >::Rotation ( r0,
  ... 
)

Constructor with variable arglist.

Parameters:
r0angle about first rotation axis
...angle about the other axes

References VecMath::Rotation< D, N >::axis, num, and va_end.


Member Function Documentation

template<unsigned D, typename N >
VecMath::Rotation< D, N >::operator bool ( ) const

true if rotation is nonzero

Todo:
move out of the class

References VecMath::sqnorm().

Here is the call graph for this function:

template<unsigned D, typename N >
VecMath::Rotation< D, N >::operator Matrix< D, N > ( ) const

Creates a rotation Matrix from the angles.

Todo:

default implementation does not work correctly yet

move out of the class

See also:
the specializations for 3 and 4 dimensions in Rotation.C

References VecMath::RotationAxes< D >::axis(), num, and operator[]().

Here is the call graph for this function:

template<unsigned D, typename N>
Rotation< D, N > & VecMath::Rotation< D, N >::operator+= ( const Rotation< D, N > &  that)

Adds another Rotation to this.

Parameters:
thatother Rotation
Returns:
*this+that

References VecMath::Rotation< D, N >::axis.

template<unsigned D, typename N >
N VecMath::Rotation< D, N >::operator[] ( unsigned  i) const

Returns component i by value.

Parameters:
iindex of the element
Returns:
the accessed element
template<unsigned D, typename N >
N & VecMath::Rotation< D, N >::operator[] ( unsigned  i)

Returns a reference to component i.

Parameters:
iindex of the element
Returns:
non-const reference to the accessed element

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:19 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo