#include <revolution/kpad.h>
typedef struct Vec2{
f32 x;
f32 y;
} Vec2;
typedef struct Rect {
f32 left;
f32 top;
f32 right;
f32 bottom;
} Rect;
void KPADGetProjectionPos( Vec2 *dst, const Vec2 *src, const Rect *projRect, f32 viRatio );
| dst | Pointer to the Vec2-type variable that stores the coordinates (in projRect) after conversion. |
|---|---|
| src | Pointer to the Vec2-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). |
| projRect | Rectangle in the projection coordinate system. |
| viRatio | Value of fb_width / vi_width. |
None.
Converts 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.
KPADEnableAimingMode, KPADDisableAimingMode, KPADSetSensorHeight
2008/07/08 Added explanations on normalized coordinates.
2006/09/07 Initial version.
CONFIDENTIAL