15 #ifndef RECOTOOL_POLYGON2D_H 16 #define RECOTOOL_POLYGON2D_H 35 std::vector< std::pair<float,float> >
vertices;
42 unsigned int Size()
const {
return vertices.size(); }
43 const std::pair<float,float>&
Point(
unsigned int p)
const;
44 std::pair<float,float>
Project(
const std::pair<float,float>&,
float)
const;
50 bool PointInside(
const std::pair<float,float> &point)
const;
std::pair< float, float > Project(const std::pair< float, float > &, float) const
bool Contained(const Polygon2D &poly2) const
const std::pair< float, float > & Point(unsigned int p) const
unsigned int Size() const
Create Intersection Polygon.
std::vector< std::pair< float, float > > vertices
Polygon2D(const std::vector< std::pair< float, float > > &points)
bool PolyOverlapSegments(const Polygon2D &poly2) const
bool Overlap(float slope, const Polygon2D &poly2, const std::pair< float, float > &origin) const
bool PointInside(const std::pair< float, float > &point) const
bool PolyOverlap(const Polygon2D &poly2) const
void UntanglePolygon()
check if poly2 is inside poly1
constexpr Point origin()
Returns a origin position with a point of the specified type.