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="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>MTXMultVecArray</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">MTXMultVecArray</H1> 12<H2 align="left">C Specification</H2> 13<BLOCKQUOTE><CODE><CODE>#include <revolution/mtx.h></CODE></CODE></BLOCKQUOTE> 14<BLOCKQUOTE><CODE><CODE>void C_MTXMultVecArray (<BR> const Mtx <EM> m</EM>,<BR> const Vec* <EM>srcBase</EM>,<BR> Vec* <EM>dstBase</EM>,<BR> u32 <EM> count</EM> );<BR> void PSMTXMultVecArray (<BR> const Mtx <EM> m</EM>,<BR> const Vec* <EM>srcBase</EM>,<BR> Vec* <EM>dstBase</EM>,<BR> u32 <EM> count</EM> );</CODE></CODE></BLOCKQUOTE> 15<BLOCKQUOTE><CODE><CODE>#define MTXMultVecArray C_MTXMultVecArray // for debug build<BR> #define MTXMultVecArray PSMTXMultVecArray // for nondebug build</CODE></CODE></BLOCKQUOTE> 16<H2 align="left">Arguments</H2> 17<DIV align="left"> 18<TABLE border="1" cellpadding="3" cellspacing="0.1"> 19 <TBODY> 20 <TR> 21<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>m</EM></STRONG></CODE></TD> 22<TD width="520">Source matrix for multiply. <CODE><EM><STRONG>m</STRONG></EM></CODE> is unaffected by this function. <code><em><strong>m</strong></em></code> may be either an <A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></A> or an <A href="../structures/Mtx_MtxPtr.html"><CODE>MtxPtr</CODE></A>.</TD> 23 </TR> 24 <TR> 25<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>srcBase</EM></STRONG></CODE></TD> 26<TD width="520">Pointer to first <A href="../structures/Vec_VecPtr.html"><code>Vec</code></a> of source vector array. <br> <code><em><strong>srcBase</strong></em></code> may be either a <A href="../structures/Vec_VecPtr.html"><code>VecPtr</code></a> or a <A href="../structures/Point3d_Point3dPtr.html"><code>Point3dPtr</code></a>.</TD> 27 </TR> 28 <TR> 29<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>dstBase</EM></STRONG></CODE></TD> 30<TD width="520">Pointer to first <A href="../structures/Vec_VecPtr.html"><code>Vec</code></a> of destination vector array. <br> <code><em><strong>dstBase</strong></em></code> may be either a <A href="../structures/Vec_VecPtr.html"><CODE>VecPtr</CODE></A> or a <A href="../structures/Point3d_Point3dPtr.html"><CODE>Point3dPtr</CODE></A>. 31 </TD> 32 </TR> 33 <TR> 34<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>count</EM></STRONG></CODE></TD> 35<TD width="520">Number of contiguous array elements to multiply.<br> Acceptable if <code><em><strong>srcBase</strong></em>=<em><strong>dstBase</strong></em></code>. <BR>However, the condition <code><strong><em>srcBase</em><<em>dstBase</em></strong><(<em><strong>srcBase</strong></em>+<em><strong>count</strong></em>-1)</code> must be avoided.</TD> 36 </TR> 37 </TBODY> 38</TABLE> 39</DIV> 40<H2 align="left">Return Values</H2> 41<P align="left">None.</P> 42<H2 align="left">Description</H2> 43<P align="left">Multiplies an array of <code><em><strong>count</strong></em></code> 3D vectors on the left with a matrix. For multiplication purposes, each vector is treated as a 4-element column vector with an implied fourth <CODE><EM>w</EM></CODE> coordinate of 1.</P> 44<P align="left">For arrays of vectors, this function is more efficient than calling <a href="MTXMultVec.html"><code>MTXMultVec</code></a> in a loop as it saves the overhead of repeated function calls.</P> 45<P align="left"><B>Note:</B> Vectors are transformed one array element at a time through a single temporary vector, so it's acceptable if <code><em><strong>srcBase</strong></em>=<em><strong>dstBase</strong></em></code>. However, problems will result if <code><em><strong>dstBase</strong></em></code> points are within the range: (<code><em><strong>srcBase</strong></em>+<em><strong>count</strong></em>-1</code>). In this case, the resulting vectors will overwrite part of the <code><em><strong>srcBase</strong></em></code> array before it can be used as a source value.</P> 46<P align="left">During a debug build, <code>MTXMultVecArray</code> is interpreted as <code>C_MTXMultVecArray</code>, which is a normal C language version. During a non-debug build for a Broadway processor, the paired-singles equivalent of this function, <code>PSMTXMultVecArray</code>, will be automatically substituted. You can also call <code>C_MTXMultVecArray</CODE> or <CODE>PSMTXMultVecArray</code> explicitly.</P> 47 48 49<H2 align="left">See Also</H2> 50<P align="left"><A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx, MtxPtr</CODE></A>, <A href="../structures/Point3d_Point3dPtr.html"><CODE>Point3d, Point3dPtr</CODE></A>, <A href="../structures/Vec_VecPtr.html"><CODE>Vec, VecPtr</CODE></A>, <A href="MTXMultVec.html"><CODE>MTXMultVec</CODE></A>, <A href="MTXMultVecSR.html"><CODE>MTXMultVecSR</CODE></A>, <A href="MTXMultVecArraySR.html"><CODE>MTXMultVecArraySR</CODE></A></P> 51<H2>Revision History</H2> 52<P>03/01/2006 Initial version.</P> 53</BODY> 54</HTML>