17 #ifndef GV_GEOMPROCS_H
18 #define GV_GEOMPROCS_H
29 #define extern __declspec(dllexport)
31 #define extern __declspec(dllimport)
56 #define inline __inline
60 static inline point pointof(
int x,
int y)
69 static inline pointf pointfof(
double x,
double y)
78 static inline box boxof(
int llx,
int lly,
int urx,
int ury)
82 b.
LL.
x = llx, b.
LL.
y = lly;
83 b.
UR.
x = urx, b.
UR.
y = ury;
87 static inline boxf boxfof(
double llx,
double lly,
double urx,
double ury)
91 b.
LL.
x = llx, b.
LL.
y = lly;
92 b.
UR.
x = urx, b.
UR.
y = ury;
137 r.
x = (p.
x + q.
x) / 2;
138 r.
y = (p.
y + q.
y) / 2;
146 r.
x = (p.
x + q.
x) / 2.;
147 r.
y = (p.
y + q.
y) / 2.;
155 r.
x = p.
x + t * (q.
x - p.
x);
156 r.
y = p.
y + t * (q.
y - p.
y);
202 static inline box box_intersect(
box b0,
box b1)
226 static inline int box_overlap(
box b0,
box b1)
231 static inline int boxf_overlap(
boxf b0,
boxf b1)
236 static inline int box_contains(
box b0,
box b1)
241 static inline int boxf_contains(
boxf b0,
boxf b1)
box flip_rec_box(box b, point p)
pointf cwrotatepf(pointf p, int cwrot)
boxf flip_rec_boxf(boxf b, pointf p)
int lineToBox(pointf p, pointf q, boxf b)
pointf ccwrotatepf(pointf p, int ccwrot)
point cwrotatep(point p, int cwrot)
void rect2poly(pointf *p)
boxf mkboxf(pointf p, pointf q)
int line_intersect(pointf a, pointf b, pointf c, pointf d, pointf *p)
point ccwrotatep(point p, int ccwrot)
box mkbox(point p, point q)
double ptToLine2(pointf a, pointf b, pointf p)