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 align="left">MTXLightFrustum</H1> 12<H2 align="left">C Specification</H2> 13<BLOCKQUOTE><CODE><CODE>#include <revolution/mtx.h><BR> <BR> void MTXLightFrustum(<BR> Mtx <EM>m</EM>,<BR> f32 <EM>t</EM>,<BR> f32 <EM>b</EM>,<BR> f32 <EM>l</EM>,<BR> f32 <EM>r</EM>,<BR> f32 <EM>n</EM>,<BR> f32 <EM>scaleS</EM>,<BR> f32 <EM>scaleT</EM>,<BR> f32 <EM>transS</EM>,<BR> f32 <EM>transT</EM> );</CODE></CODE></BLOCKQUOTE> 14<H2 align="left">Arguments</H2> 15<DIV align="left"> 16<TABLE border="1" cellpadding="3" cellspacing="0.1"> 17 <TBODY> 18 <TR> 19<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>m</EM></STRONG></CODE></TD> 20<TD width="520">New 3x4 projection matrix. <code><em><strong>m</strong></em></code> may be either a <A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></A> or a <A href="../structures/Mtx_MtxPtr.html"><CODE>MtxPtr</CODE></A>..</TD> 21 </TR> 22 <TR> 23<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>t</EM></STRONG></CODE></TD> 24<TD width="520">Top edge of view volume at the near clipping plane.</TD> 25 </TR> 26 <TR> 27<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM><em><strong><code>b</code></strong></em> </EM></STRONG></CODE></TD> 28<TD width="520">Bottom edge of view volume at the near clipping plane.</TD> 29 </TR> 30 <TR> 31<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>l</EM></STRONG></CODE></TD> 32<TD width="520">Left edge of view volume at the near clipping plane.</TD> 33 </TR> 34 <TR> 35<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>r</EM></STRONG></CODE></TD> 36<TD width="520">Right edge of view volume at the near clipping plane.</TD> 37 </TR> 38 <TR> 39<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>n</EM></STRONG></CODE></TD> 40<TD width="520">Positive distance to near clipping plane.</TD> 41 </TR> 42 <TR> 43<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>scaleS</EM></STRONG></CODE></TD> 44<TD width="520">Scale in the <EM>S</EM> direction for projected coordinates (usually 0.5).</TD> 45 </TR> 46 <TR> 47<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>scaleT</EM></STRONG></CODE></TD> 48<TD width="520">Scale in the <EM>T</EM> direction for projected coordinates (usually 0.5).</TD> 49 </TR> 50 <TR> 51<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>transS</EM></STRONG></CODE></TD> 52<TD width="520">Translate in the <EM>S</EM> direction for projected coordinates (usually 0.5).</TD> 53 </TR> 54 <TR> 55<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>transT</EM></STRONG></CODE></TD> 56<TD width="520">Translate in the <EM>T</EM> direction for projected coordinates (usually 0.5).</TD> 57 </TR> 58 </TBODY> 59</TABLE> 60</DIV> 61<H2 align="left">Return Values</H2> 62<P align="left">None.</P> 63<H2 align="left">Description</H2> 64<P>Sets a 3x4 perspective projection matrix from viewing volume dimensions, two scale values, and two translation values. This matrix is used to project points into texture space and yield texture coordinates.</P> 65<P>For normal perspective projections, the axis of projection is the -z axis, so <code><em><strong>t</strong></em></code> = positive, <code><em><strong>b</strong></em></code> = <code>-<em><strong>t</strong></em></code>,<em><strong> <code>r</code></strong></em> = positive, and <em><strong> <code>l</code></strong></em> = <code>-<em><strong>r</strong></em></code>. n</STRONG></EM></CODE> must be given as a positive distance. </P> 66<P>Standard projection yields values ranging from -1.0 to 1.0 in both dimensions of the front clipping plane. 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 <EM>S</EM> and <EM>T</EM>. 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. Then they are translated by 0.5 to be in the range of 0.0 to 1.0. Other values can be used for translation and scale to yield different effects.</P> 67 68 69<H2 align="left">See Also</H2> 70<P align="left"><A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx, MtxPtr</CODE></A>, <A href="MTXLightOrtho.html"><CODE>MTXLightOrtho</CODE></A>, <A href="../Projection/MTXPerspective.html"><CODE>MtxLightPerspective</CODE></A></P> 71<H2>Revision History</H2> 72<P>2006/03/01 Initial version.</P> 73<hr> 74<P>CONFIDENTIAL</p> 75</BODY> 76</HTML>