summaryrefslogtreecommitdiffstats
path: root/Polygon.h
diff options
context:
space:
mode:
Diffstat (limited to 'Polygon.h')
-rw-r--r--Polygon.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Polygon.h b/Polygon.h
index 6e36bee..e52206a 100644
--- a/Polygon.h
+++ b/Polygon.h
@@ -5,6 +5,7 @@
#include "Line.h"
#include "Triangle.h"
#include <vector>
+#include <list>
class Polygon : public std::vector<Vertex> {
private:
@@ -17,7 +18,7 @@ class Polygon : public std::vector<Vertex> {
int quadrant(const Vertex &v) const;
- double signedArea() const;
+ float signedArea() const;
Triangle::Direction getDirection() const;
bool isConcave(const Triangle::Direction &dir, const Vertex &v1, const Vertex &v2, const Vertex &v3) const;
@@ -26,14 +27,14 @@ class Polygon : public std::vector<Vertex> {
void doTriangulate(std::vector<Triangle> &triangles) const;
public:
- double area() const;
- double perimeter() const;
+ float area() const;
+ float perimeter() const;
bool contains(const Vertex &v) const;
bool intersects(const Line &l) const;
bool isSimple() const;
- bool simplify(Polygon &polygon) const;
+ bool simplify(std::list<Polygon> &polygons) const;
void triangulate(std::vector<Triangle> &triangles) const;
};