Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Matrix3x3< V > Class Template Reference

This class represents a 3x3-matrix. More...

#include <Matrix.h>

List of all members.

Public Member Functions

 Matrix3x3 ()
 Default constructor.

 Matrix3x3 (const Vector3< V > &c0, const Vector3< V > &c1, const Vector3< V > &c2)
 Constructor.

Matrix3x3< V > & operator= (const Matrix3x3< V > &other)
 Assignment operator.

 Matrix3x3 (const Matrix3x3< V > &other)
 Copy constructor.

Matrix3x3< V > operator+ (const Matrix3x3< V > &other) const
 Adds this matrix with another matrix.

Matrix3x3< V > & operator+= (const Matrix3x3< V > &other)
 Adds this matrix to another matrix.

Vector3< V > operator * (const Vector3< V > &vector) const
 Multiplication of this matrix by vector.

Matrix3x3< V > operator * (const Matrix3x3< V > &other) const
 Multiplication of this matrix by another matrix.

Matrix3x3< V > & operator *= (const Matrix3x3< V > &other)
 Multiplication of this matrix by another matrix.

Matrix3x3< V > & operator *= (const V &factor)
 Multiplication of this matrix by a factor.

Matrix3x3< V > & operator/= (const V &factor)
 Division of this matrix by a factor.

Matrix3x3< V > operator * (const V &factor) const
 Multiplication of this matrix by a factor.

Matrix3x3< V > operator/ (const V &factor) const
 Division of this matrix by a factor.

bool operator== (const Matrix3x3< V > &other) const
 Comparison of another matrix with this one.

bool operator!= (const Matrix3x3< V > &other) const
 Comparison of another matrix with this one.

Vector3< V > & operator[] (int i)
 Array-like member access.

Matrix3x3< V > transpose () const
 Transpose the matrix.

det () const
 Calculation of the determinant of this matrix.

Matrix3x3< V > adjoint () const
 Calculate the adjoint of this matrix.

Matrix3x3< V > invert () const
 Calculate the inverse of this matrix.


Static Public Member Functions

det2 (V a, V b, V c, V d)
 Calculate determinant of 2x2 Submatrix | a b | | c d |.


Public Attributes

Vector3< V > c [3]
 The columns of the matrix.


Detailed Description

template<class V>
class Matrix3x3< V >

This class represents a 3x3-matrix.

Definition at line 19 of file Matrix.h.


Constructor & Destructor Documentation

template<class V>
Matrix3x3< V >::Matrix3x3  )  [inline]
 

Default constructor.

template<class V>
Matrix3x3< V >::Matrix3x3 const Vector3< V > &  c0,
const Vector3< V > &  c1,
const Vector3< V > &  c2
[inline]
 

Constructor.

Parameters:
c0 the first column of the matrix.
c1 the second column of the matrix.
c2 the third column of the matrix.

template<class V>
Matrix3x3< V >::Matrix3x3 const Matrix3x3< V > &  other  )  [inline]
 

Copy constructor.

Parameters:
other The other matrix that is copied to this one


Member Function Documentation

template<class V>
Matrix3x3<V>& Matrix3x3< V >::operator= const Matrix3x3< V > &  other  )  [inline]
 

Assignment operator.

Parameters:
other The other matrix that is assigned to this one
Returns:
A reference to this object after the assignment.

Reimplemented in RotationMatrix.

Definition at line 60 of file Matrix.h.

template<class V>
Matrix3x3<V> Matrix3x3< V >::operator+ const Matrix3x3< V > &  other  )  const [inline]
 

Adds this matrix with another matrix.

Parameters:
other The matrix this one is added to
Returns:
A new vector containing the result of the calculation.

Definition at line 85 of file Matrix.h.

template<class V>
Matrix3x3<V>& Matrix3x3< V >::operator+= const Matrix3x3< V > &  other  )  [inline]
 

Adds this matrix to another matrix.

Parameters:
other The other matrix that is added to this one
Returns:
A reference this object after the calculation.

Definition at line 99 of file Matrix.h.

template<class V>
Vector3<V> Matrix3x3< V >::operator * const Vector3< V > &  vector  )  const [inline]
 

Multiplication of this matrix by vector.

Parameters:
vector The vector this one is multiplied by
Returns:
A new vector containing the result of the calculation.

Definition at line 113 of file Matrix.h.

