diff options
author | neoraider <devnull@localhost> | 2007-11-01 00:03:04 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-11-01 00:03:04 +0100 |
commit | b478ad79508f5a06e8c0fc5937b28585c747fb04 (patch) | |
tree | 62253b031732435881d0611eca670086adc57d36 /Polygon.cpp | |
parent | bc2b34ead69f7fa1ef997308e0cff6123179f40e (diff) | |
download | zoomedit-b478ad79508f5a06e8c0fc5937b28585c747fb04.tar zoomedit-b478ad79508f5a06e8c0fc5937b28585c747fb04.zip |
zoomedit: Speichern jetzt m?glich.
Diffstat (limited to 'Polygon.cpp')
-rw-r--r-- | Polygon.cpp | 12 |
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(); } |