/* table.h (C) 1997 Mark A. Livingston */ /* Any non-commercial use of this code is permitted so long as */ /* the above copyright line appears in the file. Please contact */ /* the author regarding permission for commercial use. */ /* outcodes for location relative to the table */ #define CTR 0x00 #define MIN_X 0x01 #define MAX_X 0x02 #define MIN_Y 0x04 #define MAX_Y 0x08 #define MIN_Z 0x10 #define MAX_Z 0x20 #define OUTCODE(p,n,x) ( \ ( ( p[Q_X] < n[Q_X] ) ? MIN_X : ( ( p[Q_X] > x[Q_X] ) ? MAX_X : CTR ) ) | \ ( ( p[Q_Y] < n[Q_Y] ) ? MIN_Y : ( ( p[Q_Y] > x[Q_Y] ) ? MAX_Y : CTR ) ) | \ ( ( p[Q_Z] < n[Q_Z] ) ? MIN_Z : ( ( p[Q_Z] > x[Q_Z] ) ? MAX_Z : CTR ) ) ) /* Function declarations */ int tabReadTable( char *fname, q_vec_type minRetVal, q_vec_type maxRetVal ); int tabCorrectReading( q_xyz_quat_type *reading ); int tabCreateDisplayLists( q_vec_type **g, q_vec_type **v, q_vec_type *a[3] ); void tabAnalyzeRes( void );