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
00034 #define OBSCURED 0.0
00035 #define EQ(p,q) ((p.x == q.x) && (p.y == q.y))
00036 #define NEQ(p,q) (!EQ(p,q))
00037 #define NIL(p) ((p)0)
00038 #define CW 0
00039 #define CCW 1
00040
00041 struct vconfig_s {
00042 int Npoly;
00043 int N;
00044 Ppoint_t *P;
00045 int *start;
00046 int *next;
00047 int *prev;
00048
00049
00050 array2 vis;
00051 };
00052
00053 extern COORD *ptVis(vconfig_t *, int, Ppoint_t);
00054 extern int directVis(Ppoint_t, int, Ppoint_t, int, vconfig_t *);
00055 extern void visibility(vconfig_t *);
00056 extern int *makePath(Ppoint_t p, int pp, COORD * pvis,
00057 Ppoint_t q, int qp, COORD * qvis,
00058 vconfig_t * conf);
00059
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063 #endif