Class Polygon2D represents a polygon.
More...
#include <primitives.h>
Detailed Description
Class Polygon2D represents a polygon.
Constructor & Destructor Documentation
| crp::Polygon2D::Polygon2D |
( |
double |
x = 0.0, |
|
|
double |
y = 0.0 |
|
) |
| [inline] |
Creates a new empty polygon.
- Parameters:
-
| x | X-Coordinate |
| y | Y-Coordinate |
| r | Radius |
| virtual crp::Polygon2D::~Polygon2D |
( |
| ) |
[inline, virtual] |
| crp::Polygon2D::Polygon2D |
( |
const Polygon2D & |
primitive | ) |
[inline] |
Copy constructor.
- Parameters:
-
| primitive | Primitive to copy |
Member Function Documentation
| void crp::Polygon2D::add_corner |
( |
Pixel |
corner | ) |
[inline] |
Add the corners to the polygon.
- Parameters:
-
| corner | New corner of the polygon |
| void crp::Polygon2D::clean_corners |
( |
| ) |
[inline] |
| virtual Primitive2D* crp::Polygon2D::get_copy |
( |
| ) |
[inline, virtual] |
Copies the current primitive.
- Returns:
- New copy of the current primitive
Implements crp::Primitive2D.
| std::vector<Pixel>& crp::Polygon2D::get_corners |
( |
| ) |
[inline] |
Returns the corners of the polygon.
- Returns:
- Vector of corners
| virtual Type crp::Polygon2D::get_type |
( |
| ) |
const [inline, virtual] |
Type of the primitive.
- Returns:
- Type of the primitive
Implements crp::Primitive2D.
Assignment operator.
- Parameters:
-
| void crp::Polygon2D::set_corners |
( |
std::vector< Pixel > & |
corners | ) |
[inline] |
Sets the corners of the polygon.
- Parameters:
-
Field Documentation
The documentation for this class was generated from the following file: