Class CPolygon
Defined in File CPolygon.h
Inheritance Relationships
Base Types
public mrpt::serialization::CSerializablepublic mrpt::math::TPolygon2D(Class TPolygon2D)
Class Documentation
-
class CPolygon : public mrpt::serialization::CSerializable, public mrpt::math::TPolygon2D
A wrapper of a TPolygon2D class, implementing CSerializable.
Public Functions
-
CPolygon() = default
Default constructor (empty polygon, 0 vertices)
-
inline void add_vertex(double x, double y)
Add a new vertex to polygon
-
inline double get_vertex_x(size_t i) const
Methods for accessing the vertices
See also
verticesCount
-
inline double get_vertex_y(size_t i) const
-
void set_vertices(const std::vector<double> &x, const std::vector<double> &y)
Set all vertices at once.
-
void set_vertices(size_t nVertices, const double *xs, const double *ys)
Set all vertices at once. Please use the std::vector version whenever possible unless efficiency is really an issue
-
void set_vertices(size_t nVertices, const float *xs, const float *ys)
Set all vertices at once. Please use the std::vector version whenever possible unless efficiency is really an issue
-
void get_vertices(std::vector<double> &x, std::vector<double> &y) const
Get all vertices at once
-
CPolygon() = default