fastest 3D software for linux

Linux 3D
interactive ray-tracing

Index

 E3dMatrix_Print4x4
 E3dMatrix_Print3x3
 E3dMatrix_ToQuaternion
 E3dQuaternion_ToMatrix
 E3d_AxisAngleToMatrix
 E3dMatrix_Determinant3x3
 E3dMatrix_Transpose3x3
 E3dMatrix_Transpose4x4
 E3dMatrix_Invert3x3
 E3dMatrix_Adjoint3x4
 E3dMatrix_Invert3x4
 E3dMatrix_Mult4x4
 E3dMatrix_Mult3x3_3
 E3dMatrix_Mult4x4_3
 E3dMatrix_Equal
 E3dMatrix_LoadIdentity
 E3dMatrix_Translate
 E3dMatrix_Scale
 E3dMatrix_Rotate2DRad
 E3dMatrix_RotateDeg
 E3dMatrix_RotateRad
 E3dMatrix_ToEuler


E3dMatrix_Print4x4

Print a Matrix's contents

Syntax
void E3dMatrix_Print4x4(const E3dMatrix PMatrix)

Argument
const E3dMatrix PMatrix The Matrix to dump out
Description
Prints the contents of the given Matrix to the standard output in column-major order.

Return value
None.

E3dMatrix_Print3x3

Print a Matrix's contents

Syntax
void E3dMatrix_Print3x3(const E3dMatrix PMatrix)

Argument
const E3dMatrix PMatrix The Matrix to dump out
Description
Prints the contents of the given Matrix to the standard output in column-major order.

Return value
None.

E3dMatrix_ToQuaternion

Convert a rotation Matrix into a quaternion

Syntax
void E3dMatrix_ToQuaternion(const E3dMatrix PMatrix, E3dCoord4* PQuaternion)

Arguments
const E3dMatrix PMatrix The source Matrix E3dCoord4* PQuaternion 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
E3dQuaternion_ToMatrix()

E3dQuaternion_ToMatrix

Convert a Quaternion into a rotation Matrix

Syntax
void E3dQuaternion_ToMatrix(const E3dCoord4* PQ, E3dMatrix PMatrix)

Arguments
const E3dCoord4* PQ The source Quaternion E3dMatrix PMatrix 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
E3dMatrix_ToQuaternion()

E3d_AxisAngleToMatrix

Convert an axis-angle rotation to a rotation Matrix

Syntax
void E3d_AxisAngleToMatrix(const E3dCoord4* PAA, E3dMatrix PMatrix)

Arguments
const E3dCoord4* PAA The axis-angle rotation as a Coord4 E3dMatrix PMatrix The destination Matrix
Description
Converts an axis-angle rotation to 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
   W:        Angle as degrees


Return value
None.

See also
E3dMatrix_ToQuaternion()

E3dMatrix_Determinant3x3

Compute the determinant of a 3x3 Matrix

Syntax
E3dCoordinate E3dMatrix_Determinant3x3(const E3dMatrix PSrc)

Arguments
PMatrix The Matrix
Description
Computes the determinant of the given 3x3 Matrix.

Return value
None.

E3dMatrix_Transpose3x3

Transpose a 3x3 Matrix

Syntax
void E3dMatrix_Transpose3x3(const E3dMatrix PSrc, E3dMatrix PDst)

Arguments
const E3dMatrix PSrc The Matrix to transpose E3dMatrix PDst 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.

E3dMatrix_Transpose4x4

Transpose a 4x4 Matrix

Syntax
void E3dMatrix_Transpose4x4(const E3dMatrix PSrc, E3dMatrix PDst)

Arguments
const E3dMatrix PSrc The Matrix to transpose E3dMatrix PDst 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.

E3dMatrix_Invert3x3

Invert a 3x3 Matrix

Syntax
void E3dMatrix_Invert3x3(const E3dMatrix PSrc, E3dMatrix PDst)

