Ocular Engine

#include <Polygon2D.hpp>
Public Member Functions  
Polygon2D (std::vector< Point2f > const &points)  
Polygon2D (Point2f const *, uint32_t numPoints)  
Point2f  getCenter () 
float  getSignedArea () 
Helper class that can perform common actions on a polygon.
The points are expected to be ordered as the occur along the polygon's perimeter and form a regular polygon.
Point2f Ocular::Math::Polygon2D::getCenter  (  ) 
Calculates the center (centroid) of the polygon.
float Ocular::Math::Polygon2D::getSignedArea  (  ) 
Calculates and returns the signed area of the polygon.
Calculates and returns the signed area of the polygon.