hacks that make a polygon draw
[physics.git] / src / Entities / Polygon.cpp
index 42cfbdb..bf2fb00 100644 (file)
  */
 
 #include "Polygon.h"
+#include "debug.h"
 
 #include "Vector2.h"
 
+#include "graphics/graphics.h"
+
 
 /// ***** Constructors/Destructors *****
 
-Polygon::Polygon(const Vector2& pos, vector<Vector2> points)
-    : PhysicsEntity(pos), points(points)
+Polygon::Polygon(const vector<Vector2>& points)
+    : PhysicsEntity(Vector2(0,0)), points(points)
 {
+    DASSERT(0 < points.size());
+
     createBindingBox();
 }
 Polygon::~Polygon()
@@ -36,7 +41,7 @@ Polygon::~Polygon()
 
 void Polygon::draw() const
 {
-    // TODO
+    graphics::drawPolygon(points);
 }
 
 /// ***** Private Class Methods *****