template<class V>
Matrix3x3<V> Matrix3x3< V >::operator * const Matrix3x3< V > &  other  )  const [inline]
 

Multiplication of this matrix by another matrix.

Parameters:
other The other matrix this one is multiplied by
Returns:
A new matrix containing the result of the calculation.

Definition at line 125 of file Matrix.h.

template<class V>
Matrix3x3<V>& Matrix3x3< V >::operator *= const Matrix3x3< V > &  other  )  [inline]
 

Multiplication of this matrix by another matrix.

Parameters:
other The other matrix this one is multiplied by
Returns:
A reference this object after the calculation.

Definition at line 140 of file Matrix.h.

template<class V>
Matrix3x3<V>& Matrix3x3< V >::operator *= const V &  factor  )  [inline]
 

Multiplication of this matrix by a factor.

Parameters:
factor The factor this matrix is multiplied by
Returns:
A reference to this object after the calculation.

Definition at line 151 of file Matrix.h.

template<class V>
Matrix3x3<V>& Matrix3x3< V >::operator/= const V &  factor  )  [inline]
 

Division of this matrix by a factor.

Parameters:
factor The factor this matrix is divided by
Returns:
A reference to this object after the calculation.

Definition at line 165 of file Matrix.h.

template<class V>
Matrix3x3<V> Matrix3x3< V >::operator * const V &  factor  )  const [inline]
 

Multiplication of this matrix by a factor.

Parameters:
factor The factor this matrix is multiplied by
Returns:
A new object that contains the result of the calculation.

Definition at line 177 of file Matrix.h.

template<class V>
Matrix3x3<V> Matrix3x3< V >::operator/ const V &  factor  )  const [inline]
 

Division of this matrix by a factor.

Parameters:
factor The factor this matrix is divided by
Returns:
A new object that contains the result of the calculation.

Definition at line 188 of file Matrix.h.

template<class V>
bool Matrix3x3< V >::operator== const Matrix3x3< V > &  other  )  const [inline]
 

Comparison of another matrix with this one.

Parameters:
other The other matrix that will be compared to this one
Returns:
Whether the two matrices are equal.

Definition at line 199 of file Matrix.h.

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

Comparison of another matrix with this one.

Parameters:
other The other matrix that will be compared to this one
Returns:
Whether the two matrixs are unequal.

Definition at line 214 of file Matrix.h.

template<class V>
Vector3<V>& Matrix3x3< V >::operator[] int  i  )  [inline]
 

Array-like member access.

Parameters:
i index
Returns:
reference to column

Definition at line 224 of file Matrix.h.

template<class V>
Matrix3x3<V> Matrix3x3< V >::transpose  )  const [inline]
 

Transpose the matrix.

Returns:
A new object containing transposed matrix

Definition at line 234 of file Matrix.h.

template<class V>
V Matrix3x3< V >::det  )  const [inline]
 

Calculation of the determinant of this matrix.

Returns:
The determinant.

Definition at line 248 of file Matrix.h.

Referenced by Matrix3x3< int >::invert().

template<class V>
V Matrix3x3< V >::det2 a,
b,
c,
d
[inline, static]
 

Calculate determinant of 2x2 Submatrix | a b | | c d |.

Returns:
determinant.

Definition at line 263 of file Matrix.h.

Referenced by Matrix3x3< int >::adjoint().

template<class V>
Matrix3x3<V> Matrix3x3< V >::adjoint  )  const [inline]
 

Calculate the adjoint of this matrix.

Returns:
the adjoint matrix.

Definition at line 273 of file Matrix.h.

Referenced by Matrix3x3< int >::invert().

template<class V>
Matrix3x3<V> Matrix3x3< V >::invert  )  const [inline]
 

Calculate the inverse of this matrix.

Returns:
The inverse matrix

Definition at line 300 of file Matrix.h.


Member Data Documentation

template<class V>
Vector3<V> Matrix3x3< V >::c[3]
 

The columns of the matrix.

Definition at line 24 of file Matrix.h.

Referenced by Matrix3x3< int >::operator *(), Matrix3x3< int >::operator+(), Matrix3x3< int >::operator+=(), RotationMatrix::operator=(), Matrix3x3< int >::operator=(), LA::Matrix::operator=(), Matrix3x3< int >::operator==(), and operator>>().


The documentation for this class was generated from the following file:
Generated on Mon Mar 20 22:17:39 2006 for GT2005 by doxygen 1.3.6