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</title> 8</head> 9 10<body> 11 12<h1>KPADGetProjectionPos</h1> 13 14<h2>Syntax</h2> 15<dl><dd><pre class="construction"> 16#include <revolution/kpad.h> 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<TABLE class="arguments" border="1" > 35 <TBODY> 36 <TR> 37<TH>dst</TH> 38<TD>Pointer to the Vec2-type variable that stores the coordinates (in <SPAN class="argument">projRect</SPAN>) after conversion.</TD> 39 </TR> 40 <TR> 41<TH>src</TH> 42<TD>Pointer to the <CODE>Vec2</CODE>-type variable that stores the normalized coordinates prior to conversion (the coordinates with a value of the range in which objects can be captured by DPD is roughly between -1 and 1).</TD> 43 </TR> 44 <TR> 45<TH>projRect</TH> 46<TD>Rectangle in the projection coordinate system.</TD> 47 </TR> 48 <TR> 49<TH>viRatio</TH> 50<TD>Value of <CODE>fb_width / vi_width</CODE>.</TD> 51 </TR> 52 </TBODY> 53</TABLE> 54 55<h2>Return Values</h2> 56<p> 57None. 58</p> 59 60<H2>Description</H2> 61<p> 62Converts normalized coordinates (the coordinates with a value of the range in which objects can be captured by DPD is roughly between -1 and 1) into 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. 63</p> 64 65<h2>See Also</h2> 66<p class="reference"> 67<a href="./KPADEnableAimingMode.html">KPADEnableAimingMode</a>, 68<a href="./KPADDisableAimingMode.html">KPADDisableAimingMode</a>, 69<a href="./KPADSetSensorHeight.html">KPADSetSensorHeight</a> 70</p> 71 72<H2>Revision History</H2> 73<p> 742008/07/08 Added explanations on normalized coordinates.<br>2006/09/07 Initial version.<br> 75</p> 76 77<hr><p>CONFIDENTIAL</p></body> 78</html>