#include "Polygon.h"

namespace ntk {
	Polygon::Polygon(const std::vector<Point>& points)
		: AbstractGeometricItem()
	{
		if (points.size() > 0)
		{
			mStartPoint = points[0];
		}
		mPoints = PointCollection(points);
	}

	const PointCollection& Polygon::getPoints() const
	{
		return mPoints;
	}

	Bounds Polygon::getBounds() const
	{
		return mPoints.getBounds();
	}

	const Point& Polygon::getLocation() const
	{
		return mStartPoint;
	}

	void Polygon::sample(SparseGrid<bool>*) const
	{

	}

	Polygon::Type Polygon::getType() const
	{
		return Polygon::Type::POLYGON;
	}
}