Main Page | Packages | Class Hierarchy | Class List | Directories | Class Members

IDVR.Tools.Matrix3 Class Reference

#include <Matrix3.h>

List of all members.


Detailed Description

Class for a 3x3 matrix.

This class is part of the Tools namespace and its target is the handling and computing of different linear algebra operations (e.g. matrix multiplications). Basically this class should only be used for arbitrary linear operation in the 3 dimensional space, all linear transformation like translation, rotation, etc. are part of the Matrix4 class and should be used for such operations (becouse of the explicit use homogenous coordinates).
Please notice that the logical order of the matrix elements is in ordinary (C++ like) alignment. The following brief schema visualizes the valid matix alignment:

m00 m01 m02
m10 m11 m12
m20 m21 m22

The implemented linear operations of this class are of course only a fraction of linear algebra, the minimum pool of operations which will be used in the IDVR program.
See also:
Matrix4 - the 4x4 matrix class for linear transformations.
Author:
Bernhard Pflugfelder
Version:
1.0
Date:
02-17-2005


Public Member Functions

 Matrix3 (void)
 This is the standard constructor.
 Matrix3 (double n_MatrixElements __gc[,])
 Constructor initialization by a specified array of matrix elements.
 Matrix3 (Matrix3 *n_Matrix)
 Constructor initialization by an existing Matrix3 object.
Vector3multiply_WithPoint (Vector3 *v_Point)
 Use this function for multiply matrices with a specified Vector3 object.
double getItem (int row, int column)
 This function returns the specific matrix element.
double getArray (void) __gc[
 Get all matrix elements as two dimensional double array.
double void setItem (int row, int column, double value)
 This function sets a specific matrix element by the specified value.
double calculateDeterminant (void)
 Calculates the determinant of the current matrix.
void multiply_WithScalar (double n_Scalar)
 Multiply the current matrix with a skalar value.
Matrix3transpose (void)
 Returns the transpose matrix of the current matrix.

Static Public Member Functions

static Matrix3MultiplyMatices (Matrix3 *leftMatrix, Matrix3 *rightMatrix)
 This static funtion multiplies the specified 3x3 matrices.
static Matrix3CreateIdentityMatrix (void)
 Creates an newly 3x3 identity matrix.
static Matrix3CreateReducedMatrix (Matrix4 *n_BaseMatrix, unsigned short n_Row, unsigned short n_Column)
 Creates a reduced 3x3 Cofactor matrix out of a 4x4 matrix.

Static Public Attributes

static const unsigned char ORDER = 3
 A constant that specifies the matrix order of matices of this class type.

Private Attributes

double m_MatrixElements __gc [,]
 The array of the necessary matrix elements.


Constructor & Destructor Documentation

Matrix3::Matrix3 void   ) 
 

This is the standard constructor.

This standard constructor initialized all matrix elements with zero.

Matrix3::Matrix3 double n_MatrixElements  __gc[,]  ) 
 

Constructor initialization by a specified array of matrix elements.

This constructor initialized all matrix elements with the corresponding elements of the specified 2 dimensional array.

Parameters:
n_MatrixElements the values for the matrix elements.

Matrix3::Matrix3 Matrix3 n_Matrix  ) 
 

Constructor initialization by an existing Matrix3 object.

This constructor initialized all matrix elements with the corresponfing values of the specified Matrix3 object. Please notice that the currently initialized object is not directly linked to the specified parameter by the same memory address but it has its own memory space.

Parameters:
n_Matrix the Matrix3 object containing the initialization values.


Member Function Documentation

double IDVR.Tools.Matrix3.calculateDeterminant void   ) 
 

Calculates the determinant of the current matrix.

For the calculation of the determinant the SARRUS rule will be used.

Returns:
The calculated determinant value.

static Matrix3* IDVR.Tools.Matrix3.CreateIdentityMatrix void   )  [static]
 

Creates an newly 3x3 identity matrix.

Returns:
The 3x3 identity matrix.

static Matrix3* IDVR.Tools.Matrix3.CreateReducedMatrix Matrix4 n_BaseMatrix,
unsigned short  n_Row,
unsigned short  n_Column
[static]
 

Creates a reduced 3x3 Cofactor matrix out of a 4x4 matrix.

With the specified parameters the 4x4 matrix (also a parameter) will be reduced to a 3x3 matrix by calculating the Cofactor matrix.

Parameters:
n_BaseMatrix the original base 4x4 matrix..
n_Row the specific row count of the reduction.
n_Column the specific column count of the reduction.
Returns:
The resulting 3x3 Cofactor matrix.

double Matrix3::getArray void   ) 
 

Get all matrix elements as two dimensional double array.

Returns:
The two dimensional array containing the corresponding matrix elements.

double Matrix3::getItem int  row,
int  column
 

This function returns the specific matrix element.

This element is specified by the specified parameter which are the row and column count.

Parameters:
row the row count of the specific element.
column the column count of the specific element.
Returns:
The matrix element which is defined by teh parameters.
Exceptions:
Exception instance will be thrown if either the row or column count is not valid.

Vector3 * Matrix3::multiply_WithPoint Vector3 v_Point  ) 
 

Use this function for multiply matrices with a specified Vector3 object.

A right-side matrix multiplication will be used so that the Vector3 object always is the right sided matrix.

Parameters:
v_Point the specific Vector3 object to multiply the current matrix.
Returns:
The result as a newly created Vector3 object.

void IDVR.Tools.Matrix3.multiply_WithScalar double  n_Scalar  ) 
 

Multiply the current matrix with a skalar value.

Parameters:
n_Scalar the skalar value to multiply the matrix.

static Matrix3* IDVR.Tools.Matrix3.MultiplyMatices Matrix3 leftMatrix,
Matrix3 rightMatrix
[static]
 

This static funtion multiplies the specified 3x3 matrices.

An ordinary matrix multiplication will be used and the resultiin 3x3 matrix will be saved to a new created Matrix3 object.

Parameters:
leftMatrix the left sided matrix.
rightMatrix the right sided matrix.
Returns:
The resulting 3x3 matrix of the multiplication.

double void IDVR.Tools.Matrix3.setItem int  row,
int  column,
double  value
 

This function sets a specific matrix element by the specified value.

The matrix element which should be overwrited is specified by the specified parameter which are the row and column count.

Parameters:
row the row count of the specific element.
column the column count of the specific element.
value the new value of the specific element.
Exceptions:
Exception instance will be thrown if either the row or column count is not valid.

Matrix3* IDVR.Tools.Matrix3.transpose void   ) 
 

Returns the transpose matrix of the current matrix.

For the transpose matrix a new instance of the Matrix3 class will be created.

Returns:
The transposed matrix as a newly created Matrix3 object.


Member Data Documentation

double m_MatrixElements IDVR.Tools.Matrix3.__gc[,] [private]
 

The array of the necessary matrix elements.

All the needed nine matrix elements are saved in a double array.


The documentation for this class was generated from the following files:
Generated on Sat Apr 9 11:51:00 2005 for RayCaster wiht Importance Driven Volume Rendering (IDVR) by  doxygen 1.4.1