1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>GXSetIndTexMtx</title>
10</head>
11
12<body>
13<h1 align="left">GXSetIndTexMtx</h1>
14
15
16<h2>C Specification</h2>
17
18<dl>
19  <dd><PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE></dd>
20  <dd><pre><CODE>void GXSetIndTexMtx(
21    <A href="../Enumerated_Types/GXIndTexMtxID.html">GXIndTexMtxID</A>   mtx_sel,
22    const f32       offset_mtx[2][3],
23    s8              scale_exp );</CODE></pre></dd>
24</dl><h2>Arguments</h2>
25<TABLE border="1" cellpadding="3" cellspacing="0.1">
26  <tr>
27<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>mtx_sel</font></strong></em></TD>
28<TD width="520">The indirect matrix that is being affected. Accepted values are:<BR>
29      <TABLE border="1" width="500" cellspacing="0.1">
30
31          <tr>
32<TD width="150" bgcolor="#C0C0C0">Name</TD>
33<TD width="350" bgcolor="#C0C0C0">Indirect matrix</TD>
34          </tr>
35          <tr>
36<TD width="150"><code>GX_ITM_0</code></TD>
37<TD width="350">indirect matrix 0 and matrix scale value 0</TD>
38          </tr>
39          <tr>
40<TD width="150"><code>GX_ITM_1</code></TD>
41<TD width="350">indirect matrix 1 and matrix scale value 1</TD>
42          </tr>
43          <tr>
44<TD width="150"><code>GX_ITM_2</code></TD>
45<TD width="350">indirect matrix 2 and matrix scale value 2</TD>
46          </tr>
47
48      </TABLE>
49      </TD>
50    </tr>
51  <tr>
52<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>offset_mtx</font></strong></em></TD>
53<TD width="520">Value to apply to the indirect matrix. Each component must be &gt;= -1 and &lt; +1.</TD>
54    </tr>
55  <tr>
56<TD width="120" valign="top" bgcolor="#ffffe8"><em><strong><CODE>scale_exp</font></strong></em></TD>
57<TD width="520">Exponent of 2 to assign to the scale factor. The exponent must be &gt;= -17 and &lt;= +46. Since the output values are stored in a S17.7 format, take notice of the range of output values to avoid overflow when you use large or small scale factor.</TD>
58    </tr>
59</TABLE>
60<h2>Return Values</h2>
61
62<p>None.</p>
63<H2>Description</H2>
64<P>This function lets you set one of the three static indirect matrices and the associated scale factor.&nbsp;The indirect matrix and scale is used to process the results of an indirect lookup in order to produce offsets to use during a regular lookup.&nbsp;The matrix is multiplied by the [S T U] offsets that have been extracted (and optionally biased) from the indirect lookup color.&nbsp;In this matrix-vector multiply, the matrix is on the left and the [S T U] column vector is on the right.</P>
65<P>The matrix values are stored in the hardware as a sign and 10 fractional bits (two's complement).&nbsp;Thus the smallest number that can be stored is -1 and the largest is (1 - 1/1024) or approximately 0.999.&nbsp;Since +1 cannot be stored, you may consider dividing all the matrix values by two (thus +1 becomes +0.5) and adding one to the scale value in order to compensate.</P>
66
67<h2>See Also</h2>
68<p><A href="GXSetTevIndirect.html"><CODE>GXSetTevIndirect</CODE></A></p>
69<p><A href="GXSetTevIndBumpST.html"><CODE>GXSetTevIndBumpST</CODE></A><br> <A href="GXSetTevIndBumpXYZ.html"><CODE>GXSetTevIndBumpXYZ</CODE></A><br> <A href="GXSetTevIndTile.html"><CODE>GXSetTevIndTile</CODE></A><br> <A href="GXSetTevIndWarp.html"><CODE>GXSetTevIndWarp</CODE></A></p>
70<H2>Revision History</H2>
71<P>2006/03/01 Initial version.</P>
72<hr>
73<P>CONFIDENTIAL</p>
74</BODY>
75</HTML>