Arguments
const E3dMatrix PSrc The Matrix to invert E3dMatrix PDst 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.

E3dMatrix_Adjoint3x4

Compute adjoint of a 3x4 Matrix

Syntax
void E3dMatrix_Adjoint3x4(const E3dMatrix PSrc, E3dMatrix PDst)

Arguments
const E3dMatrix PSrc The Matrix for which the adjoint is to be computed E3dMatrix PDst 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 represents a "rigid" transformation (no scale or shear), using the adjoint instead of the inverse is recommended, because it is faster to compute and more accurate.

Return value
None.

See also
E3dMatrix_Invert3x4()

E3dMatrix_Invert3x4

Invert a 3x4 Matrix

Syntax
void E3dMatrix_Invert3x4(const E3dMatrix PSrc, E3dMatrix PDst)

Arguments
const E3dMatrix PSrc The Matrix to invert E3dMatrix PDst The Matrix for the result
Description
Computes the inverse of a 3x4 Matrix..

Return value
None.

E3dMatrix_Mult4x4

Pre-multiply PSrcMtx with PDstMatrix

Syntax
void E3dMatrix_Mult4x4(const E3dMatrix PSrcMtx, E3dMatrix PDstMatrix)

Arguments
const E3dMatrix PSrcMtx Pointer to the source Matrix E3dMatrix PDstMatrix Pointer to the destination Matrix
Description
E3dMatrix_Mult4x4 Pre-multiplies PSrcMtx with PDstMatrix and stores the result in PDstMatrix.

Return value
None.

See also
E3dMatrix_LoadIdentity, E3dMatrix_Scale, E3d_MatrixRotate, E3dMatrix_RotateSinCos, E3dMatrix_Translate

E3dMatrix_Mult3x3_3

Post-multiply a 3x3 PMatrix1 with PMatrix2

Syntax
void E3dMatrix_Mult3x3_3(const E3dMatrix PMatrix1, const E3dMatrix PMatrix2, E3dMatrix PDstMatrix)

Arguments
const E3dMatrix PMatrix1 Pointer to source Matrix-1 const E3dMatrix PMatrix2 Pointer to source Matrix-2 E3dMatrix PDstMatrix Pointer to the destination Matrix
Description
E3dMatrix_Mult4x4 Pre-multiplies PMatrix1 with PMatrix2 and stores the result in PDstMatrix.

Return value
None.

See also
E3dMatrix_LoadIdentity, E3dMatrix_Scale, E3d_MatrixRotate, E3dMatrix_RotateSinCos, E3dMatrix_Translate

E3dMatrix_Mult4x4_3

Post-multiply a 4x4 PMatrix1 with PMatrix2

Syntax
void E3dMatrix_Mult4x4_3(const E3dMatrix PMatrix1, const E3dMatrix PMatrix2, E3dMatrix PDstMatrix)

Arguments
const E3dMatrix PMatrix1 Pointer to source Matrix-1 const E3dMatrix PMatrix2 Pointer to source Matrix-2 E3dMatrix PDstMatrix Pointer to the destination Matrix
Description
E3dMatrix_Mult4x4 Pre-multiplies PMatrix1 with PMatrix2 and stores the result in PDstMatrix.

Return value
None.

See also
E3dMatrix_LoadIdentity, E3dMatrix_Scale, E3d_MatrixRotate, E3dMatrix_RotateSinCos, E3dMatrix_Translate

E3dMatrix_Equal

Compare Matrices

Syntax
EBool E3dMatrix_Equal(const E3dMatrix LMtx1, const E3dMatrix LMtx2)

Arguments
const E3dMatrix LMtx1 Pointer to matrix-1 const E3dMatrix LMtx2 Pointer to matrix-2
Description
E3dMatrix_Equal compares LMtx1 with LMtx2 and returns TRUE if they are equal.

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

See also
E3dMatrix_LoadIdentity, E3dMatrix_Scale, E3d_MatrixRotate, E3dMatrix_RotateSinCos, E3d_MatrixTranslat

