#include <Matrix3.h>
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 |
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. | |
Vector3 * | multiply_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. | |
Matrix3 * | transpose (void) |
Returns the transpose matrix of the current matrix. | |
Static Public Member Functions | |
static Matrix3 * | MultiplyMatices (Matrix3 *leftMatrix, Matrix3 *rightMatrix) |
This static funtion multiplies the specified 3x3 matrices. | |
static Matrix3 * | CreateIdentityMatrix (void) |
Creates an newly 3x3 identity matrix. | |
static Matrix3 * | CreateReducedMatrix (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. |
|
This is the standard constructor. This standard constructor initialized all matrix elements with zero. |
|
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.
|
|
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.
|
|
Calculates the determinant of the current matrix. For the calculation of the determinant the SARRUS rule will be used.
|
|
Creates an newly 3x3 identity matrix.
|
|
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.
|
|
Get all matrix elements as two dimensional double array.
|
|
This function returns the specific matrix element. This element is specified by the specified parameter which are the row and column count.
|
|
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.
|
|
Multiply the current matrix with a skalar value.
|
|
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.
|
|
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.
|
|
Returns the transpose matrix of the current matrix. For the transpose matrix a new instance of the Matrix3 class will be created.
|
|
The array of the necessary matrix elements. All the needed nine matrix elements are saved in a double array. |