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>MTXLookAt</TITLE>
9</HEAD>
10<BODY>
11<H1>MTXLookAt</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15&nbsp;&nbsp;&nbsp; #include &lt;revolution/mtx.h&gt;
16
17void MTXLookAt (
18    Mtx            m,
19    const Point3d* camPos,
20    const Vec*     camUp,
21    const Point3d* target );
22</pre></dd></dl>
23
24<H2>Arguments</H2>
25<TABLE class="arguments" border="1" >
26  <TBODY>
27    <TR>
28<TH><em><strong><code>m</code></strong></em>&nbsp;&nbsp;</TH>
29<TD>New viewing 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>
30    </TR>
31    <TR>
32<TH>camPos</TH>
33<TD>Pointer to a <A href="../structures/Point3d_Point3dPtr.html"><CODE>Point3d</CODE></A> giving the camera position in world coordinates</TD>
34    </TR>
35    <TR>
36<TH>camUp</TH>
37<TD>Pointer to a <A href="../structures/Vec_VecPtr.html"><CODE>Vec</CODE></A> that specifies the camera &quot;up&quot; vector. <SPAN class="argument">camUp</SPAN> does not have to be a unit vector.</TD>
38    </TR>
39    <TR>
40<TH>target</TH>
41<TD>Pointer to a <A href="../structures/Point3d_Point3dPtr.html"><CODE>Point3d</CODE></A> giving the target position in world coordinates</TD>
42    </TR>
43  </TBODY>
44</TABLE>
45
46<H2>Return Values</H2>
47<P>None.</P>
48
49<H2>Description</H2>
50<P>Sets a matrix for converting from world space to camera space. Generates matrix <SPAN class="argument">m</SPAN> by specifying the camera position (<SPAN class="argument">camPos</SPAN>), camera &quot;up&quot; direction (<SPAN class="argument">camUp</SPAN>), and camera fixation point (<SPAN class="argument">target</SPAN>).</P>
51<P>The access direction for the line-of-sight of the camera is the -Z axis. The access &quot;up&quot; direction of the camera is the +Y axis.</P>
52<P>This function is particularly useful for creating a fixed-position camera which can be aimed at objects, panned, and for which any view can be specified.</P>
53
54<H2>See Also</H2>
55<P class="reference">
56<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>,
57<A href="../structures/Point3d_Point3dPtr.html">Point3d, Point3dPtr</A>,
58<A href="../structures/Vec_VecPtr.html">Vec, VecPtr</A>
59</P>
60
61<H2>Revision History</H2>
62<P>
632006/03/01 Initial version.<br>
64</P>
65
66<hr><p>CONFIDENTIAL</p></body>
67</HTML>