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>MTXLightOrtho</TITLE> 9</HEAD> 10<BODY> 11<H1>MTXLightOrtho</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/mtx.h> 16 17void MTXLightOrtho( 18 Mtx m, 19 f32 t, 20 f32 b, 21 f32 l, 22 f32 r, 23 f32 scaleS, 24 f32 scaleT, 25 f32 transS, 26 f32 transT ); 27</pre></dd></dl> 28 29<H2>Arguments</H2> 30<TABLE class="arguments" border="1" > 31 <TBODY> 32 <TR> 33<TH><em><strong><code>m</code></strong></em> </TH> 34<TD>New 3x4 parallel 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> 35 </TR> 36 <TR> 37<TH>t</TH> 38<TD>Top edge of view volume.</TD> 39 </TR> 40 <TR> 41<TH><em><strong><code>b</code></strong></em> </TH> 42<TD>Bottom edge of view volume.</TD> 43 </TR> 44 <TR> 45<TH>l</TH> 46<TD>Left edge of view volume.</TD> 47 </TR> 48 <TR> 49<TH>r</TH> 50<TD>Right edge of view volume.</TD> 51 </TR> 52 <TR> 53<TH>scaleS</TH> 54<TD>Scale in the S direction for projected coordinates (usually 0.5)</TD> 55 </TR> 56 <TR> 57<TH>scaleT</TH> 58<TD>Scale in the T direction for projected coordinates (usually 0.5)</TD> 59 </TR> 60 <TR> 61<TH>transS</TH> 62<TD>Translation in the S direction for projected coordinates (usually 0.5)</TD> 63 </TR> 64 <TR> 65<TH>transT</TH> 66<TD>Translation in the T direction for projected coordinates (usually 0.5)</TD> 67 </TR> 68 </TBODY> 69</TABLE> 70 71<H2>Return Values</H2> 72<P>None.</P> 73 74<H2>Description</H2> 75<P>Sets a 3x4 matrix for orthographic projection. This matrix is used to project points into texture space and yield texture coordinates.</P> 76<P>For normal parallel 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>.</P> 77<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 S and T. 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> 78 79<H2>See Also</H2> 80<P class="reference"> 81<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>, 82<A href="MTXLightFrustum.html">MTXLightFrustum</A>, 83<A href="MTXLightPerspective.html">MTXLightPerspective</A> 84</P> 85 86<H2>Revision History</H2> 87<P> 882006/03/01 Initial version.<br> 89</P> 90 91<hr><p>CONFIDENTIAL</p></body> 92</HTML>