*/
#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()
void Polygon::draw() const
{
- // TODO
+ graphics::drawPolygon(points);
}
/// ***** Private Class Methods *****