Matrix-Vector (MTX) Library API Function List

General

MTXConcat Multiplies matrices a and b and stores the result in ab.
MTXConcatArray Performs matrix concatenation for arrays.
MTXCopy Copies the contents of src into dst.
MTXIdentity Sets matrix m as an identity matrix.
MTXInverse Generates the inverse of a 3x4 matrix at high speed.
MTXInvXpose Calculates the transpose of the inverse of a 3x4 matrix.
MTXMultVec Post-multiplies matrix m by the 3D vector or point.
MTXMultVecSR Post-multiplies the 3x3 sub-matrix by the 3D vector or point.
MTXMultVecArray Post-multiplies matrix m by the number of 3D vectors given by count.
MTXMultVecArraySR Post-multiplies a 3x3 sub-matrix (the scaling and rotation component of m) by the number of 3D vectors given by count.
MTXRowCol This macro provides safe access to the elements of Mtx and Mtx44 type matrices.
MTXTranspose Copies the transpose of src to xPose.

Model

MTXQuat Sets a rotation matrix from a quaternion.
MTXReflect Reflects a rotation matrix with respect to a plane. 
MTXRotAxisDeg Sets the matrix to be rotated around the axis having the (x,y,z) component specified by axis.
MTXRotAxisRad, Sets the matrix to be rotated around the axis having the (x,y,z) component specified by axis.
MTXRotDeg Creates a rotation matrix about one of the major (X, Y, Z ) axes.
MTXRotRad, Creates a rotation matrix about one of the major (X, Y, Z ) axes.
MTXRotTrig Creates the matrix that will undergo the rotation specified by in and cos about one of the major (X, Y, Z ) axes.
MTXScale Sets the scaling matrix consisting of the three scaling parameters (x,y,z).
MTXScaleApply Applies the scaling transform specified by ( xS, yS, zS ) to src and stores the result in dst.
MTXTrans Sets the matrix that will undergo parallel translation consisting of the three parallel translation parameters (x,y,z).
MTXTransApply Applies the parallel translation specified by ( xT, yT, zT ) to src and stores the result in dst.

View

MTXLookAt Creates the matrix that will be converted from world coordinate space to camera space.

Projection

MTXFrustum Sets the 4x4 perspective transform matrix based on the viewing volume dimension.
MTXOrtho Sets teh 4x4 matrix for orthographic transformation.
MTXPerspective Sets the 4x4 perspective transform matrix based on two parameters for field-of-view and aspect ratio.

Texture Projection

MTXLightFrustum Sets the 3x4 perspective transform matrix based on the dimension number of the viewing volume, two scaling values, and a parallel translation value.
MTXLightOrtho Sets the 3x4 matrix for orthographic projection.
MTXLightPerspective Sets the 3x4 perspective transform matrix based on the field-of-view, two scaling values for aspectRatio, and two parallel translation values.

Stack

MTXAllocStack This macro allocates memory for MtxStack.
MTXFreeStack This macro frees memory that has been allocated to the Ptr->stackBase by MTXAllocStack.
MTXGetStackPtr Returns a pointer to the top matrix in the matrix stack pointed to by sPtr->stackPtr.
MTXInitStack Initializes the other members of MTXStack after MTXAllocStack allocates memory for the stackBase pointer for MTXStack.
MTXPop Pops the top matrix beginning from stackPtr, a member of sPtr (sPtr->stackPtr-MTX_PTR_OFFSET).
MTXPush Copies matrix m to available elements in the stack pointed by sPtr.
MTXPushFwd This function pushes transform matrices forward in the stack.
MTXPushInv Calculates the inverse of m, multiplies by sPtr->stackPtr from the front, and pushes the result on the stack.
MTXPushInvXpose Pushes a forward-facing composite transform matrix of an inverse transpose matrix.

Vector

VECAdd Finds the sum of two vectors.
VECCrossProduct Finds the outer product of two vectors.
VECDotProduct Finds the inner product of two vectors.
VECHalfAngle Finds the halfway vector between two vectors.
VECMag Finds the length of the given vector.
VECNormalize Normalizes src and stores it in unit.
VECReflect Reflects an incident vector versus a normal such that the angle of incidence equals the angle of reflection.
VECScale Multiplies a vector by a scalar.
VECSquareDistance Returns the square of the distance between vectors a and b.
VECSquareMag Returns the square of the magnitude of vector v.
VECSubtract Subtracts vector b from vector a (a-b) and stores the result in a_b.

Quaternion

QUATAdd Adds two quaternions ( p + q ) and places the result in r.
QUATDivide Divides quaternion p by another quaternion q and stores the result in r.
QUATDotProduct Computes the dot product of two given quaternions.
QUATExp Exponentiates quaternion q and stores the resulting quaternion in r.
QUATInverse Computes the inverse of quaternion src and place resultant quaternion in inv.
QUATLerp Performs linear interpolation on two quaternions.
QUATLogN Computes the natural logarithm of quaternion q and stores the resulting pure quaternion in r.
QUATMtx Converts a model rotation matrix to a unit quaternion.
QUATMultiply Multiplies two quaternions (p x q) and stores the result in pq.
QUATNormalize Normalizes a quaternion src and places resultant unit quaternion in unit.
QUATRotAxisRad Sets a quaternion for rotation about an arbitrary axis whose ( x, y, z ) components are specified by axis
QUATScale Multiplies a quaternion by a scalar value.
QUATSlerp Computes spherical linear interpolation (Slerp) of two quaternions.
QUATSquad Performs spherical 3D (Squad) interpolation on two quaternions.
QUATSubtract Subtracts two quaternions ( p - q ) and places the result in r.

Special Paired Single Operations

PSMTXReorder Converts a matrix from row-major to column-major format.
PSMTXROMultVecArray This is the column-major matrix version of PSMTXMultVecArray.

Unit Conversion

MTXDegToRad Macro to convert degrees to radians.
MTXRadToDeg Macro to convert radians to degrees.

Structures

Mtx,MtxPtr This structure represents a 3x4 2D matrix consisting of 12 floating-point values.
Mtx44,Mtx44Ptr This structure represents a 4x4 2D matrix consisting of 16 floating-point values.
MtxStack,MtxStackPtr This represents an array of automatically allocated Mtx type matrices.
Point3d,Point3dPtr This is a 3D point expressed in terms of x, y, z.
Quaternion,QuaternionPtr This quaternion type consists of three vector components (x, y, z) and one scalar component (w).
ROMtx, ROMtxPtr This is the standard representation of a column of Mtx or MtxPtr.
Vec,VecPtr This is a three-element vector expressed in terms of x, y, z.

Mtx44 Extension