fastest 3D software for linux

Linux 3D
interactive ray-tracing

Index

 E3d_Matrix4x4Print
 E3d_Matrix3x3Print
 E3d_MatrixToQuaternion
 E3d_QuaternionToMatrix
 E3d_AxisAngleToMatrix
 E3d_Matrix3x3Determinant
 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_MatrixRotate2D_rad
 E3d_MatrixRotate_deg
 E3d_MatrixRotate_rad
 E3d_MatrixToEuler


E3d_Matrix4x4Print

Print a Matrix's contents

Syntax
void E3d_Matrix4x4Print(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.

E3d_Matrix3x3Print

Print a Matrix's contents

Syntax
void E3d_Matrix3x3Print(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.

E3d_MatrixToQuaternion

Convert a rotation Matrix into a quaternion

Syntax
void E3d_MatrixToQuaternion(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
E3d_QuaternionToMatrix()

E3d_QuaternionToMatrix

Convert a Quaternion into a rotation Matrix

Syntax
void E3d_QuaternionToMatrix(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
E3d_MatrixToQuaternion()

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
E3d_MatrixToQuaternion()

E3d_Matrix3x3Determinant

Compute the determinant of a 3x3 Matrix

Syntax
E3dCoordinate E3d_Matrix3x3Determinant(const E3dMatrix PSrc)

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

Return value
None.

E3d_Matrix3x3Transpose

Transpose a 3x3 Matrix

Syntax
void E3d_Matrix3x3Transpose(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.

E3d_Matrix4x4Transpose

Transpose a 4x4 Matrix

Syntax
void E3d_Matrix4x4Transpose(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.

E3d_Matrix3x3Invert

Invert a 3x3 Matrix

Syntax
void E3d_Matrix3x3Invert(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.

E3d_Matrix3x4Adjoint

Compute adjoint of a 3x4 Matrix

Syntax
void E3d_Matrix3x4Adjoint(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
E3d_Matrix3x4Invert()

E3d_Matrix3x4Invert

Invert a 3x4 Matrix

Syntax
void E3d_Matrix3x4Invert(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.

E3d_Matrix4x4Mult

Pre-multiply PSrcMtx with PDstMatrix

Syntax
void E3d_Matrix4x4Mult(const E3dMatrix PSrcMtx, E3dMatrix PDstMatrix)

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

Return value
None.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslate

E3d_Matrix3x3Mult3

Post-multiply a 3x3 PMatrix1 with PMatrix2

Syntax
void E3d_Matrix3x3Mult3(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
E3d_Matrix4x4Mult Pre-multiplies PMatrix1 with PMatrix2 and stores the result in PDstMatrix.

Return value
None.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslate

E3d_Matrix4x4Mult3

Post-multiply a 4x4 PMatrix1 with PMatrix2

Syntax
void E3d_Matrix4x4Mult3(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
E3d_Matrix4x4Mult Pre-multiplies PMatrix1 with PMatrix2 and stores the result in PDstMatrix.

Return value
None.

See also
E3d_MatrixLoadIdentity, E3d_MatrixScale, E3d_MatrixRotate, E3d_MatrixRotateSinCos, E3d_MatrixTranslate

E3d_MatricesEqual

Compare Matrices

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

Arguments
const E3dMatrix LMtx1 Pointer to matrix-1 const 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 PDstMatrix)

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

Return value
None.

See also
E3d_MatricesEqual

E3d_MatrixTranslate

"Translate" a Matrix

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

Arguments
E3dMatrix PMatrix The Matrix to transform 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 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
E3d_MatrixScale performs a standard "scale" operation on the given Matrix.

Return value
None.

See also
E3d_MatrixTranslate, E3d_MatrixRotate, E3d_MatrixRotateSinCos

E3d_MatrixRotate2D_rad

"Rotate" a Matrix in 2D

Syntax
void E3d_MatrixRotate2D_rad(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
E3d_MatrixRotate_deg, E3d_MatrixRotate_rad, E3d_MatrixRotateSinCos, E3d_MatrixRotateXYZ, E3d_Matrix4x4RotateAxisAngle

E3d_MatrixRotate_deg

"Rotate" a Matrix

Syntax
void E3d_MatrixRotate_deg(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
E3d_MatrixScale, E3d_MatrixTranslate, E3d_MatrixRotateSinCos

E3d_MatrixRotate_rad

"Rotate" a Matrix

Syntax
void E3d_MatrixRotate_rad(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
E3d_MatrixScale, E3d_MatrixTranslate, E3d_MatrixRotateSinCos

E3d_MatrixToEuler

Matrix to Euler angles

Syntax
void E3d_MatrixToEuler(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