Project

General

Profile

Revision 1042

Added by Ben Poole about 15 years ago

started working on integrating with rangefinders

View differences:

world.h
30 30
#define CREATE(id, ...) (create_func[id](__VA_ARGS__))
31 31
#define PBBOX(b) {printf("(%g,%g) --> (%g, %g)\n",(b).p1.x,(b).p1.y,(b).p2.x,\
32 32
						  (b).p2.y);}
33
#define PRAY(v) {printf("(%g,%g), %g\n", (v).p.x, (v).p.y,(v).d);}
33 34

  
34 35
#define MAX_OBJS 100
35 36
#define BUF_SIZE 512
......
73 74
double collide_circle(ray_t *ray, object_t *obj);
74 75
double collide_rect(ray_t *ray, object_t *obj);
75 76
double collide_poly(ray_t *ray, object_t *obj);
77
double collide_world(ray_t *ray);
78

  
76 79
/*  Array of function pointers to the specific collide functions.
77 80
 *  Must be listed in the same order as IDs */
78 81
extern double (*collide_func[NUM_SHAPES])(ray_t *ray, object_t *obj);

Also available in: Unified diff