Index

 E3d_MatrixPrint
 E3d_PrintMatrix
 E3d_MatrixToQuaternion
 E3d_QuaternionToMatrix
 E3d_Matrix3x3Transpose
 E3d_Matrix4x4Transpose
 E3d_Matrix3x3Invert
 E3d_Matrix3x4Adjoint
 E3d_Matrix3x4Invert
 E3d_Matrix4x4Mult
 E3d_Matrix3x3Mult3
 E3d_Matrix4x4Mult3
 E3d_MatricesEqual
 E3d_MatrixLoadIdentity
 E3d_MatrixTranslate
 E3d_MatrixScale
 E3d_MatrixRotate


E3d_MatrixPrint

Print out a Matrix's contents

Syntax
 void E3d_MatrixPrint(E3dMatrix LMatrix)
Argument
 E3dMatrix LMatrix        The Matrix to dump out
Description
Prints the contents of the given matrix to the standard output in column-major order.

Return value
None.

E3d_PrintMatrix

Print out a Matrix's contents

Syntax
 void E3d_PrintMatrix(E3dMatrix LMatrix)
Argument
 E3dMatrix LMatrix        The Matrix to dump out
Description
Prints the contents of the given matrix to the standard output.

Return value
None.

E3d_MatrixToQuaternion

Convert a rotation Matrix into a quaternion

Syntax
 void E3d_MatrixToQuaternion(E3dMatrix LMatrix, E3dQuaternion* LQuaternion)
Arguments
 E3dMatrix      LMatrix        The source Matrix
 E3dQuaternion* LQuaternion    The rotation
Description
Converts the top 3x3 portion of a Matrix into a Quaternion. The Matrix should only contain rotation (no scaling or shear).
With the angle of rotation Angle, the Quaternion is of the following form:
   X, Y, Z:  coordinates of the axis of rotation multiplied by sin(Angle*0.5)
   W:        cos(Angle*0.5)


Return value
None.

See also
E3d_QuaternionToMatrix()

E3d_QuaternionToMatrix

Convert a Quaternion into a rotation Matrix

Syntax
 void E3d_QuaternionToMatrix(E3dQuaternion* LQ, E3dMatrix LMatrix)
Arguments
 E3dQuaternion* LQ             The source Quaternion
 E3dMatrix      LMatrix        The destination Matrix
Description
Converts a Quaternion into a 3x3 rotation Matrix.
With the angle of rotation Angle, the Quaternion is of the following form:
   X, Y, Z:  coordinates of the axis of rotation multiplied by sin(Angle*0.5)
   W:        cos(Angle*0.5)


Return value
None.

See also
E3d_MatrixToQuaternion()

E3d_Matrix3x3Transpose

Transpose a 3x3 Matrix

Syntax
 void E3d_Matrix3x3Transpose(E3dMatrix LM, E3dMatrix LMT)
Arguments
 E3dMatrix LM        The Matrix to transpose
 E3dMatrix LMT       The Matrix for the result
Description
Computes the transpose of a 3x3 Matrix. The transpose of a Matrix is obtained by mirroring the Matrix along the diagonal (flipping the rows and columns).

Return value
None.

E3d_Matrix4x4Transpose

Transpose a 4x4 Matrix

Syntax
 void E3d_Matrix4x4Transpose(E3dMatrix LM, E3dMatrix LMT)
Arguments
 E3dMatrix LM        The Matrix to transpose
 E3dMatrix LMT       The Matrix for the result
Description
Computes the transpose of a 4x4 Matrix. The transpose of a Matrix is obtained by mirroring the Matrix along the diagonal (flipping the rows and columns).

Return value
None.

E3d_Matrix3x3Invert

Invert a 3x3 Matrix

Syntax
 void E3d_Matrix3x3Invert(E3dMatrix LM, E3dMatrix LMI)
Arguments
 E3dMatrix LM        The Matrix to invert
 E3dMatrix LMI       The Matrix for the result
Description
Computes the inverse of a 3x3 Matrix. The inverse of a Matrix is a Matrix that, multiplied by the original one, yields an identity Matrix.

Return value
None.

E3d_Matrix3x4Adjoint

Compute adjoint of a 3x4 Matrix

Syntax
 void E3d_Matrix3x4Adjoint(E3dMatrix LM, E3dMatrix LMA)
Arguments
 E3dMatrix LM        The Matrix for which the adjoint is to be computed
 E3dMatrix LMA       The Matrix for the result
Description
Computes the adjoint of a 3x4 Matrix. The adjoint of a Matrix is a similar to the inverse, but without the division by the determinant.
If the Matrix is volume preserving, using the adjoint instead of the inverse is recommended, because it is faster to compute and more accurate.

Return value
None.

See also
E3d_Matrix3x4Invert()

E3d_Matrix3x4Invert

