summaryrefslogtreecommitdiffstats
path: root/Polygon.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2008-04-06 15:29:03 +0200
committerneoraider <devnull@localhost>2008-04-06 15:29:03 +0200
commit356efaf89afdad141b313767e1a2b89de3c08d0a (patch)
tree37edb2a0fc0ea15f4f60e45ed411cbea7b4c12c5 /Polygon.h
parent258eb984bafe0f667d1e76de61c8afaa23f39ef4 (diff)
downloadzoomedit-356efaf89afdad141b313767e1a2b89de3c08d0a.tar
zoomedit-356efaf89afdad141b313767e1a2b89de3c08d0a.zip
zoomedit: Recreated ZoomEdit based on Glademm.
Diffstat (limited to 'Polygon.h')
-rw-r--r--Polygon.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/Polygon.h b/Polygon.h
deleted file mode 100644
index 33ba873..0000000
--- a/Polygon.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef POLYGON_H_
-#define POLYGON_H_
-
-#include "Vertex.h"
-#include "Line.h"
-#include "Triangle.h"
-#include <vector>
-#include <list>
-
-class Polygon : public std::vector<Vertex> {
- private:
- struct Intersection {
- size_t va1, va2, vb1, vb2;
- Vertex v;
- };
-
- typedef Triangle::Direction Direction;
-
- int quadrant(const Vertex &v) const;
-
- float signedArea() const;
-
- bool isConcave(const Triangle::Direction &dir, const Vertex &v1, const Vertex &v2, const Vertex &v3) const;
-
- bool intersections(std::vector<Intersection> *intersections = NULL) const;
-
- void doTriangulate(std::vector<Triangle> &triangles) const;
- public:
- float area() const;
- float perimeter() const;
-
- bool contains(const Vertex &v) const;
- bool intersects(const Line &l) const;
-
- Triangle::Direction getDirection() const;
-
- bool isSimple() const;
- bool simplify(std::list<Polygon> &polygons) const;
-
- void triangulate(std::vector<Triangle> &triangles) const;
-};
-
-#endif /*POLYGON_H_*/