1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="Author" content="Leona"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<TITLE>mtx</TITLE> 10</HEAD> 11<BODY> 12<H1>Matrix-Vector (MTX) API Function List</H1> 13 14<H2><A name="General">General</A></H2> 15<TABLE class="api_list" border="1" > 16 <TBODY> 17 <TR> 18<TH><A href="../mtx/general/MTXConcat.html">MTXConcat</A></TH> 19<TD>Multiplies the <SPAN class="argument">a</SPAN> and <SPAN class="argument">b</SPAN> matrices and substitutes the result for <SPAN class="argument">ab</SPAN>.</TD> 20 </TR> 21 <TR> 22<TH><A href="../mtx/general/MTXConcatArray.html">MTXConcatArray</A></TH> 23<TD>Performs matrix concatenation for arrays.</TD> 24 </TR> 25 <TR> 26<TH><A href="../mtx/general/MTXCopy.html">MTXCopy</A></TH> 27<TD>Copies the contents of <SPAN class="argument">src</SPAN> into <SPAN class="argument">dst</SPAN>.</TD> 28 </TR> 29 <TR> 30<TH><A href="../mtx/general/MTXIdentity.html">MTXIdentity</A></TH> 31<TD>Sets the <SPAN class="argument">m</SPAN> matrix to a unit matrix.</TD> 32 </TR> 33 <TR> 34<TH><A href="../mtx/general/MTXInverse.html">MTXInverse</A></TH> 35<TD>Generates the inverse of a 3x4 matrix at high speed.</TD> 36 </TR> 37 <TR> 38<TH><A href="../mtx/general/MTXInvXpose.html">MTXInvXpose</A></TH> 39<TD>Calculates the transpose of the inverse of a 3x4 matrix.</TD> 40 </TR> 41 <TR> 42<TH><A href="../mtx/general/MTXMultVec.html">MTXMultVec</A></TH> 43<TD>Pre-multiplies matrix <SPAN class="argument">m</SPAN> by the 3D vector or point.</TD> 44 </TR> 45 <TR> 46<TH><A href="../mtx/general/MTXMultVecSR.html">MTXMultVecSR</A></TH> 47<TD>Pre-multiplies the 3x3 submatrix by the 3D vector or point.</TD> 48 </TR> 49 <TR> 50<TH><A href="../mtx/general/MTXMultVecArray.html">MTXMultVecArray</A></TH> 51<TD>Pre-multiplies an array of <SPAN class="argument">count</SPAN> 3D vectors by the matrix <SPAN class="argument">m</SPAN>.<br></TD> 52 </TR> 53 <TR> 54<TH><A href="../mtx/general/MTXMultVecArraySR.html">MTXMultVecArraySR</A></TH> 55<TD>Pre-multiplies a 3x3 submatrix (the scaling and rotation component of <SPAN class="argument">m</SPAN>) by the number of 3D vectors given by <SPAN class="argument">count</SPAN>.</TD> 56 </TR> 57 <TR> 58<TH><A href="../mtx/general/MTXRowCol.html">MTXRowCol</A></TH> 59<TD>This macro provides safe access to the elements of <CODE>Mtx</CODE>- and <CODE>Mtx44</CODE>-type matrices.</TD> 60 </TR> 61 <TR> 62<TH><A href="../mtx/general/MTXTranspose.html">MTXTranspose</A></TH> 63<TD>Copies the transpose of <SPAN class="argument">src</SPAN> into <SPAN class="argument">xPose</SPAN>.</TD> 64 </TR> 65 </TBODY> 66</TABLE> 67 68<H2><A name="Model">Model</A></H2> 69<TABLE class="api_list" border="1" > 70 <TBODY> 71 <TR> 72<TH><A href="../mtx/model/MTXQuat.html">MTXQuat</A></TH> 73<TD>Sets a rotation matrix from a quaternion.</TD> 74 </TR> 75 <TR> 76<TH><A href="../mtx/model/MTXReflect.html">MTXReflect</A></TH> 77<TD>Reflects a rotation matrix with respect to a plane.</TD> 78 </TR> 79 <TR> 80<TH><A href="../mtx/model/MTXRotAxisDeg.html">MTXRotAxisDeg</A></TH> 81<TD>Sets the matrix that will rotate around the axis having the <CODE>(x,y,z)</CODE> component specified by <SPAN class="argument">axis</SPAN>.</TD> 82 </TR> 83 <TR> 84<TH><A href="../mtx/model/MTXRotAxisRad.html">MTXRotAxisRad</A></TH> 85<TD>Sets the matrix that will rotate around the axis having the <CODE>(x,y,z)</CODE> component specified by <SPAN class="argument">axis</SPAN>.</TD> 86 </TR> 87 <TR> 88<TH><A href="../mtx/model/MTXRotDeg.html">MTXRotDeg</A></TH> 89<TD>Creates a rotation matrix about one of the major axes <CODE>(X,Y,Z)</CODE>.</TD> 90 </TR> 91 <TR> 92<TH><A href="../mtx/model/MTXRotRad.html">MTXRotRad</A></TH> 93<TD>Creates a rotation matrix about one of the major axes <CODE>(X,Y,Z)</CODE>.</TD> 94 </TR> 95 <TR> 96<TH><A href="../mtx/model/MTXRotTrig.html">MTXRotTrig</A></TH> 97<TD>Creates a rotation matrix, specified using sin and cos, about one of the major axes <CODE>(X,Y,Z)</CODE>.</TD> 98 </TR> 99 <TR> 100<TH><A href="../mtx/model/MTXScale.html">MTXScale</A></TH> 101<TD>Sets the scaling matrix that consists of the three scaling parameters <CODE>(x,y,z)</CODE>.</TD> 102 </TR> 103 <TR> 104<TH><A href="../mtx/model/MTXScaleApply.html">MTXScaleApply</A></TH> 105<TD>Applies the scaling transform specified by <CODE>(xS,yS,zS)</CODE> to <SPAN class="argument">src</SPAN> and stores the result in <SPAN class="argument">dst</SPAN>.</TD> 106 </TR> 107 <TR> 108<TH><A href="../mtx/model/MTXTrans.html">MTXTrans</A></TH> 109<TD>Sets the matrix that will perform a translation consisting of the three translation parameters <CODE>(x,y,z)</CODE>.</TD> 110 </TR> 111 <TR> 112<TH><A href="../mtx/model/MTXTransApply.html">MTXTransApply</A></TH> 113<TD>Applies the parallel translation specified by <CODE>(xT,yT,zT)</CODE> to <SPAN class="argument">src</SPAN> and stores the result in <SPAN class="argument">dst</SPAN>.</TD> 114 </TR> 115 </TBODY> 116</TABLE> 117 118<H2><A name="View">View</A></H2> 119<TABLE class="api_list" border="1" > 120 <TBODY> 121 <TR> 122<TH><A href="../mtx/view/MTXLookAt.html">MTXLookAt</A></TH> 123<TD>Generates a matrix that will transform items from world coordinate space to camera space.</TD> 124 </TR> 125 </TBODY> 126</TABLE> 127 128<H2><A name="Projection">Projection</A></H2> 129<TABLE class="api_list" border="1" > 130 <TBODY> 131 <TR> 132<TH><A href="../mtx/Projection/MTXFrustum.html">MTXFrustum</A></TH> 133<TD>Sets the 4x4 perspective transform matrix based on the viewing volume dimension.</TD> 134 </TR> 135 <TR> 136<TH><A href="../mtx/Projection/MTXOrtho.html">MTXOrtho</A></TH> 137<TD>Sets the 4x4 matrix for orthographic transformation.</TD> 138 </TR> 139 <TR> 140<TH><A href="../mtx/Projection/MTXPerspective.html">MTXPerspective</A></TH> 141<TD>Sets the 4x4 perspective transform matrix based on two parameters for field-of-view and aspect ratio.</TD> 142 </TR> 143 </TBODY> 144</TABLE> 145 146<H2><A name="Texture Projection">Texture Projection</A></H2> 147<TABLE class="api_list" border="1" > 148 <TBODY> 149 <TR> 150<TH><A href="../mtx/Texture_Projection/MTXLightFrustum.html">MTXLightFrustum</A></TH> 151<TD>Sets the 3x4 perspective transform matrix based on the number of dimensions of the viewing volume, two scaling values, and two translation values.</TD> 152 </TR> 153 <TR> 154<TH><A href="../mtx/Texture_Projection/MTXLightOrtho.html">MTXLightOrtho</A></TH> 155<TD>Sets the 3x4 matrix for orthographic projection.</TD> 156 </TR> 157 <TR> 158<TH><A href="../mtx/Texture_Projection/MTXLightPerspective.html">MTXLightPerspective</A></TH> 159<TD>Sets the 3x4 perspective transform matrix based on the field-of-view, aspect ratio, two scaling values, and two translation values.</TD> 160 </TR> 161 </TBODY> 162</TABLE> 163 164<H2><A name="Stack">Stack</A></H2> 165<TABLE class="api_list" border="1" > 166 <TBODY> 167 <TR> 168<TH><A href="../mtx/stack/MTXAllocStack.html">MTXAllocStack</A></TH> 169<TD>This macro allocates memory for <CODE>MtxStack</CODE>.</TD> 170 </TR> 171 <TR> 172<TH><A href="../mtx/stack/MTXFreeStack.html">MTXFreeStack</A></TH> 173<TD>This macro deallocates memory that has been allocated to <SPAN class="argument">sPtr</SPAN><CODE>->stackBase</CODE> by <CODE>MTXAllocStack</CODE>.</TD> 174 </TR> 175 <TR> 176<TH><A href="../mtx/stack/MTXGetStackPtr.html">MTXGetStackPtr</A></TH> 177<TD>Returns a pointer to the top matrix in the matrix stack pointed to by <SPAN class="argument">sPtr</SPAN><CODE>->stackPtr</CODE>.</TD> 178 </TR> 179 <TR> 180<TH><A href="../mtx/stack/MTXInitStack.html">MTXInitStack</A></TH> 181<TD>Initializes the other members of <CODE>MTXStack</CODE> after <CODE>MTXAllocStack</CODE> allocates memory for <CODE>MTXStack</CODE>'s <CODE>stackBase</CODE> pointer.</TD> 182 </TR> 183 <TR> 184<TH><A href="../mtx/stack/MTXPop.html">MTXPop</A></TH> 185<TD>Pops the top matrix from <CODE>stackPtr</CODE>, a member of <SPAN class="argument">sPtr</SPAN> (<SPAN class="argument">sPtr</SPAN><CODE>->stackPtr</CODE> - <CODE>MTX_PTR_OFFSET</CODE>).</TD> 186 </TR> 187 <TR> 188<TH><A href="../mtx/stack/MTXPush.html">MTXPush</A></TH> 189<TD>Copies matrix <SPAN class="argument">m</SPAN> to available elements in the stack pointed to by <SPAN class="argument">sPtr</SPAN>.</TD> 190 </TR> 191 <TR> 192<TH><A href="../mtx/stack/MTXPushFwd.html">MTXPushFwd</A></TH> 193<TD>This function generates forward-facing transform matrices in the stack.</TD> 194 </TR> 195 <TR> 196<TH><A href="../mtx/stack/MTXPushInv.html">MTXPushInv</A></TH> 197<TD>Calculates the inverse of matrix <SPAN class="argument">m</SPAN>, multiplies it with <SPAN class="argument">sPtr</SPAN><CODE>->stackPtr</CODE> from the front, and pushes the result on the stack.</TD> 198 </TR> 199 <TR> 200<TH><A href="../mtx/stack/MTXPushInvXpose.html">MTXPushInvXpose</A></TH> 201<TD>Generates a forward-facing composite transform matrix of an inverse transpose matrix on the stack.</TD> 202 </TR> 203 </TBODY> 204</TABLE> 205 206<H2><A name="Vector">Vector</A></H2> 207<TABLE class="api_list" border="1" > 208 <TBODY> 209 <TR> 210<TH><A href="../mtx/vector/VECAdd.html">VECAdd</A></TH> 211<TD>Finds the sum of two vectors.</TD> 212 </TR> 213 <TR> 214<TH><A href="../mtx/vector/VECCrossProduct.html">VECCrossProduct</A></TH> 215<TD>Finds the cross product of two vectors.</TD> 216 </TR> 217 <TR> 218<TH><A href="../mtx/vector/VECDistance.html">VECDistance</A></TH> 219<TD>Finds the distance between two vectors (two points expressed by vectors).</TD> 220 </TR> 221 <TR> 222<TH><A href="../mtx/vector/VECDotProduct.html">VECDotProduct</A></TH> 223<TD>Finds the dot product of two vectors.</TD> 224 </TR> 225 <TR> 226<TH><A href="../mtx/vector/VECHalfAngle.html">VECHalfAngle</A></TH> 227<TD>Finds the halfway vector between two vectors.</TD> 228 </TR> 229 <TR> 230<TH><A href="../mtx/vector/VECMag.html">VECMag</A></TH> 231<TD>Finds the length of the given vector.</TD> 232 </TR> 233 <TR> 234<TH><A href="../mtx/vector/VECNormalize.html">VECNormalize</A></TH> 235<TD>Normalizes <SPAN class="argument">src</SPAN> and stores it in <SPAN class="argument">unit</SPAN>.</TD> 236 </TR> 237 <TR> 238<TH><A href="../mtx/vector/VECReflect.html">VECReflect</A></TH> 239<TD>Reflects an incident vector versus a normal such that the angle of incidence equals the angle of reflection.</TD> 240 </TR> 241 <TR> 242<TH><A href="../mtx/vector/VECScale.html">VECScale</A></TH> 243<TD>Multiplies a vector by a scalar.</TD> 244 </TR> 245 <TR> 246<TH><A href="../mtx/vector/VECSquareDistance.html">VECSquareDistance</A></TH> 247<TD>Returns the square of the distance between vectors <SPAN class="argument">a</SPAN> and <SPAN class="argument">b</SPAN>.</TD> 248 </TR> 249 <TR> 250<TH><A href="../mtx/vector/VECSquareMag.html">VECSquareMag</A></TH> 251<TD>Calculates the square of the magnitude of a vector.</TD> 252 </TR> 253 <TR> 254<TH><A href="../mtx/vector/VECSubtract.html">VECSubtract</A></TH> 255<TD>Subtracts vector <SPAN class="argument">b</SPAN> from vector <SPAN class="argument">a</SPAN>, that is, (<SPAN class="argument">a</SPAN> - <SPAN class="argument">b</SPAN>), and places the result in <SPAN class="argument">a_b</SPAN>.</TD> 256 </TR> 257 </TBODY> 258</TABLE> 259 260<H2><A name="Quaternion">Quaternion</A></H2> 261<TABLE class="api_list" border="1" > 262 <TBODY> 263 <TR> 264<TH><A href="../mtx/Quaternion/QUATAdd.html">QUATAdd</A></TH> 265<TD>Adds two quaternions (<SPAN class="argument">p</SPAN> + <SPAN class="argument">q</SPAN>) and places the result in <SPAN class="argument">r</SPAN>.</TD> 266 </TR> 267 <TR> 268<TH><A href="../mtx/Quaternion/QUATDivide.html">QUATDivide</A></TH> 269<TD>Divides quaternion <SPAN class="argument">p</SPAN> by another quaternion <SPAN class="argument">q</SPAN> and stores the result in <SPAN class="argument">r</SPAN>.</TD> 270 </TR> 271 <TR> 272<TH><A href="../mtx/Quaternion/QUATDotProduct.html">QUATDotProduct</A></TH> 273<TD>Computes the dot product of two given quaternions.</TD> 274 </TR> 275 <TR> 276<TH><A href="../mtx/Quaternion/QUATExp.html">QUATExp</A></TH> 277<TD>Raises the quaternion <SPAN class="argument">q</SPAN> to a power using <CODE>exp</CODE>(<SPAN class="argument">q</SPAN>) and stores the resulting unit quaternion in <SPAN class="argument">r</SPAN>.</TD> 278 </TR> 279 <TR> 280<TH><A href="../mtx/Quaternion/QUATInverse.html">QUATInverse</A></TH> 281<TD>Computes the inverse of quaternion <SPAN class="argument">src</SPAN> and places the resultant quaternion in <SPAN class="argument">inv</SPAN>.</TD> 282 </TR> 283 <TR> 284<TH><A href="../mtx/Quaternion/QUATLerp.html">QUATLerp</A></TH> 285<TD>Performs linear interpolation on two quaternions.</TD> 286 </TR> 287 <TR> 288<TH><A href="../mtx/Quaternion/QUATLogN.html">QUATLogN</A></TH> 289<TD>Computes the natural logarithm of quaternion <SPAN class="argument">q</SPAN> and stores the resulting quaternion in <SPAN class="argument">r</SPAN>.</TD> 290 </TR> 291 <TR> 292<TH><A href="../mtx/Quaternion/QUATMtx.html">QUATMtx</A></TH> 293<TD>Converts a model rotation matrix to a unit quaternion.</TD> 294 </TR> 295 <TR> 296<TH><A href="../mtx/Quaternion/QUATMultiply.html">QUATMultiply</A></TH> 297<TD>Multiplies two quaternions (<SPAN class="argument">p</SPAN> x <SPAN class="argument">q</SPAN>) and stores the result in <SPAN class="argument">pq</SPAN>.</TD> 298 </TR> 299 <TR> 300<TH><A href="../mtx/Quaternion/QUATNormalize.html">QUATNormalize</A></TH> 301<TD>Normalizes a quaternion <SPAN class="argument">src</SPAN> and places the resultant unit quaternion in <SPAN class="argument">unit</SPAN>.</TD> 302 </TR> 303 <TR> 304<TH><A href="../mtx/Quaternion/QUATRotAxisRad.html">QUATRotAxisRad</A></TH> 305<TD>Sets a quaternion for rotation about an arbitrary axis whose <CODE>(x,y,z)</CODE> components are specified by <SPAN class="argument">axis</SPAN>.</TD> 306 </TR> 307 <TR> 308<TH><A href="../mtx/Quaternion/QUATScale.html">QUATScale</A></TH> 309<TD>Multiplies a quaternion by a scalar value.</TD> 310 </TR> 311 <TR> 312<TH><A href="../mtx/Quaternion/QUATSlerp.html">QUATSlerp</A></TH> 313<TD>Computes the spherical linear interpolation (slerp) for two quaternions.</TD> 314 </TR> 315 <TR> 316<TH><A href="../mtx/Quaternion/QUATSquad.html">QUATSquad</A></TH> 317<TD>Performs spherical 3D (squad) interpolation on two quaternions.</TD> 318 </TR> 319 <TR> 320<TH><A href="../mtx/Quaternion/QUATSubtract.html">QUATSubtract</A></TH> 321<TD>Subtracts two quaternions (<SPAN class="argument">p</SPAN> - <SPAN class="argument">q</SPAN>) and places the result in <SPAN class="argument">r</SPAN>.</TD> 322 </TR> 323 </TBODY> 324</TABLE> 325 326<H2><A name="Pairedsingles">Special Paired Single Operations</A></H2> 327<TABLE class="api_list" border="1" > 328 <TBODY> 329 <TR> 330<TH><A href="../mtx/Paired_Singles/PSMTXReorder.html">PSMTXReorder</A></TH> 331<TD>Converts a matrix from row-major to column-major format.</TD> 332 </TR> 333 <TR> 334<TH><A href="../mtx/Paired_Singles/PSMTXROMultVecArray.html">PSMTXROMultVecArray</A></TH> 335<TD>This is the column-major matrix version of the <CODE>PSMTXMultVecArray</CODE> function.</TD> 336 </TR> 337 </TBODY> 338</TABLE> 339 340<H2><A name="Unit Conversion">Unit Conversion</A></H2> 341<TABLE class="api_list" border="1" > 342 <TBODY> 343 <TR> 344<TH><A href="../mtx/Unit_Conversion/MTXDegToRad.html">MTXDegToRad</A></TH> 345<TD>Macro to convert degrees to radians.</TD> 346 </TR> 347 <TR> 348<TH><A href="../mtx/Unit_Conversion/MTXRadToDeg.html">MTXRadToDeg</A></TH> 349<TD>Macro to convert radians to degrees.</TD> 350 </TR> 351 </TBODY> 352</TABLE> 353 354<H2><A name="Structures">Structures</A></H2> 355<TABLE class="api_list" border="1" > 356 <TBODY> 357 <TR> 358<TH><A href="../mtx/structures/Mtx_MtxPtr.html">Mtx,MtxPtr</A></TH> 359<TD>This structure represents a 3x4 2D matrix consisting of 12 floating-point values.</TD> 360 </TR> 361 <TR> 362<TH><A href="../mtx/structures/Mtx44_Mtx44Ptr.html">Mtx44,Mtx44Ptr</A></TH> 363<TD>This structure represents a 4x4 2D matrix consisting of 16 floating-point values.</TD> 364 </TR> 365 <TR> 366<TH><A href="../mtx/structures/MtxStack_MtxStackPtr.html">MtxStack,MtxStackPtr</A></TH> 367<TD>This represents an array of dynamically allocated <CODE>Mtx</CODE>-type matrices.</TD> 368 </TR> 369 <TR> 370<TH><A href="../mtx/structures/Point3d_Point3dPtr.html">Point3d,Point3dPtr</A></TH> 371<TD>This is a 3D point expressed in terms of x, y and z components.</TD> 372 </TR> 373 <TR> 374<TH><A href="../mtx/structures/Quaternion_QuaternionPtr.html">Quaternion,QuaternionPtr</A></TH> 375<TD>This quaternion type consists of a vector component <CODE>(x,y,z)</CODE> and a scalar component <CODE>(w)</CODE>.</TD> 376 </TR> 377 <TR> 378<TH><A href="../mtx/structures/ROMtx_ROMtxPtr.html">ROMtx, ROMtxPtr</A></TH> 379<TD>This is the standard representation of a column of <CODE>Mtx</CODE> or <CODE>MtxPtr</CODE>.</TD> 380 </TR> 381 <TR> 382<TH><A href="../mtx/structures/Vec_VecPtr.html">Vec,VecPtr</A></TH> 383<TD>This is a 3-element vector expressed in terms of x, y and z components.</TD> 384 </TR> 385 </TBODY> 386</TABLE> 387 388<H3><A name="Mtx44 Extension" href="../mtx/Mtx44ext.html">Mtx44 Extension</A></H3> 389<P><CODE><BR></CODE></P> 390 391<hr><p>CONFIDENTIAL</p></body> 392</HTML>