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="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>G3_LookAt</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">G3_LookAt <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19<PRE>
20<CODE>#include &lt;nitro/gx/g3_util.h&gt;</CODE><BR>
21<CODE>void G3_LookAt(
22    const VecFx32 * camPos,
23    const VecFx32 * camUp,
24    const VecFx32 * target,
25    MtxFx43 * mtx
26);</CODE></PRE></dd>
27</dl><h2>Arguments</h2>
28<TABLE border="1" width="100%">
29  <TBODY>
30    <TR>
31      <TD width="190"><em><strong><font face="Courier New">camPos</font></strong></em></TD>
32      <TD width="512">Pointer to camera's position vector</TD>
33    </TR>
34    <TR>
35      <TD width="190"><em><strong><font face="Courier New">camUp</font></strong></em></TD>
36      <TD width="512">Pointer to camera's upward vector</TD>
37    </TR>
38    <TR>
39      <TD><em><strong><font face="Courier New">target</font></strong></em></TD>
40      <TD>Pointer to camera's focal point</TD>
41    </TR>
42    <TR>
43      <TD><em><strong><font face="Courier New">mtx</font></strong></em></TD>
44      <TD>Pointer to a 4x3 matrix.</TD>
45    </TR>
46  </TBODY>
47</TABLE>
48<h2>Return Values</h2>
49<p>None.</p>
50<H2>Description</H2>
51<P>This function sets the matrix mode to <code>Position/Vector</code> mode and sets the camera matrix as the current matrix. When <em><strong><code>mtx</code></strong></em> is not <code>NULL</code>, the camera matrix will also be set in <code>*</code><em><strong><code>mtx</code></strong></em>.*There is no need for <CODE><em><strong>*camUp</strong></em></CODE> to be normalized. The matrix that is set is as shown below.</P>
52<P><span lang=EN-US style='font-size:10.5pt;mso-bidi-font-size: 12.0pt;font-family:Century;mso-fareast-font-family:"MS ??";mso-bidi-font-family: "Times New Roman";mso-font-kerning:1.0pt;mso-ansi-language:EN-US;mso-fareast-language: JA;mso-bidi-language:AR-SA'><span style='mso-text-raise:-88.0pt'><IMG width="401" height="243" src="geo_lookat.gif" v:shapes="_x0000_i1025"></span><span style='mso-text-raise:-88.0pt'></span></span></P>
53<h2>See Also</h2>
54<H2>Revision History</H2>
55<P>2004/01/19 Initial version.</P>
56<hr><p>CONFIDENTIAL</p></body>
57</html>
58