1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>GXGetProjectionv</title>
10</head>
11
12<body>
13
14<h1 align="left">GXGetProjectionv</h1>
15
16<h2>C Specification</h2>
17
18<dl>
19<dd><pre><CODE>#include &lt;revolution/gx.h&gt;</CODE></pre>
20  </dd>
21<dd><pre><CODE>void GXGetProjectionv( f32* ptr );</CODE></pre>
22</dd></dl><h2>Arguments</h2>
23<TABLE border="1" cellpadding="3" cellspacing="0.1">
24  <tr>
25<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>ptr</font></strong></em></TD>
26<TD width="520">Pointer to a floating point type array. Minimum size is <code>GX_PROJECTION_SZ</code>.</TD>
27    </tr>
28</TABLE>
29<h2>Return Values</h2>
30
31<p>None.</p>
32<H2>Description</H2>
33<P>This function gets the current projection matrix in an array format. The returned projection matrix can be supplied as a parameter to <a href="GXProject.html"><code>GXProject</code></a>.&nbsp;The first element of <em><strong><code>ptr</code></strong></em> is the matrix <a href="../Enumerated_Types/GXProjectionType.html"><em><code>type</code></em></a> (cast to <code>f32</code>).&nbsp;Only two types of projection matrices are supported:</P>
34<P>Perspective Matrix Format:</P>
35<TABLE border="0" width="50%" style="border-left: 1px solid; border-right: 1px solid; border-top: medium none; border-bottom: medium none">
36  <TBODY>
37    <TR>
38<TD width="25%" align="center">p0</TD>
39      <TD width="25%" align="center">0</TD>
40<TD width="25%" align="center">p1</TD>
41      <TD width="25%" align="center">0</TD>
42    </TR>
43    <TR>
44      <TD width="25%" align="center">0</TD>
45<TD width="25%" align="center">p2</TD>
46<TD width="25%" align="center">p3</TD>
47      <TD width="25%" align="center">0</TD>
48    </TR>
49    <TR>
50      <TD width="25%" align="center">0</TD>
51      <TD width="25%" align="center">0</TD>
52<TD width="25%" align="center">p4</TD>
53<TD width="25%" align="center">p5</TD>
54    </TR>
55    <TR>
56      <TD width="25%" align="center">0</TD>
57      <TD width="25%" align="center">0</TD>
58      <TD width="25%" align="center">-1</TD>
59      <TD width="25%" align="center">0</TD>
60    </TR>
61  </TBODY>
62</TABLE>
63<P>Orthographic Matrix Format:</P>
64<TABLE border="0" width="50%" style="border-left: 1px solid; border-right: 1px solid; border-top: medium none; border-bottom: medium none">
65  <TBODY>
66    <TR>
67<TD width="25%" align="center">p0</TD>
68      <TD width="25%" align="center">0</TD>
69      <TD width="25%" align="center">0</TD>
70<TD width="25%" align="center">p1</TD>
71    </TR>
72    <TR>
73      <TD width="25%" align="center">0</TD>
74<TD width="25%" align="center">p2</TD>
75      <TD width="25%" align="center">0</TD>
76<TD width="25%" align="center">p3</TD>
77    </TR>
78    <TR>
79      <TD width="25%" align="center">0</TD>
80      <TD width="25%" align="center">0</TD>
81<TD width="25%" align="center">p4</TD>
82<TD width="25%" align="center">p5</TD>
83    </TR>
84    <TR>
85      <TD width="25%" align="center">0</TD>
86      <TD width="25%" align="center">0</TD>
87      <TD width="25%" align="center">0</TD>
88      <TD width="25%" align="center">1</TD>
89    </TR>
90  </TBODY>
91</TABLE>
92<P>The parameters p0-5 are loaded into elements 1-6 of array <em><strong><code>ptr</code></strong></em>.</P>
93<H2>Example</H2>
94<P><CODE>f32 pm[GX_PROJECTION_SZ];</CODE></P>
95<P><code><a href="GXGetProjectionv.html">GXGetProjectionv</a>(pm);</code></P>
96
97<h2>See Also</h2>
98
99<p><a href="../../mtx/Projection/MTXFrustum.html">MTXFrustum</a><br> <a href="../../mtx/Projection/MTXPerspective.html">MTXPerspective</a></p>
100<H2>Revision History</H2>
101<P>03/01/2006 Initial version.</P>
102</BODY>
103</HTML>