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>MTXPerspective</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">MTXPerspective</H1> 12<H2 align="left">C Specification</H2> 13<BLOCKQUOTE><CODE><CODE>#include <revolution/mtx.h></CODE></CODE></BLOCKQUOTE> 14<BLOCKQUOTE><CODE><CODE>void MTXPerspective ( <BR> Mtx44 <EM>m</EM>,<BR> f32 <EM>fovy</EM>,<BR> f32 <EM>aspect</EM>,<BR> f32 <EM>n</EM>,<BR> f32 <EM>f</EM> );</CODE></CODE></BLOCKQUOTE> 15<H2 align="left">Arguments</H2> 16<DIV align="left"> 17<TABLE border="1" cellpadding="3" cellspacing="0.1"> 18 <TBODY> 19 <TR> 20<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>m</EM></STRONG></CODE></TD> 21<TD width="520">New 4x4 perspective projection matrix.</TD> 22 </TR> 23 <TR> 24<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>fovy</EM></STRONG></CODE></TD> 25<TD width="520">Total field of view in the Y-Z plane measured in degrees.</TD> 26 </TR> 27 <TR> 28<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>aspect</EM></STRONG></CODE></TD> 29<TD width="520">View window aspect ratio (width/height)</TD> 30 </TR> 31 <TR> 32<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>n</EM></STRONG></CODE></TD> 33<TD width="520">Positive distance to near clipping plane.</TD> 34 </TR> 35 <TR> 36<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>f</EM></STRONG></CODE></TD> 37<TD width="520">Positive distance to far clipping plane.</TD> 38 </TR> 39 </TBODY> 40</TABLE> 41</DIV> 42<H2 align="left">Return Values</H2> 43<P align="left">None.</P> 44<H2 align="left">Description</H2> 45<P>Sets the 4x4 perspective projection matrix with two parameters for field-of-view and aspect ratio. This matrix is used by the <code>GX API</code> to convert points to screen space.</P> 46<P><CODE>MTXPerspective</CODE> generates a projection matrix, equivalent to that created by <A href="MTXFrustum.html"><CODE>MTXFrustum</CODE></A>, with the axis of projection centered around Z. This function is included to provide an alternative method of specifying the size of the view frustum. </P> 47<P>The field of view (<em><strong><code>fovy</code></strong></em>) is the total field of view in degrees in the YZ plane. <code><em><strong>aspect</strong></em></code> is the ratio (width/height) of the view window in view space. <CODE><EM><STRONG>n</STRONG></EM></CODE> and <CODE><EM><STRONG>f</STRONG></EM></CODE> must both be positive values.</P> 48<P align="left"><B>Note:</B> <CODE><EM><STRONG>m</STRONG></EM></CODE> must possess a negative "Z" value in order to make converted points visible after projection in view space.</P> 49 50 51<H2 align="left">See Also</H2> 52<P align="left"><A href="../structures/Mtx44_Mtx44Ptr.html"><CODE>Mtx44, Mtx44Ptr, </CODE></A><A href="MTXFrustum.html"><CODE>MTXFrustum</CODE></A>, <A href="MTXOrtho.html"><CODE>MTXOrtho</CODE></A></P> 53<H2>Revision History</H2> 54</code></code> 55<P>2006/03/01 Initial version.</p> 56<hr> 57<P>CONFIDENTIAL</p> 58</BODY> 59</HTML>