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>MTXLightFrustum</TITLE>
9</HEAD>
10<BODY>
11<H1>MTXLightFrustum</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/mtx.h&gt;
16
17void MTXLightFrustum(
18    Mtx m,
19    f32 t,
20    f32 b,
21    f32 l,
22    f32 r,
23    f32 n,
24    f32 scaleS,
25    f32 scaleT,
26    f32 transS,
27    f32 transT );
28</pre></dd></dl>
29
30<H2>Arguments</H2>
31<TABLE class="arguments" border="1" >
32  <TBODY>
33    <TR>
34<TH><em><strong><code>m</code></strong></em>&nbsp;&nbsp;</TH>
35<TD>New 3x4 projection matrix. 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>
36    </TR>
37    <TR>
38<TH>t</TH>
39<TD>Top edge of view volume at the near clipping plane.</TD>
40    </TR>
41    <TR>
42<TH><em><strong><code>b</code></strong></em>&nbsp;&nbsp;</TH>
43<TD>Bottom edge of view volume at the near clipping plane.</TD>
44    </TR>
45    <TR>
46<TH>l</TH>
47<TD>Left edge of view volume at the near clipping plane.</TD>
48    </TR>
49    <TR>
50<TH>r</TH>
51<TD>Right edge of view volume at the near clipping plane.</TD>
52    </TR>
53    <TR>
54<TH><STRONG><EM><CODE>n</CODE></EM></STRONG></TH>
55<TD>Positive distance to near clipping plane.</TD>
56    </TR>
57    <TR>
58<TH>scaleS</TH>
59<TD>Scale in the S direction for projected coordinates (usually 0.5)</TD>
60    </TR>
61    <TR>
62<TH>scaleT</TH>
63<TD>Scale in the T direction for projected coordinates (usually 0.5)</TD>
64    </TR>
65    <TR>
66<TH>transS</TH>
67<TD>Translation in the S direction for projected coordinates (usually 0.5)</TD>
68    </TR>
69    <TR>
70<TH>transT</TH>
71<TD>Translation in the T direction for projected coordinates (usually 0.5)</TD>
72    </TR>
73  </TBODY>
74</TABLE>
75
76<H2>Return Values</H2>
77<P>None.</P>
78
79<H2>Description</H2>
80<P>Sets a 3x4 perspective projection matrix based on the size of the view frustum, two scale values, and two parallel translation values. This matrix is used to project points into texture space and yield texture coordinates.</P>
81<P>For normal perspective projections, the -z axis is the axis of projection, so <SPAN class="argument">t</SPAN> is positive, <SPAN class="argument">b</SPAN> is <CODE>-</CODE><SPAN class="argument">t</SPAN>, <SPAN class="argument">r</SPAN> is positive, and <SPAN class="argument">l</SPAN> is <CODE>-</CODE><SPAN class="argument">r</SPAN>. <SPAN class="argument">n</SPAN> must specify a positive distance.</P>
82<P>Standard projection yields values ranging from -1.0 to 1.0 in both dimensions of the front clipping plane.&nbsp;Since texture coordinates should usually be within the range of 0.0 to 1.0, we have added a scale and translation value for both S and T.&nbsp;The most common way to use these values is to set all of them to 0.5 (so that points in the range of -1.0 to 1.0 are first scaled by 0.5) to be in the range of -0.5 to 0.5.&nbsp;Then they are translated by 0.5 to be in the range of 0.0 to 1.0.&nbsp;Other values can be used for translation and scale to yield different effects.</P>
83
84<H2>See Also</H2>
85<P class="reference">
86<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>,
87<A href="MTXLightOrtho.html">MTXLightOrtho</A>,
88<A href="../Projection/MTXPerspective.html">MtxLightPerspective</A>
89</P>
90
91<H2>Revision History</H2>
92<P>
932006/03/01 Initial version.<br>
94</P>
95
96<hr><p>CONFIDENTIAL</p></body>
97</HTML>