class mrpt::math::TPolygon2D

2D polygon, inheriting from std::vector<TPoint2D>.

See also:

TPolygon3D, TSegment2D, TLine2D, TPoint2D, CPolygon

#include <mrpt/math/TPolygon2D.h>

class TPolygon2D: public std::vector< TPoint2D >
{
public:
    // construction

    TPolygon2D();
    TPolygon2D(size_t N);
    TPolygon2D(const std::vector<TPoint2D>& v);
    TPolygon2D(const TPolygon3D& p);
};

// direct descendants

class CPolygon;

Construction

TPolygon2D()

Default constructor.

TPolygon2D(size_t N)

Constructor for a given number of vertices, intializing them as garbage.

TPolygon2D(const std::vector<TPoint2D>& v)

Implicit constructor from a vector of 2D points.

TPolygon2D(const TPolygon3D& p)

Constructor from a 3D object.