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>MTXConcat</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">MTXConcat</H1>
12
13<H2 align="left">Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/mtx.h&gt;
16
17void C_MTXConcat ( const Mtx a, const Mtx b, Mtx ab );
18void PSMTXConcat ( const Mtx a, const Mtx b, Mtx ab );
19
20#define MTXConcat C_MTXConcat // for debug build
21#define MTXConcat PSMTXConcat // for nondebug build
22</pre></dd></dl>
23
24<H2 align="left">Arguments</H2>
25<TABLE class="arguments" border="1" >
26  <TBODY>
27    <TR>
28<TH>a</TH>
29<TD>First matrix to multiply. The type of <SPAN class="argument">a</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>
30    </TR>
31    <TR>
32<TH>b</TH>
33<TD>Second matrix to multiply. The type of <SPAN class="argument">b</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>
34    </TR>
35    <TR>
36<TH>ab</TH>
37<TD>Resultant concatenated matrix (<SPAN class="argument">a</SPAN> x <SPAN class="argument">b</SPAN>). The type of <SPAN class="argument">ab</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>. Okay if <SPAN class="argument">ab</SPAN> = <SPAN class="argument">a</SPAN> or <SPAN class="argument">ab</SPAN> = <SPAN class="argument">b</SPAN>.</TD>
38    </TR>
39  </TBODY>
40</TABLE>
41
42<H2 align="left">Return Values</H2>
43<P>None.</P>
44
45<H2 align="left">Description</H2>
46<P>Multiplies (<SPAN class="argument">a</SPAN> x <SPAN class="argument">b</SPAN>) and places the result in <SPAN class="argument">ab</SPAN>.&nbsp;Matrices are treated as row-major for multiplication purposes:</P>
47<P><code>element [row][col] of <SPAN class="argument">ab</SPAN> =&nbsp;<SPAN class="argument">a</SPAN> [row] x <SPAN class="argument">b</SPAN> [col]</code></P>
48<P>During a debug build, <code>MTXConcat</code> is interpreted as <code>C_MTXConcat</code>, which is a normal C-language version. During a nondebug build for a Broadway processor, the paired-singles equivalent of this function, <code><font face="Courier New">PSMTXConcat</font></code>, will be automatically substituted. You can also call <CODE>C_MTXConcat</CODE> and <CODE>PSMTXConcat</CODE> explicitly.</P>
49<P><B>Note 1:</B> The C version of this function becomes faster if <SPAN class="argument">ab</SPAN> does not equal either <SPAN class="argument">a</SPAN> or <SPAN class="argument">b</SPAN> as it saves a copy operation from a temporary local matrix.</P>
50<P><B>Note 2:</B> Some calculation errors may be expected between the C version and paired-single version because of processing order differences.<BR>In the case of the paired-single version, calculation results are not guaranteed when the array given includes undefined values for the translation component.</P>
51
52<H2 align="left">See Also</H2>
53<P>
54<A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE>, <CODE>MtxPtr</CODE></A><BR> <A href="../stack/MTXPush.html"><CODE>MTXPush</CODE></A><BR> <A href="../stack/MTXPushFwd.html"><CODE>MTXPushFwd</CODE></A><BR> <A href="../stack/MTXPushInv.html"><CODE>MTXPushInv</CODE></A><BR> <A href="../stack/MTXPushInvXpose.html"><CODE>MTXPushInvXpose</CODE></A>
55</P>
56
57<H2>Revision History</H2>
58<P>
592009/02/10 Added a note regarding calculation results of the paired-single version.<br>2006/03/01 Initial version.
60</P>
61
62<hr><p>CONFIDENTIAL</p></body>
63</HTML>