Go to the documentation of this file.
55 void setAllVertices(
const std::vector<double> &x,
const std::vector<double> &y );
57 void setAllVertices(
size_t nVertices,
const double *xs,
const double *ys );
59 void setAllVertices(
size_t nVertices,
const float *xs,
const float *ys );
62 void getAllVertices( std::vector<double> &x, std::vector<double> &y )
const;
65 void Clear() { TPolygon2D::clear(); }
void AddVertex(double x, double y)
Add a new vertex to polygon:
bool contains(const TPoint2D &point) const
Check whether a point is inside the polygon.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
size_t size(const MATRIXLIKE &m, int dim)
double GetVertex_y(size_t i) const
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool PointIntoPolygon(double x, double y) const
Check if a point is inside the polygon:
double GetVertex_x(size_t i) const
Methods for accessing the vertexs:
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
void Clear()
Clear the polygon, erasing all vertexs.
size_t verticesCount() const
Returns the vertices count in the polygon:
2D polygon, inheriting from std::vector<TPoint2D>.
The virtual base class which provides a unified interface for all persistent objects in MRPT.
A wrapper of a TPolygon2D class, implementing CSerializable.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CPolygon()
Constructor cx and cy are the "central" point coordinates (laser sensor location if applicable) This ...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019 | | |