DASSERT(0 < points.size());
createBindingBox();
+ centerPosition();
}
Polygon::~Polygon()
{
/// ***** Private Class Methods *****
void Polygon::createBindingBox()
{
+ DASSERT(0 < points.size());
+
+ maxP = points.at(0);
+ minP = points.at(0);
+
+ for(unsigned int i=1; i<points.size(); i++)
+ {
+ if(points[i].x < minP.x) minP.x = points[i].x;
+ else if(points[i].x > maxP.x) maxP.x = points[i].x;
+
+ if(points[i].y < minP.y) minP.y = points[i].y;
+ else if(points[i].y > maxP.y) maxP.y = points[i].y;
+ }
+}
+
+void Polygon::centerPosition()
+{
// TODO
}