SourceForge.net Logo

camvox::TMatrix< T > Class Template Reference

#include <Matrix.h>

List of all members.


Detailed Description

template<class T>
class camvox::TMatrix< T >

An affine transformation matrix.

An 4 x 4 transformation matrix to scale, shear, rotate and translate homogeious vectors and points.


Public Member Functions

 TMatrix (void)
 Construct an identity matrix.
TMatrix operator* (const T &other) const
 Multiply the matrix by a scalar.
TMatrix operator* (const TMatrix &other) const
 Cross product of two matrices.
Vector operator* (const Vector &other) const
 Transform a Vector by this matrix.
IntervalVector operator* (const IntervalVector &other) const
 Transform an IntervalVector by this matrix.
TMatrix invert (void) const
 Calculate the inversion of this matrix.
TMatrix translate (const Vector &v) const
 Add a translation operation to this matrix.
TMatrix scale (const Vector &v) const
 Add a scale operation to this matrix.
TMatrix rotate (const TVector< T > &v, double _angle) const
 Add a rotation operation to this matrix.

Public Attributes

m [4][4]
 the 4 x 4 matrix.

Constructor & Destructor Documentation

template<class T>
camvox::TMatrix< T >::TMatrix ( void   )  [inline]

Construct an identity matrix.


Member Function Documentation

template<class T>
TMatrix camvox::TMatrix< T >::operator* ( const T &  other  )  const [inline]

Multiply the matrix by a scalar.

template<class T>
TMatrix camvox::TMatrix< T >::operator* ( const TMatrix< T > &  other  )  const [inline]

Cross product of two matrices.

template<class T>
Vector camvox::TMatrix< T >::operator* ( const Vector other  )  const [inline]

Transform a Vector by this matrix.

template<class T>
IntervalVector camvox::TMatrix< T >::operator* ( const IntervalVector other  )  const [inline]

Transform an IntervalVector by this matrix.

An IntervalVector is like an axis-aligned bounded box.

template<class T>
TMatrix camvox::TMatrix< T >::invert ( void   )  const [inline]

Calculate the inversion of this matrix.

template<class T>
TMatrix camvox::TMatrix< T >::translate ( const Vector v  )  const [inline]

Add a translation operation to this matrix.

Parameters:
v Translation vector
Returns:
A new matrix with the translation applied.

template<class T>
TMatrix camvox::TMatrix< T >::scale ( const Vector v  )  const [inline]

Add a scale operation to this matrix.

Parameters:
v Vector with scale values along each axis.
Returns:
A new matrix with the scale applied.

template<class T>
TMatrix camvox::TMatrix< T >::rotate ( const TVector< T > &  v,
double  _angle 
) const [inline]

Add a rotation operation to this matrix.

The rotation is around a vector oriented at the origin. The rotation is counter-clockwise if one looks from the origin along the vector.

Parameters:
v The rotation is along this vector.
angle The rotation is radians around the vector.
Returns:
A new matrix with the rotation applied.


Member Data Documentation

template<class T>
T camvox::TMatrix< T >::m[4][4]

the 4 x 4 matrix.


The documentation for this class was generated from the following file: