From 356efaf89afdad141b313767e1a2b89de3c08d0a Mon Sep 17 00:00:00 2001 From: neoraider Date: Sun, 6 Apr 2008 13:29:03 +0000 Subject: zoomedit: Recreated ZoomEdit based on Glademm. --- Line.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 Line.h (limited to 'Line.h') diff --git a/Line.h b/Line.h deleted file mode 100644 index caeb6f7..0000000 --- a/Line.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef LINE_H_ -#define LINE_H_ - -#include "Vertex.h" -#include - - -#define INTERSECTION_ERROR -1 -#define INTERSECTION_NONE 0 -#define INTERSECTION_IDENTICAL 1 -#define INTERSECTION_LINE 2 -#define INTERSECTION_LINE_LINE 2 -#define INTERSECTION_LINE_SEGMENT 3 -#define INTERSECTION_SEGMENT_LINE 6 -#define INTERSECTION_SEGMENT_SEGMENT 7 - -class Line { - private: - Vertex v1, v2; - public: - Line() {} - Line(const Vertex& vertex1, const Vertex& vertex2) : - v1(vertex1), v2(vertex2) {} - Line(float x1, float y1, float x2, float y2) : - v1(x1, y1), v2(x2, y2) {} - - Vertex &getVertex1() {return v1;} - const Vertex &getVertex1() const {return v1;} - void setVertex1(const Vertex &v) {v1 = v;} - - Vertex &getVertex2() {return v2;} - const Vertex &getVertex2() const {return v2;} - void setVertex2(const Vertex &v) {v2 = v;} - - float lengthSq() const {return v1.distanceSq(v2);} - float length() const {return sqrtf(lengthSq());} - - bool contains(const Vertex &v) const; - - int intersects(const Line &l, Vertex *v) const; -}; - - -#endif /*LINE_H_*/ -- cgit v1.2.3