AMCAX Kernel 1.0.0.0
|
The polygon in 2D. More...
#include <math/Polygon2.hpp>
Public Member Functions | |
AMCAX_API | Polygon2 (int nv) |
Construct with a specified number of vertices. More... | |
AMCAX_API | Polygon2 (const std::vector< Point2 > &verts) |
Construct from a vector of vertices. More... | |
AMCAX_API double | Deflection () const |
Get the deflection. More... | |
AMCAX_API void | SetDeflection (double def) |
Set the deflection. More... | |
AMCAX_API int | NVertices () const |
Get the number of vertices. More... | |
AMCAX_API const std::vector< Point2 > & | Vertices () const |
Get the vertices. More... | |
AMCAX_API std::vector< Point2 > & | Vertices () |
Get the vertices. More... | |
Friends | |
AMCAX_API friend std::ostream & | operator<< (std::ostream &os, const Polygon2 &poly) |
Write the polygon. More... | |
AMCAX_API friend std::istream & | operator>> (std::istream &is, Polygon2 &poly) |
Read the polygon. More... | |
The polygon in 2D.
If the polygon is closed, the first point and the last point coincide.
|
explicit |
Construct with a specified number of vertices.
nv | The number of vertices |
Construct from a vector of vertices.
verts | The vertices |
AMCAX_API double AMCAX::Polygon2::Deflection | ( | ) | const |
Get the deflection.
AMCAX_API int AMCAX::Polygon2::NVertices | ( | ) | const |
Get the number of vertices.
AMCAX_API void AMCAX::Polygon2::SetDeflection | ( | double | def | ) |
Set the deflection.
def | The deflection |
Get the vertices.
Get the vertices.
Write the polygon.
os | The output stream |
poly | The polygon |
Read the polygon.
is | The input stream |
poly | The polygon |