Matrix-Vector (MTX) API Function List

General

MTXConcat Multiplies the a and b matrices and substitutes the result for ab.
MTXConcatArray Performs matrix concatenation for arrays.
MTXCopy Copies the contents of src into dst.
MTXIdentity Sets the m matrix to a unit matrix.
MTXInverse Generates the inverse of a 3x4 matrix at high speed.
MTXInvXpose Calculates the transpose of the inverse of a 3x4 matrix.
MTXMultVec Pre-multiplies matrix m by the 3D vector or point.
MTXMultVecSR Pre-multiplies the 3x3 submatrix by the 3D vector or point.
MTXMultVecArray Pre-multiplies an array of count 3D vectors by the matrix m.
MTXMultVecArraySR Pre-multiplies a 3x3 submatrix (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 into xPose.

Model

MTXQuat Sets a rotation matrix from a quaternion.
MTXReflect Reflects a rotation matrix with respect to a plane.
MTXRotAxisDeg Sets the matrix that will rotate around the axis having the (x,y,z) component specified by axis.
MTXRotAxisRad Sets the matrix that will rotate around the axis having the (x,y,z) component specified by axis.
MTXRotDeg Creates a rotation matrix about one of the major axes (X,Y,Z).
MTXRotRad Creates a rotation matrix about one of the major axes (X,Y,Z).
MTXRotTrig Creates a rotation matrix, specified using sin and cos, about one of the major axes (X,Y,Z).
MTXScale Sets the scaling matrix that consists 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 perform a translation consisting of the three 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 Generates a matrix that will transform items from world coordinate space to camera space.

Projection

MTXFrustum Sets the 4x4 perspective transform matrix based on the viewing volume dimension.
MTXOrtho Sets the 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 number of dimensions of the viewing volume, two scaling values, and two translation values.
MTXLightOrtho Sets the 3x4 matrix for orthographic projection.
MTXLightPerspective Sets the 3x4 perspective transform matrix based on the field-of-view, aspect ratio, two scaling values, and two translation values.

Stack

MTXAllocStack This macro allocates memory for MtxStack.
MTXFreeStack This macro deallocates memory that has been allocated to sPtr->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 MTXStack's stackBase pointer.
MTXPop Pops the top matrix from stackPtr, a member of sPtr (sPtr->stackPtr - MTX_PTR_OFFSET).
MTXPush Copies matrix m to available elements in the stack pointed to by sPtr.
MTXPushFwd This function generates forward-facing transform matrices in the stack.
MTXPushInv Calculates the inverse of matrix m, multiplies it with sPtr->stackPtr from the front, and pushes the result on the stack.
MTXPushInvXpose Generates a forward-facing composite transform matrix of an inverse transpose matrix on the stack.

Vector

VECAdd Finds the sum of two vectors.
VECCrossProduct Finds the cross product of two vectors.
VECDistance Finds the distance between two vectors (two points expressed by vectors).
VECDotProduct Finds the dot 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 Calculates the square of the magnitude of a vector.
VECSubtract Subtracts vector b from vector a, that is, (a - b), and places 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 Raises the quaternion q to a power using exp(q) and stores the resulting unit quaternion in r.
QUATInverse Computes the inverse of quaternion src and places the resultant quaternion in inv.
QUATLerp Performs linear interpolation on two quaternions.
QUATLogN Computes the natural logarithm of quaternion q and stores the resulting 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 the 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 the spherical linear interpolation (slerp) for 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 the PSMTXMultVecArray function.

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 dynamically allocated Mtx-type matrices.
Point3d,Point3dPtr This is a 3D point expressed in terms of x, y and z components.
Quaternion,QuaternionPtr This quaternion type consists of a vector component (x,y,z) and a scalar component (w).
ROMtx, ROMtxPtr This is the standard representation of a column of Mtx or MtxPtr.
Vec,VecPtr This is a 3-element vector expressed in terms of x, y and z components.

Mtx44 Extension



CONFIDENTIAL