From 96e9d04527dc17a2a4f8c2f7034c1c356ed5186e Mon Sep 17 00:00:00 2001 From: neoraider Date: Sun, 16 Sep 2007 20:59:04 +0000 Subject: zoomedit: C++ized Line & Rectangle --- geometry.h | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'geometry.h') diff --git a/geometry.h b/geometry.h index cefd9a3..633a5b4 100644 --- a/geometry.h +++ b/geometry.h @@ -2,33 +2,10 @@ #define GEOMETRY_H_ -#include "Vertex.h" #include "Polygon.h" -#include "Line.h" -#include +#include "Rectangle.h" -#define EDGE_NONE 0 -#define EDGE_LEFT (1<<0) -#define EDGE_RIGHT (1<<1) -#define EDGE_TOP (1<<2) -#define EDGE_BOTTOM (1<<3) -#define EDGE_ALL (EDGE_LEFT|EDGE_RIGHT|EDGE_TOP|EDGE_BOTTOM) - - - -typedef struct _RECTANGLE { - double x, y, width, height; -} RECTANGLE; - - -int vertexOnLine(const Vertex *v, const LINE *l); -int vertexInRect(const Vertex *v, const RECTANGLE *rect); - - -int lineRectIntersection(const LINE *l, const RECTANGLE *rect, int edge, Vertex *v); -int lineRectIntersections(const LINE *line, const RECTANGLE *rect, int edge, Vertex *v1, Vertex *v2); -//gboolean linePolygonIntersection(const LINE *l, const POLYGON *p); -void simplifyPolygon(const Polygon *in, const RECTANGLE *rect, Polygon *out); +void simplifyPolygon(const Polygon *in, const Rectangle *rect, Polygon *out); #endif /*GEOMETRY_H_*/ -- cgit v1.2.3