Invert a 3x4 Matrix

Syntax
 void E3d_Matrix3x4Invert(E3dMatrix LM, E3dMatrix LMI)
Arguments
 E3dMatrix LM        The Matrix to invert
 E3dMatrix LMI       The Matrix for the result
Description
Computes the inverse of a 3x4 Matrix. The inverse of a Matrix is a Matrix that, multiplied by the original one, yields an identity Matrix.

Return value
None.

E3d_Matrix4x4Mult

Pre-multiply LSrcMtx with LDestMtx

Syntax
 void E3d_Matrix4x4Mult(E3dMatrix LSrcMtx, E3dMatrix LDestMtx)
Arguments
 E3dMatrix LSrcMtx        Pointer to the source Matrix
 E3dMatrix LDestMtx       Pointer to the destination Matrix
Description
E3d_Matrix4x4Mult Pre-multiplies LSrcMtx with LDestMtx and stores the result in LDestMtx.

Return value
None.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslate

E3d_Matrix3x3Mult3

Post-multiply a 3x3 LMatrix1 with LMatrix2

Syntax
 void E3d_Matrix3x3Mult3(E3dMatrix LMatrix1, E3dMatrix LMatrix2, E3dMatrix LDestMtx)
Arguments
 E3dMatrix LMatrix1       Pointer to source Matrix-1
 E3dMatrix LMatrix2       Pointer to source Matrix-2
 E3dMatrix LDestMtx       Pointer to the destination Matrix
Description
E3d_Matrix4x4Mult Pre-multiplies LMatrix1 with LMatrix2 and stores the result in LDestMtx.

Return value
None.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslate

E3d_Matrix4x4Mult3

Post-multiply a 4x4 LMatrix1 with LMatrix2

Syntax
 void E3d_Matrix4x4Mult3(E3dMatrix LMatrix1, E3dMatrix LMatrix2, E3dMatrix LDestMtx)
Arguments
 E3dMatrix LMatrix1       Pointer to source Matrix-1
 E3dMatrix LMatrix2       Pointer to source Matrix-2
 E3dMatrix LDestMtx       Pointer to the destination Matrix
Description
E3d_Matrix4x4Mult Pre-multiplies LMatrix1 with LMatrix2 and stores the result in LDestMtx.

Return value
None.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslate

E3d_MatricesEqual

Compare Matrices

Syntax
 EBool E3d_MatricesEqual(E3dMatrix LMtx1, E3dMatrix LMtx2)
Arguments
 E3dMatrix LMtx1          Pointer to matrix-1
 E3dMatrix LMtx2          Pointer to matrix-2
Description
E3d_MatricesEqual compares LMtx1 with LMtx2 and returns TRUE if they are equal.

Return value
TRUE if LMtx1 and LMtx2 are equal, FALSE otherwise.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslat

E3d_MatrixLoadIdentity

Make a matrix an identity Matrix

Syntax
 void E3d_MatrixLoadIdentity(E3dMatrix LDestMtx)
Argument
 E3dMatrix LDestMtx       Pointer to the Matrix
Description
E3d_MatrixLoadIdentity makes LDestMtx an identity Matrix.

Return value
None.

See also
E3d_MatricesEqual

E3d_MatrixTranslate

"Translate" a Matrix

Syntax
 void E3d_MatrixTranslate(E3dMatrix LMatrix, double LX, double LY, double LZ)
Arguments
 E3dMatrix LMatrix              The Matrix to transform
 double    LX, LY, LZ           Translation coordinates
Description
E3d_MatrixTranslate performs a standard "translate" operation on the given Matrix.

Return value
None.

See also
E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos

E3d_MatrixScale

"Scale" a Matrix

Syntax
 void E3d_MatrixScale(E3dMatrix LMatrix, double LXScale, double LYScale, double LZScale)
Arguments
 E3dMatrix LMatrix                      The Matrix to transform
 double    LXScale, LYScale, LZScale    Scaling values
Description
E3d_MatrixScale performs a standard "scale" operation on the given Matrix.

Return value
None.

See also
E3d_MatrixTranslate, E3d_MatrixRotate, E3d_MatrixRotateSinCos

E3d_MatrixRotate

"Rotate" a Matrix

Syntax
 void E3d_MatrixRotate(E3dMatrix LMatrix, int LAxis, double LAngle)
Arguments
 E3dMatrix LMatrix        The Matrix to transform
 int       LAxis          The axis to rotate around
 double    LAngle         The the rotation angle in degrees
Description
E3d_MatrixRotate performs a standard "rotate" operation on the matrix around the given axis. The angle is given in degrees according to the right hand rule, the axis can be one of the 'x', 'y' or 'z' ASCII character values.

Return value
None.

See also
E3d_MatrixScale, E3d_MatrixTranslate, E3d_MatrixRotateSinCos