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>MTXMultVecArraySR</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">MTXMultVecArraySR</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_MTXMultVecArraySR (<BR> const Mtx <EM>m</EM>,<BR> const Vec* <EM>srcBase</EM>,<BR> Vec* <EM>dstBase</EM>,<BR> u32 <EM>count</EM> );<BR> void PSMTXMultVecArraySR (<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 MTXMultVecArraySR C_MTXMultVecArraySR // for debug build<BR> #define MTXMultVecArraySR PSMTXMultVecArraySR // 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>.</TD> 31 </TR> 32 <TR> 33<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>count</EM></STRONG></CODE></TD> 34<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> 35 </TR> 36 </TBODY> 37</TABLE> 38</DIV> 39<H2 align="left">Return Values</H2> 40<P align="left">None.</P> 41<H2 align="left">Description</H2> 42<P align="left">Multiplies an array of <CODE><EM><STRONG>count</STRONG></EM></CODE> 3D vectors on the left with a 3x3 sub-matrix (<u>S</u>cale and <u>R</u>otate component of 3x4 matrix <CODE><EM><STRONG>m</STRONG></EM></CODE>). For arrays of vectors, this function is more efficient than calling <a href="MTXMultVecSR.html"><code>MTXMultVecSR</code></a> in a loop as it saves the overhead of repeated function calls.</P> 43<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> 44<P>During a debug build, <code>MTXMultVecArraySR</code> is interpreted as <code>C_MTXMultVecArraySR</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>PSMTXMultVecArraySR</code>, will be automatically substituted. You can also call <code>C_MTXMultVecArraySR</CODE> or <CODE>PSMTXMultVecArraySR</code> explicitly.</P> 45 46 47<H2 align="left">See Also</H2> 48<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="MTXMultVecArray.html"><CODE>MTXMultVecArray</CODE></A></P> 49<H2>Revision History</H2> 50<P>03/01/2006 Initial version.</P> 51</BODY> 52</HTML>