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>MTXMultVecArray</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/mtx.h&gt;
16
17void C_MTXMultVecArray (
18    const Mtx  m,
19    const Vec* srcBase,
20          Vec* dstBase,
21          u32  count );
22void PSMTXMultVecArray (
23    const Mtx  m,
24    const Vec* srcBase,
25          Vec* dstBase,
26          u32  count );
27
28#define MTXMultVecArray  C_MTXMultVecArray // for debug build
29#define MTXMultVecArray  PSMTXMultVecArray // for nondebug build
30</pre></dd></dl>
31
32<H2>Arguments</H2>
33<TABLE class="arguments" border="1" >
34  <TBODY>
35    <TR>
36<TH><em><strong><code>m</code></strong></em>&nbsp;&nbsp;</TH>
37<TD>Source matrix to multiply. <SPAN class="argument">m</SPAN> is not altered by this function. The type of <SPAN class="argument">m</SPAN> may be either <A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></A> or <A href="../structures/Mtx_MtxPtr.html"><CODE>MtxPtr</CODE></A>.</TD>
38    </TR>
39    <TR>
40<TH>srcBase</TH>
41<TD>Pointer to the first <A href="../structures/Vec_VecPtr.html"><CODE>Vec</CODE></A> type of the source vector array. <BR>The type of <SPAN class="argument">srcBase</SPAN> may be either <A href="../structures/Vec_VecPtr.html"><CODE>VecPtr</CODE></A> or <A href="../structures/Point3d_Point3dPtr.html"><CODE>Point3dPtr</CODE></A>.</TD>
42    </TR>
43    <TR>
44<TH>dstBase</TH>
45<TD>Pointer to the first <A href="../structures/Vec_VecPtr.html"><CODE>Vec</CODE></A> type of the calculated vector array. <BR>The type of <SPAN class="argument">dstBase</SPAN> may be either <A href="../structures/Vec_VecPtr.html"><CODE>VecPtr</CODE></A> or <A href="../structures/Point3d_Point3dPtr.html"><CODE>Point3dPtr</CODE></A>.</TD>
46    </TR>
47    <TR>
48<TH>count</TH>
49<TD>Number of contiguous array elements to multiply.<br>Acceptable if <SPAN class="argument">srcBase</SPAN>=<SPAN class="argument">dstBase</SPAN>.<BR>However, the condition <SPAN class="argument">srcBase</SPAN>&lt;<SPAN class="argument">dstBase</SPAN>&lt;(<SPAN class="argument">srcBase</SPAN>+<SPAN class="argument">count</SPAN>- 1) must be avoided.</TD>
50    </TR>
51  </TBODY>
52</TABLE>
53
54<H2>Return Values</H2>
55<P>None.</P>
56
57<H2>Description</H2>
58<P>Pre-multiplies an array of <SPAN class="argument">count</SPAN> 3D vectors and a matrix. For multiplication purposes, each vector is treated as a 4-element column vector with an implied fourth <EM>w</EM> coordinate of 1.</P>
59<P>For arrays of vectors, this function is more efficient than calling the <A href="MTXMultVec.html"><CODE>MTXMultVec</CODE></A> function in a loop as it saves the overhead of repeated function calls.</P>
60<P><STRONG>Note:</STRONG> Vectors are transformed one array element at a time through a single temporary vector, so it is acceptable if <SPAN class="argument">srcBase</SPAN>=<SPAN class="argument">dstBase</SPAN>. However, problems will result if the <SPAN class="argument">dstBase</SPAN> pointer is within the range (<SPAN class="argument">srcBase</SPAN>+<SPAN class="argument">count</SPAN>-1). In this case, resultant vectors will overwrite part of the <SPAN class="argument">srcBase</SPAN> array before it can be used as a source value.</P>
61<P>During a debug build, <CODE>MTXMultVecArray</CODE> is parsed 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> and <CODE>PSMTXMultVecArray</CODE> explicitly.</P>
62
63<H2>See Also</H2>
64<P class="reference">
65<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>,
66<A href="../structures/Point3d_Point3dPtr.html">Point3d, Point3dPtr</A>,
67<A href="../structures/Vec_VecPtr.html">Vec, VecPtr</A>,
68<A href="MTXMultVec.html">MTXMultVec</A>,
69<A href="MTXMultVecSR.html">MTXMultVecSR</A>,
70<A href="MTXMultVecArraySR.html">MTXMultVecArraySR</A>
71</P>
72
73<H2>Revision History</H2>
74<P>
752008/05/26 Corrected errors.<br>2006/03/01 Initial version.<br>
76</P>
77
78<hr><p>CONFIDENTIAL</p></body>
79</HTML>