00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef VISIBILITY_H
00019 #define VISIBILITY_H
00020
00021 #include <assert.h>
00022 #include <math.h>
00023 #include <stdlib.h>
00024 #include <limits.h>
00025 #include <vispath.h>
00026 #include <pathutil.h>
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00032 typedef COORD **array2;
00033 typedef unsigned char boolean;
00034
00035 #define OBSCURED 0.0
00036 #define EQ(p,q) ((p.x == q.x) && (p.y == q.y))
00037 #define NEQ(p,q) (!EQ(p,q))
00038 #define NIL(p) ((p)0)
00039 #define CW 0
00040 #define CCW 1
00041
00042 struct vconfig_s {
00043 int Npoly;
00044 int N;
00045 Ppoint_t *P;
00046 int *start;
00047 int *next;
00048 int *prev;
00049
00050
00051 array2 vis;
00052 };
00053
00054 extern COORD *ptVis(vconfig_t *, int, Ppoint_t);
00055 extern int directVis(Ppoint_t, int, Ppoint_t, int, vconfig_t *);
00056 extern void visibility(vconfig_t *);
00057 extern int *makePath(Ppoint_t p, int pp, COORD * pvis,
00058 Ppoint_t q, int qp, COORD * qvis,
00059 vconfig_t * conf);
00060
00061 #ifdef __cplusplus
00062 }
00063 #endif
00064 #endif