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.

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>
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 85 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 97 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 112 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 123 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 137 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 149 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 160 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 171 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 186 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 196 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 206 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 220 of file Matrix.h.

Referenced by Matrix3x3< double >::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 235 of file Matrix.h.

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

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

Calculate the adjoint of this matrix.

Returns:
the adjoint matrix.

Definition at line 245 of file Matrix.h.

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

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

Calculate the inverse of this matrix.

Returns:
The inverse matrix

Definition at line 272 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< double >::operator *(), RotationMatrix::operator=(), Matrix3x3< double >::operator=(), Matrix3x3< double >::operator==(), and operator>>().


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:09:31 2004 for GT2004 by doxygen 1.3.6