00001 #ifndef COMMAND_SUB_H 00002 #define COMMAND_SUB_H 00003 00004 #include "paddle.h" 00005 00006 /* on item structure */ 00007 typedef struct { 00008 double pos[2]; 00009 int onpaddle; 00010 } Item; 00011 00012 /* list of items */ 00013 typedef struct { 00014 int itemnum; 00015 Item item[256]; 00016 } ItemList; 00017 00018 /* item which is on the paddle */ 00019 typedef struct { 00020 int item; 00021 double angle; 00022 double x, y; 00023 } PaddleItemInfo; 00024 00025 /* shaking gesture to remove a pattern */ 00026 int check_shake ( double paddleTrans[3][4], int f ); 00027 00028 /* inclining gesture to put an object on the ground*/ 00029 int check_incline ( double paddleTrans[3][4], double baseTrans[3][4], double *angle ); 00030 00031 /* picking gesture to take an object from the ground*/ 00032 int check_pickup(double card_trans[3][4], double base_trans[3][4], ItemList* itlist, double* angle); 00033 00034 #endif