Main Page | Alphabetical List | Compound List | File List | Compound Members

TransformMatrix< T > Class Template Reference

This class provides the functionality of a 3D geometry/projection transform matrix assuming a right-handed coordinate system (RHS). Since it uses assertions for checking index boundaries define the NDEBUG flag (-DNDEBUG) for release versions! . More...

#include <TransformMatrix.h>

List of all members.

Public Member Functions

 TransformMatrix ()
 TransformMatrix (const TransformMatrix< T > &src)
virtual ~TransformMatrix ()
void reset ()
template<class Vector> void transform (const Vector &v, Vector &vt) const
 method for transforming a 3-element vector.

template<class Vector> void transformHomogen (const Vector &v, Vector &vt) const
 method for transforming a 4-element vector (homogenous coordinates).

void translate (T x, T y, T z)
 method applying a translation to the matrix.

void rotateAroundZ (T phi)
 method applying a rotation around the z axis

operator() (size_t row, size_t column) const
 access operator for an element value

T & operator() (size_t row, size_t column)
bool operator== (const TransformMatrix< T > &other) const
bool operator!= (const TransformMatrix< T > &other)
void operator+= (const TransformMatrix< T > &other)
void operator-= (const TransformMatrix< T > &other)
void operator *= (const TransformMatrix< T > &b)
void operator *= (T scale)


Detailed Description

template<class T>
class TransformMatrix< T >

This class provides the functionality of a 3D geometry/projection transform matrix assuming a right-handed coordinate system (RHS). Since it uses assertions for checking index boundaries define the NDEBUG flag (-DNDEBUG) for release versions! .

Author:
Ruediger Knoerig

Definition at line 23 of file TransformMatrix.h.


Constructor & Destructor Documentation

template<class T>
TransformMatrix< T >::TransformMatrix  )  [inline]
 

default constructor, results in a unity matrix

Definition at line 26 of file TransformMatrix.h.

template<class T>
TransformMatrix< T >::TransformMatrix const TransformMatrix< T > &  src  )  [inline]
 

copy constructor

Definition at line 31 of file TransformMatrix.h.

template<class T>
virtual TransformMatrix< T >::~TransformMatrix  )  [inline, virtual]
 

destructor

Definition at line 34 of file TransformMatrix.h.


Member Function Documentation

template<class T>
void TransformMatrix< T >::operator *= scale  )  [inline]
 

matrix scaling operation (element-wise multiplication with a scalar) $\left\{a_{ij}\right\}=\left\{a_{ij}\cdot b\right\}\;\forall i,j $

Parameters:
scale scalar value to multiply the elements with)

Definition at line 126 of file TransformMatrix.h.

template<class T>
void TransformMatrix< T >::operator *= const TransformMatrix< T > &  b  )  [inline]
 

multiply-with operator (matrix multiplication).

Parameters:
b multiplicant

Definition at line 199 of file TransformMatrix.h.

References TransformMatrix< T >::matrixdata.

template<class T>
bool TransformMatrix< T >::operator!= const TransformMatrix< T > &  other  )  [inline]
 

comparison for inequality

Parameters:
other matrix to compare with
Returns:
true if not all elements in the matrices are the same

Definition at line 101 of file TransformMatrix.h.

References TransformMatrix< T >::matrixdata.

template<class T>
T& TransformMatrix< T >::operator() size_t  row,
size_t  column
[inline]
 

access operator for an element value

Parameters:
row row number of the element
column column number of the element
Returns:
copy of the element value

Definition at line 87 of file TransformMatrix.h.

template<class T>
T TransformMatrix< T >::operator() size_t  row,
size_t  column
const [inline]
 

access operator for an element value

Parameters:
row row number of the element
column column number of the element
Returns:
copy of the element value

Definition at line 79 of file TransformMatrix.h.

template<class T>
void TransformMatrix< T >::operator+= const TransformMatrix< T > &  other  )  [inline]
 

add-to operator (element-wise addition)

Parameters:
other matrix which should be added

Definition at line 107 of file TransformMatrix.h.

References TransformMatrix< T >::matrixdata.

template<class T>
void TransformMatrix< T >::operator-= const TransformMatrix< T > &  other  )  [inline]
 

subtract-from operator (element-wise substraction)

Parameters:
other matrix which should substracted

Definition at line 113 of file TransformMatrix.h.

References TransformMatrix< T >::matrixdata.

template<class T>
bool TransformMatrix< T >::operator== const TransformMatrix< T > &  other  )  const [inline]
 

comparison for equality

Parameters:
other matrix to compare with
Returns:
true if all elements in the matrices are the same

Definition at line 94 of file TransformMatrix.h.

References TransformMatrix< T >::matrixdata.

template<class T>
void TransformMatrix< T >::reset  )  [inline]
 

method resetting the matrix to the unity matrix

Definition at line 39 of file TransformMatrix.h.

template<class T>
void TransformMatrix< T >::rotateAroundZ phi  ) 
 

method applying a rotation around the z axis

Parameters:
phi angle in radians

Definition at line 271 of file TransformMatrix.h.

template<class T>
template<class Vector>
void TransformMatrix< T >::transform const Vector &  v,
Vector &  vt
const
 

method for transforming a 3-element vector.

Parameters:
v vector to be transformed. The vector class must have at least 3 elements which must be accessible via the []-operator.
vt reference to the target vector. Is $v'=v\cdot\mathbf{A}$ afterwards.

Definition at line 236 of file TransformMatrix.h.

template<class T>
template<class Vector>
void TransformMatrix< T >::transformHomogen const Vector &  v,
Vector &  vt
const
 

method for transforming a 4-element vector (homogenous coordinates).

Parameters:
v vector to be transformed. The vector class must have at least 4 elements which must be accessible via the []-operator.
vt reference to the target vector. Is $v'=v\cdot\mathbf{A}$ afterwards.

Definition at line 243 of file TransformMatrix.h.

template<class T>
void TransformMatrix< T >::translate x,
y,
z
 

method applying a translation to the matrix.

Parameters:
x x offset
y y offset
z z offset

Definition at line 252 of file TransformMatrix.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 2 19:14:50 2004 for CPP3D by doxygen 1.3.2