summaryrefslogtreecommitdiffstats
path: root/Polygon.cpp
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-11-01 00:03:04 +0100
committerneoraider <devnull@localhost>2007-11-01 00:03:04 +0100
commitb478ad79508f5a06e8c0fc5937b28585c747fb04 (patch)
tree62253b031732435881d0611eca670086adc57d36 /Polygon.cpp
parentbc2b34ead69f7fa1ef997308e0cff6123179f40e (diff)
downloadzoomedit-b478ad79508f5a06e8c0fc5937b28585c747fb04.tar
zoomedit-b478ad79508f5a06e8c0fc5937b28585c747fb04.zip
zoomedit: Speichern jetzt m?glich.
Diffstat (limited to 'Polygon.cpp')
-rw-r--r--Polygon.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Polygon.cpp b/Polygon.cpp
index 8b32bb4..650fbb0 100644
--- a/Polygon.cpp
+++ b/Polygon.cpp
@@ -17,12 +17,6 @@ float Polygon::signedArea() const {
return d/2;
}
-Polygon::Direction Polygon::getDirection() const {
- float area = signedArea();
-
- return (area > 0) ? Triangle::CW : (area < 0) ? Triangle::CCW : Triangle::UNKNOWN;
-}
-
float Polygon::area() const {
return fabsf(signedArea());
}
@@ -170,6 +164,12 @@ bool Polygon::intersections(std::vector<Intersection> *intersections) const {
return ret;
}
+Polygon::Direction Polygon::getDirection() const {
+ float area = signedArea();
+
+ return (area > 0) ? Triangle::CW : (area < 0) ? Triangle::CCW : Triangle::UNKNOWN;
+}
+
bool Polygon::isSimple() const {
return !intersections();
}