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>MTXFrustum</TITLE>
9</HEAD>
10<BODY>
11<H1>MTXFrustum</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/mtx.h&gt;
16
17void MTXFrustum (
18    Mtx44 m,
19    f32   t,
20    f32   b,
21    f32   l,
22    f32   r,
23    f32   n,
24    f32   f );
25</pre></dd></dl>
26
27<H2>Arguments</H2>
28<TABLE class="arguments" border="1" >
29  <TBODY>
30    <TR>
31<TH>m</TH>
32<TD>New 4x4 projection matrix. The type of <SPAN class="argument">m</SPAN> may be either <A href="../structures/Mtx44_Mtx44Ptr.html"><CODE>Mtx44</CODE></A> or <A href="../structures/Mtx44_Mtx44Ptr.html"><CODE>Mtx44Ptr</CODE></A>.</TD>
33    </TR>
34    <TR>
35<TH>t</TH>
36<TD>Top edge of view volume at the near clipping plane.</TD>
37    </TR>
38    <TR>
39<TH>b</TH>
40<TD>Bottom edge of view volume at the near clipping plane.</TD>
41    </TR>
42    <TR>
43<TH>l</TH>
44<TD>Left edge of view volume at the near clipping plane.</TD>
45    </TR>
46    <TR>
47<TH>r</TH>
48<TD>Right edge of view volume at the near clipping plane.</TD>
49    </TR>
50    <TR>
51<TH>n</TH>
52<TD>Positive distance to the near clipping plane.</TD>
53    </TR>
54    <TR>
55<TH>f</TH>
56<TD>Positive distance to the far clipping plane.</TD>
57    </TR>
58  </TBODY>
59</TABLE>
60
61<H2>Return Values</H2>
62<P>None.</P>
63
64<H2>Description</H2>
65<P>Sets a 4&times;4 perspective projection matrix based on the dimensions of the viewing volume. This matrix is used by the GX API to transform points to screen space.</P>
66<P>For normal perspective projection, the axis of projection is the -Z axis, so <SPAN class="argument">t</SPAN> = positive, <SPAN class="argument">b</SPAN> = <CODE>-</CODE><SPAN class="argument">t</SPAN>, <SPAN class="argument">r</SPAN> = positive, and <SPAN class="argument">l</SPAN> = <CODE>-</CODE><SPAN class="argument">r</SPAN>. Both <SPAN class="argument">n</SPAN> and <SPAN class="argument">f</SPAN> must be positive distances.</P>
67<P><STRONG>Note:</STRONG> <SPAN class="argument">m</SPAN> negates a point's <EM>Z</EM> values, so pre-transformed points should have negative <EM>Z</EM> values in eye space in order to be visible after projection.</P>
68
69<H2>See Also</H2>
70<P class="reference">
71<A href="../structures/Mtx_MtxPtr.html">Mtx44, Mtx44Ptr</A>,
72<A href="MTXOrtho.html">MTXOrtho</A>,
73<A href="MTXPerspective.html">MtxPerspective</A>
74</P>
75
76<H2>Revision History</H2>
77<P>
782006/03/01 Initial version.<br>
79</P>
80
81<hr><p>CONFIDENTIAL</p></body>
82</HTML>