6 #include <spurs/types.h> 10 #define EXTERNAL_PORT_DATA_SIZE 32 12 #define GEM_TRACKING_POSITION_TRACKED 1 13 #define GEM_TRACKING_VISIBLE 2 15 #define STATE_CURRENT_TIME 0 16 #define STATE_LATEST_IMAGE_TIME 1 17 #define STATE_SPECIFY_TIME 2 19 #define GEM_AUTO_WHITE_BALANCE 1 20 #define GEM_GAMMA_BOOST 2 21 #define GEM_COMBINE_PREVIOUS_INPUT_FRAME 4 22 #define GEM_FILTER_OUTLIER_PIXELS 8 24 #define GEM_INERTIAL_LATEST 0 25 #define GEM_INERTIAL_PREVIOUS 1 26 #define GEM_INERTIAL_NEXT 2 35 GEM_NO_VIDEO_OUTPUT=1,
42 GEM_BAYER_RESTORED_RGGB,
43 GEM_BAYER_RESTORED_RASTERIZED
44 } gemVideoConvertFormatEnum;
53 unsigned int BTN_LEFT : 1;
54 unsigned int BTN_DOWN : 1;
55 unsigned int BTN_RIGHT : 1;
56 unsigned int BTN_UP : 1;
57 unsigned int BTN_START : 1;
58 unsigned int BTN_R3 : 1;
59 unsigned int BTN_L3 : 1;
60 unsigned int BTN_SELECT : 1;
63 unsigned int BTN_SQUARE : 1;
64 unsigned int BTN_CROSS : 1;
65 unsigned int BTN_CIRCLE : 1;
66 unsigned int BTN_TRIANGLE : 1;
67 unsigned int BTN_R1 : 1;
68 unsigned int BTN_L1 : 1;
69 unsigned int BTN_R2 : 1;
70 unsigned int BTN_L2 : 1;
74 unsigned int ANA_R_H : 16;
75 unsigned int ANA_R_V : 16;
76 unsigned int ANA_L_H : 16;
77 unsigned int ANA_L_V : 16;
96 vec_float4 handle_pos;
97 vec_float4 handle_vel;
98 vec_float4 handle_accel;
103 f32 camera_pitch_angle;
111 void * memory ATTRIBUTE_PRXPTR;
112 Spurs *spurs ATTRIBUTE_PRXPTR;
113 u8 spu_priorities[8];
122 f32 pitch_angle_estimate;
126 system_time_t frame_time;
142 u32 status[MAX_MOVES];
149 gemVideoConvertFormatEnum format;
155 void *buffer_memory ATTRIBUTE_PRXPTR;
156 void *video_data_out ATTRIBUTE_PRXPTR;
162 vec_float4 accelerometer;
164 vec_float4 accelerometer_bias;
165 vec_float4 gyro_bias;
173 s32 gemGetEnvironmentLightingColor(f32* r, f32* g, f32* b);
174 s32 gemUpdateStart(
const void* camera_frame, system_time_t timestamp);
176 s32 gemGetTrackerHue(u32 num, u32* hue);
177 s32 gemConvertVideoFinish();
178 s32 gemEnableMagnetometer(u32 num, s32 enable);
179 s32 gemGetRGB(u32 num, f32* r, f32* g, f32* b);
180 s32 gemWriteExternalPort(u32 num, u8 data[EXTERNAL_PORT_DATA_SIZE]);
183 s32 gemGetAllTrackableHues(u8* hues);
184 s32 gemGetMemorySize(s32 max);
185 s32 gemUpdateFinish();
186 s32 gemEnableCameraPitchAngleCorrection(s32 enable);
188 s32 gemGetRumble(u32 num, u8* intensity);
189 s32 gemSetRumble(u32 num, u8 intensity);
191 s32 gemGetState(u32 num, u32 timeflag, system_time_t time,
gemState* state);
193 s32 gemGetAccelerometerPositionInDevice(u32 num, vec_float4* pos);
194 s32 gemConvertVideoStart(
const void* frame);
196 s32 gemFilterState(u32 num, u32 enable);
197 s32 gemSetYaw(u32 num, vec_float4 zdir);
200 s32 gemTrackHues(
const u32* req_hues, u32* res_hues);
204 s32 gemClearStatusFlags(u32 num, u64 mask);
208 s32 gemPrepareCamera(s32 maxexposure, f32 quality);
210 s32 gemCalibrate(u32 num);
212 s32 gemGetHuePixels(
const void* frame, u32 hue, u8* pixels);
214 s32 gemHSVtoRGB(f32 h, f32 s, f32 v, f32* r, f32* g, f32* b);
215 s32 gemForceRGB(u32 num, f32 r, f32 g, f32 b);
216 s32 gemGetInertialState(u32 num, u32 flag, system_time_t time,
gemInertialState* inertial);
217 s32 gemReset(u32 num);
219 s32 gemInvalidateCalibration(u32 num);
220 s32 gemIsTrackableHue(u32 hue);
221 s32 gemGetStatusFlags(u32 num, u64* flags);