root / branches / simulator / projects / simulator / simulator / core / world.h @ 1021
History | View | Annotate | Download (637 Bytes)
1 |
/**
|
---|---|
2 |
* @file world.h
|
3 |
* @author Colony Project
|
4 |
*
|
5 |
* @brief Manages simulated robots.
|
6 |
*
|
7 |
* Contains structures and function prototypes used
|
8 |
* for managing robots in the simulator.
|
9 |
**/
|
10 |
|
11 |
#ifndef __WORLD_H__
|
12 |
#define __WORLD_H__
|
13 |
|
14 |
#define ID_RECTANGLE 1 |
15 |
#define ID_CIRCLE 2 |
16 |
|
17 |
typedef struct { |
18 |
double x;
|
19 |
double y;
|
20 |
} point_t; |
21 |
|
22 |
typedef struct { |
23 |
point_t p1; /* Lower left point */
|
24 |
point_t p2; /* Upper right point */
|
25 |
} bbox_t; |
26 |
|
27 |
typedef struct { |
28 |
int id;
|
29 |
bbox_t *bbox; |
30 |
void *props; /* shape-specific properties */ |
31 |
} object_t; |
32 |
|
33 |
typedef struct { |
34 |
int num_objs;
|
35 |
object_t *objs; |
36 |
bbox world; |
37 |
} world_t; |
38 |
|
39 |
#endif
|
40 |
|