E3dMatrix_LoadIdentity

Make a matrix an identity Matrix

Syntax
void E3dMatrix_LoadIdentity(E3dMatrix PDstMatrix)

Argument
E3dMatrix PDstMatrix Pointer to the Matrix
Description
E3dMatrix_LoadIdentity makes PDstMatrix an identity Matrix.

Return value
None.

See also
E3dMatrix_Equal

E3dMatrix_Translate

"Translate" a Matrix

Syntax
void E3dMatrix_Translate(E3dMatrix PMatrix, const E3dCoordinate PX, const E3dCoordinate PY, const E3dCoordinate PZ)

Arguments
E3dMatrix PMatrix The Matrix to transform LX, LY, LZ Translation coordinates
Description
E3dMatrix_Translate performs a standard "translate" operation on the given Matrix.

Return value
None.

See also
E3dMatrix_Scale, E3d_MatrixRotate, E3dMatrix_RotateSinCos

E3dMatrix_Scale

"Scale" a Matrix

Syntax
void E3dMatrix_Scale(E3dMatrix PMatrix, const E3dCoordinate PScaleX, const E3dCoordinate PScaleY, const E3dCoordinate PScaleZ)

Arguments
E3dMatrix PMatrix The Matrix to transform const E3dCoordinate PScaleX, PScaleY, PScaleZ Scaling values
Description
E3dMatrix_Scale performs a standard "scale" operation on the given Matrix.

Return value
None.

See also
E3dMatrix_Translate, E3d_MatrixRotate, E3dMatrix_RotateSinCos

E3dMatrix_Rotate2DRad

"Rotate" a Matrix in 2D

Syntax
void E3dMatrix_Rotate2DRad(E3dMatrix PMatrix, const E3dCoordinate PAngle)

Arguments
E3dMatrix PMatrix The Matrix to transform const E3dCoordinate PAngle The the rotation angle in degrees
Description
E3d_MatrixRotate performs a standard "rotate" operation on the Matrix in 2 dimensions. The angle is given in radians, according to the right hand rule.

Return value
None.

See also
E3dMatrix_RotateDeg, E3dMatrix_RotateRad, E3dMatrix_RotateSinCos, E3dMatrix_RotateXYZ, E3dMatrix_RotateAxisAngle

E3dMatrix_RotateDeg

"Rotate" a Matrix

Syntax
void E3dMatrix_RotateDeg(E3dMatrix PMatrix, const int PAxis, const E3dCoordinate PAngle)

Arguments
E3dMatrix PMatrix The Matrix to transform const int PAxis The axis to rotate around const E3dCoordinate PAngle 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
E3dMatrix_Scale, E3dMatrix_Translate, E3dMatrix_RotateSinCos

E3dMatrix_RotateRad

"Rotate" a Matrix

Syntax
void E3dMatrix_RotateRad(E3dMatrix PMatrix, const int PAxis, const E3dCoordinate PAngle)

Arguments
E3dMatrix PMatrix The Matrix to transform const int PAxis The axis to rotate around const E3dCoordinate PAngle 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
E3dMatrix_Scale, E3dMatrix_Translate, E3dMatrix_RotateSinCos

E3dMatrix_ToEuler

Matrix to Euler angles

Syntax
void E3dMatrix_ToEuler(const E3dMatrix PMatrix, const char PRotOrder, E3dCoord3* PAngles)

Arguments
const E3dMatrix PMatrix The Matrix const char PRotOrder The requested rotation order, as an enum, such as E3dXYZ E3dCoord3* PAngles The 3 angles to be returned, in degrees
Description
Analyzes a Matrix and recovers a series of 3 euler rotations, in the specified order. There are an infinite number of euler rotations that could produce the same Matrix, and some precision is lost in this conversion, so only use this function, if you really need to.

Return value
None.
© 1992-2017 By Gabor Nagy