#include <Polygon2D.h>
Public Member Functions | |
bool | clipLine (Line2D &lineToClip) const |
void | clipLines (std::vector< Line2D > &linesToClip) const |
std::vector< Line2D > | getLines () const |
std::vector< Point2D > | getPoints () const |
Polygon2D () | |
Polygon2D (std::vector< Point2D > &points) | |
~Polygon2D () | |
Private Attributes | |
std::vector< Point2D > | m_Points |
Definition at line 25 of file Polygon2D.h.
Polygon2D::Polygon2D | ( | ) | [inline] |
Definition at line 29 of file Polygon2D.h.
Polygon2D::Polygon2D | ( | std::vector< Point2D > & | points | ) | [inline] |
Creates a new polygon The points must be given counterclockwise.
Definition at line 35 of file Polygon2D.h.
Polygon2D::~Polygon2D | ( | ) | [inline] |
Definition at line 40 of file Polygon2D.h.
bool Polygon2D::clipLine | ( | Line2D & | lineToClip | ) | const |
Clips a line to this polygon. Implementation of Cyrus-Beck. The polygon must be difined counterclockwise.
lineToClip | The lines to clip. |
void Polygon2D::clipLines | ( | std::vector< Line2D > & | linesToClip | ) | const |
Clips lines to this polygon. Not tested!!! Implementation of Cyrus-Beck. The polygon must be difined counterclockwise.
linesToClip | The lines to clip. |
std::vector<Line2D> Polygon2D::getLines | ( | ) | const |
Returns the line representation of the polygon.
std::vector<Point2D> Polygon2D::getPoints | ( | ) | const [inline] |
Definition at line 42 of file Polygon2D.h.
std::vector<Point2D> Polygon2D::m_Points [private] |
Definition at line 71 of file Polygon2D.h.