#include
#include
#include
#include "definitions.h"
#include "wiiuse_internal.h"
#include "ir.h"
#include "dynamics.h"
Functions |
|
void | calculate_orientation (struct accel_t *ac, struct vec3b_t *accel, struct orient_t *orient, int smooth) |
Calculate the roll, pitch, yaw. |
|
void | calculate_gforce (struct accel_t *ac, struct vec3b_t *accel, struct gforce_t *gforce) |
Calculate the gravity forces on each axis. |
|
void | calc_joystick_state (struct joystick_t *js, float x, float y) |
Calculate the angle and magnitude of a joystick. |
|
void | apply_smoothing (struct accel_t *ac, struct orient_t *orient, int type) |
The file includes functions that handle the dynamics of the wiimote. Such dynamics include orientation and motion sensing.
void calc_joystick_state | ( | struct joystick_t * | js, | |
float | x, | |||
float | y | |||
) |
Calculate the angle and magnitude of a joystick.
js | [out] Pointer to a joystick_t structure. | |
x | The raw x-axis value. | |
y | The raw y-axis value. |
void calculate_orientation | ( | struct accel_t * | ac, | |
struct vec3b_t * | accel, | |||
struct orient_t * | orient, | |||
int | smooth | |||
) |
Calculate the roll, pitch, yaw.
ac | An accelerometer (accel_t) structure. | |
accel | [in] Pointer to a vec3b_t structure that holds the raw acceleration data. | |
orient | [out] Pointer to a orient_t structure that will hold the orientation data. | |
rorient | [out] Pointer to a orient_t structure that will hold the non-smoothed orientation data. | |
smooth | If smoothing should be performed on the angles calculated. 1 to enable, 0 to disable. |