Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef __PERCORSO_H__
#define __PERCORSO_H__
#define PATH_ELEM_ARC 1
#define PATH_ELEM_LINE 2
#define CLOCKWISE -1
#define COUNTERCLOCK 1
typedef struct point {
double x,y;
} POINT;
typedef struct path_elem {
int type;
void *data;
struct path_elem *next;
} PATH_ELEM;
typedef struct pd_arc {
POINT c;
double r;
double alpha1;
double alpha2;
int dir;
} PATH_DATA_ARC;
typedef struct pd_line {
POINT p1;
POINT p2;
double alpha;
int dir;
} PATH_DATA_LINE;
PATH_ELEM *find_closest_elem(POINT *p, double radius);
double get_distance_from_elem(POINT *p, PATH_ELEM *e);
double get_angle_from_elem(POINT *p, PATH_ELEM *e);
/* ritorna:
1 : curva a sinistra
-1 : curva a destra
0 : dritto
*/
int is_curve(PATH_ELEM *e);
void Init_All_Path();
#endif