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 13 14<h1>KPADGetProjectionPos</h1> 15 16 17<h2>C Specification</h2> 18 19<dl> 20 <dd><pre><code>#include <revolution/kpad.h></code></pre></dd> 21 <dd><pre><code> 22typedef struct Vec2{ 23 f32 x; 24 f32 y; 25} Vec2; 26 27typedef struct Rect { 28 f32 left; 29 f32 top; 30 f32 right; 31 f32 bottom; 32} Rect; 33 </code></pre></dd> 34 <dd><pre><CODE>void KPADGetProjectionPos( Vec2 *dst, const Vec2 *src, const Rect *projRect, f32 viRatio );</CODE></pre> 35 </dd> 36</dl> 37 38<h2>Arguments</h2> 39<p> 40<TABLE border="1"> 41 <TBODY> 42 <TR> 43<TD><CODE><b><i>dst</i></b></CODE></TD> 44 <TD>Pointer to the Vec2 type variable storing the coordinates (in <CODE>projRect</CODE>) after conversion.</TD> 45 </TR> 46 <TR> 47<TD><CODE><b><i>src</i></b></CODE></TD> 48 <TD>Pointer to the Vec2 type variable storing the (normalized) coordinates before conversion. </TD> 49 </TR> 50 <TR> 51 <TD><CODE><b><i>projRect</i></b></CODE></TD> 52 <TD>Rectangle in the projection coordinate system.</TD> 53 </TR> 54 <TR> 55 <TD><CODE><b><i>viRatio</i></b></CODE></TD> 56 <TD>Value of fb_width/vi_width.</TD> 57 </TR> 58 </TBODY> 59</TABLE> 60</p> 61 62<h2>Return Values</h2> 63<p> 64None. 65</p> 66 67<H2>Description</H2> 68<p> 69Takes normalized coordinates and performs the calculation for conversion to projection coordinates. This function also performs pixel ratio correction in the horizontal direction. The purpose of this function is to calculate the closest possible value to the coordinate values corresponding to a location on the TV screen actually being pointed to by the Wii Remote. 70</p> 71 72<h2>See Also</h2> 73<p> 74<code><a href="./KPADEnableAimingMode.html">KPADEnableAimingMode</a></code>, <code><a href="./KPADDisableAimingMode.html">KPADDisableAimingMode</a></code>, <code><a href="./KPADSetSensorHeight.html">KPADSetSensorHeight</a></code> 75</p> 76 77<H2>Revision History</H2> 78<p> 792006/09/07 Initial version. <br> 80</p> 81 82<hr> 83<P>CONFIDENTIAL</p> 84</BODY> 85</HTML>