libmove3d
3.13.0
|
00001 00002 #ifndef _ENVIRONMENT_H 00003 #define _ENVIRONMENT_H 00004 00005 #include "p3d.h" 00006 #include "device.h" 00007 00008 /* Structure d'environnement */ 00009 typedef struct env { 00010 char *name; 00011 char *p3d_file_path; /* path to the loaded p3d file */ 00012 char *sce_file_path; /* path to the loaded sce file */ 00013 int num; 00014 int nof_objs; /* total number of objects, both obstacles and robot bodies */ 00015 int no; /* number of obstacles */ 00016 int nr; /* number of robots */ 00017 p3d_obj **o,*ocur; /* the obstacles*/ 00018 p3d_rob **robot, /* array of robots for multi-robot */ 00019 *cur_robot, /* pointer to current robot */ 00020 *active_robot; /* pointer the active robot (this should not change durring env life) */ 00021 p3d_box box; 00022 int INIT; /* environnement initialise graphiquement ou pas */ 00023 double dmax; /* pas de discretisation maximal */ 00024 double object_tolerance; /* real object tolerance (to enlarge objects)*/ 00025 double graphic_dmin; /* pas de discretisation graphique */ 00026 /* struct graph *graphPt; */ 00027 int modif; /* TRUE if environment recently modified, FALSE otherwise */ 00028 int envBoxIsUpToDate; /* SDK: TRUE if the environment box (box field in 00029 this struct) was computed after last modification 00030 of environment, FALSE otherwise */ 00031 int ccIsUpToDate; /* SDK: TRUE if a collision checker was initialized 00032 after last modification of environment, 00033 FALSE otherwise */ 00034 int nof_new_obsts; /* number of added obstacles after latest 00035 (re)initialization or update of collision checker */ 00036 int *new_obsts; /* array of length nof_new_obsts, for each new obstacle 00037 since latest (re)initialization or update of collision 00038 checker we store the ranknumber in list p3d_obj **o 00039 for that obstacle */ 00040 struct p3d_statistics * stat; /* Global Environment statistics ; Commit Jim ; date: 01/10/2008 */ 00041 00043 double background_color[3]; 00044 00046 p3d_vector3 *collisionCloud; 00047 int cloudSize; 00048 } p3d_env,*pp3d_env; 00049 00050 #endif /* #ifndef _ENVIRONMENT_H */ 00051 00052