Matrix33

Description: Pure 3x3 matrix

Source file: …\genesis3d\OpenSource\Source\Physics\Matrix33.h

Content:

Functions: Add, Copy, ExtractFromXForm3d, GetTranspose, GetInverse, MakeCrossProductMatrix33, Multiply, MultiplyScalar, MultiplyVec3d, SetIdentity, Subtract

Types: Matrix33

Additions to Genesis3D v1.6: types float converted to geFloat

Types:

Matrix33;

// A 3x3 Matrix.

typedef struct{
     float      x[3][3];
} Matrix33;

Return to Contents

Functions:

 void Matrix33_Add(const Matrix33* m1, const Matrix33* m2, Matrix33* res);

This function adds matrix m1 to matrix m2 returning the result in res.
Returns: nothing.
Return to Contents

void Matrix33_Copy(const Matrix33* m, Matrix33* c);

This function returns a copy of matrix m in c.
Returns: nothing.
Return to Contents

void Matrix33_ExtractFromXForm3d(const geXForm3d* xform, Matrix33* m);

This function extracts the upper left 3x3 sections of the geXForm3d xform and copies it to m.  I guess this would represent the non-translational transformation.
Returns: nothing.
Return to Contents

void Matrix33_GetTranspose(const Matrix33* m, Matrix33* t);

This function transposes matrix m returning the result in t.
Returns: nothing.
Return to Contents

void Matrix33_GetInverse(const Matrix33* m, Matrix33* inv);

This function inverts matrix m returning the result in t.
Returns:nothing.
Return to Contents

void Matrix33_MakeCrossProductMatrix33(const geVec3d* v, Matrix33* m);

This function can be used to create a matrix from a vector to help calculate the cross product of two vectors.  As an example, if you wanted the cross product of the vectors A and B (A x B), this could be calculated as Matrix33_MakeCrossProductMatrix33(A,temp); Matrix33_MultiplyVec3d(temp, B, result) where result is the result.
Returns: nothing.
Return to Contents

void Matrix33_Multiply(const Matrix33* m1, const Matrix33* m2, Matrix33* res);

This function multiplies matrices m1 and m2 returning the result in res.
Returns: nothing.
Return to Contents

void Matrix33_MultiplyScalar(float s, const Matrix33* m, Matrix33* res);

This function multiplies the matrix m by the scalar float s returning the result in res.
Returns: nothing.
Return to Contents

void Matrix33_MultiplyVec3d(const Matrix33* m, const geVec3d* v, geVec3d* res);

This function multiplies the matrix m by the geVec3d v returning the resulting geVec3d in res.
Returns: nothing.
Return to Contents

void Matrix33_SetIdentity(Matrix33* m);

This function sets the matrix m to the identity matrix.
Returns: nothing.
Return to Contents

void Matrix33_Subtract(const Matrix33* m1, const Matrix33* m2, Matrix33* res);

This function subtracts matrix m2 from matrix m1 returning the result in res.
Returns: nothing.
Return to Contents