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 http-equiv="Content-Style-Type" content="text/css">
6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
7<title>KPADGetProjectionPos (KPADOld)</title>
8</head>
9
10<body>
11
12<h1>KPADGetProjectionPos</h1>
13
14<h2>Syntax</h2>
15<dl><dd><pre class="construction">
16#include &lt;revolution/kpadOld.h&gt;
17
18typedef struct Vec2{
19    f32 x;
20    f32 y;
21} Vec2;
22
23typedef struct Rect {
24    f32 left;
25    f32 top;
26    f32 right;
27    f32 bottom;
28} Rect;
29
30void KPADGetProjectionPos( Vec2 *dst, const Vec2 *src, const Rect *projRect, f32 viRatio );
31</pre></dd></dl>
32
33<h2>Arguments</h2>
34<p>
35<TABLE class="arguments" border="1" >
36  <TBODY>
37    <TR>
38<TH>dst</TH>
39<TD>Pointer to the Vec2-type variable that stores the coordinates (in <SPAN class="argument">projRect</SPAN>) after conversion.</TD>
40    </TR>
41    <TR>
42<TH>src</TH>
43<TD>Pointer to the Vec2-type variable that stores the (normalized) coordinates before conversion.</TD>
44    </TR>
45    <TR>
46<TH>projRect</TH>
47<TD>Rectangle in the projection coordinate system.</TD>
48    </TR>
49    <TR>
50<TH>viRatio</TH>
51<TD>Value of <CODE>fb_width / vi_width</CODE>.</TD>
52    </TR>
53  </TBODY>
54</TABLE>
55</p>
56
57<h2>Return Values</h2>
58<p>
59None.
60</p>
61
62<H2>Description</H2>
63<p>
64Converts normalized coordinates to projection coordinates. In addition, this function corrects pixel ratio in the horizontal direction. This function calculates the coordinates that are closest to a spot (on the TV screen) being pointed to by the Wii Remote.
65</p>
66
67<h2>See Also</h2>
68<p class="reference">
69<a href="./KPADEnableAimingMode.html">KPADEnableAimingMode</a>,
70<a href="./KPADDisableAimingMode.html">KPADDisableAimingMode</a>,
71<a href="./KPADSetSensorHeight.html">KPADSetSensorHeight</a>
72</p>
73
74<H2>Revision History</H2>
75<p>
762006/10/25 Changed the name to KPADOld library, beginning with Revolution SDK 2.3.<br>2006/09/07 Initial version.<br>
77</p>
78
79<hr><p>CONFIDENTIAL</p></body>
80</html>