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 http-equiv="Content-Style-Type" content="text/css"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<TITLE>Mtx44 Extension</TITLE> 9</HEAD> 10<BODY> 11<H1>Mtx44 Extension</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/mtx/mtx44ext.h> 16 17void MTX44Identity ( Mtx44 m ); 18void MTX44Copy ( const Mtx44 src, Mtx44 dst ); 19 20void MTX44Concat ( const Mtx44 a, const Mtx44 b, Mtx44 ab ); 21void MTX44Transpose ( const Mtx44 src, Mtx44 xPose ); 22void MTX44Inverse ( const Mtx44 src, Mtx44 inv ); 23 24void MTX44Trans ( Mtx44 m, f32 xT, f32 yT, f32 zT ); 25void MTX44TransApply ( const Mtx44 src, Mtx44 dst, f32 xT, f32 yT, f32 zT ); 26 27void MTX44Scale ( Mtx44 m, f32 xS, f32 yS, f32 zS ); 28void MTX44ScaleApply ( const Mtx44 src, Mtx44 dst, f32 xS, f32 yS, f32 zS ); 29 30void MTX44RotRad ( Mtx44 m, char axis, f32 rad ); 31void MTX44RotTrig ( Mtx44 m, char axis, f32 sinA, f32 cosA ); 32 33void MTX44RotAxisRad ( Mtx44 m, const Vec* axis, f32 rad ); 34 35void MTX44MultVec ( const Mtx44 m, const Vec* src, Vec* dst ); 36 37void MTX44MultVecArray ( const Mtx44 m, const Vec* srcBase, Vec* dstBase, u32 count ); 38void MTX44MultVecSR ( const Mtx44 m, const Vec* src, Vec* dst ); 39 40void MTX44MultVecArraySR ( const Mtx44 m, const Vec* srcBase, Vec* dstBase, u32 count ); 41</pre></dd></dl> 42 43<H2>Description</H2> 44<P>These are extended functions for true 4x4 matrix computations that you can access by placing the additional header file, <CODE>revolution/mtx/mtx44ext.h</CODE>, in an include statement. We have provided the 4x4 extension functions for special-purpose uses (such as real-time patch tessellation on the CPU). If you simply want to create a transform matrix for the Broadway graphics processor, we strongly recommend that you keep using the standard 3x4 matrix functions unless you have a special reason for using the 4x4 matrix functions. This recommendation is due to the fact that there is less processing overhead than with 4x4 matrix functions.</P> 45<P>As with standard MTX library functions, each of these extended functions has both C language and paired-single assembler versions. Non-prefixed functions (those beginning with neither <CODE>C_</CODE> nor <CODE>PS</CODE>) are actually defined as macros for either C language or paired-single assembler functions, where the definition rules are the same as those of regular functions.</P> 46<P>Features and arguments of each extended function are almost the same as the standard 3x4 matrix version, except for the fact that these functions use <A href="structures/Mtx44_Mtx44Ptr.html"><CODE>Mtx44</CODE></A> as the input/output matrix type instead of <A href="structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></A>. </P> 47<P>Details are described below:</P> 48<P> 49<STRONG><CODE>MTX44Identity:</CODE></STRONG><BR> Gets a 4x4 unit matrix.<BR> <BR> <STRONG><CODE>MTX44Copy:</CODE></STRONG><BR> Copies all 4x4 matrix components.<BR> <BR> <STRONG><CODE>MTX44Concat:</CODE></STRONG><BR> Performs true concatenation of two 4x4 matrices.<BR> <BR> <STRONG><CODE>MTX44Transpose:</CODE></STRONG><BR> Performs true 4x4 matrix transposition.<BR> <BR> <CODE><STRONG>MTX44Inverse:</STRONG></CODE><BR> Performs true 4x4 matrix inversion.<BR> <strong>Note: </strong> Depending on the input values, the calculation results may not be stable. We recommend that you use the standard 3x4 matrix functions unless you have a particular reason to use the 4x4 matrix functions.<BR><BR> <CODE><STRONG>MTX44Trans:<BR> MTX44TransApply:<BR> MTX44Scale:<BR> MTX44ScaleApply:<BR> MTX44RotRad:<BR> MTX44RotTrig:<BR> MTX44RotAxisRad:</STRONG></CODE><BR> These functions have the same behavior as the standard 3x4 matrix functions, but set the fourth row to (0, 0, 0, 1).<BR> <BR> <STRONG><CODE>MTX44MultVec: <BR> MTX44MultVecArray: </CODE></STRONG><BR> These functions perform 4x4 matrix vs. 4D vector multiplication by assuming the implicit fourth component of the input vector as 1. After multiplication, the resulting 4D vector (<em>x</em>, <em>y</em>, <em>z</em>, <em>w</em>) is embedded into an output 3D vector by calculating (<em>x</em>/<em>w</em>, <em>y</em>/<em>w</em>, <em>z</em>/<em>w</em>).<br> <CODE><STRONG>MTX44MultVecSR:<BR> MTX44MultVecArraySR:</STRONG></CODE><BR> These functions use only the 3x3 submatrix components for the computation so that it becomes a standard multiplication between a 3x3 matrix and 3D vector.<BR> 50</P> 51 52<H2>See Also</H2> 53<P class="reference"> 54<A href="structures/Mtx44_Mtx44Ptr.html">Mtx44, Mtx44Ptr</A> 55</P> 56 57<H2>Revision History</H2> 58<P> 592006/03/01 Initial version.<br> 60</P> 61 62<hr><p>CONFIDENTIAL</p></body> 63</HTML>