worked on floorplan (v2)

worked on grid-generation (v2)
new helper methods for geometry
new test cases
This commit is contained in:
2016-07-13 19:11:18 +02:00
parent cc21cbb0ea
commit 34e52cd7f0
26 changed files with 2083 additions and 272 deletions

View File

@@ -38,10 +38,14 @@ struct Point2 {
bool operator == (const Point2& o) const {return x==o.x && y==o.y;}
bool operator != (const Point2& o) const {return x!=o.x || y!=o.y;}
bool operator != (const Point2& o) const {return x!=o.x || y!=o.y;}
Point2 perpendicular() const {return Point2(-y, x);}
Point2 perpendicular() const {return Point2(-y, x);}
float length() const {return std::sqrt(x*x + y*y);}
Point2 normalized() const {return (*this) / length();}
/** get the distance between this point and the other one */
float getDistance(const Point2& o) const {