165 if (
this == &obj)
return *
this;
235 const std::vector<TObject2D>& objs, std::vector<TPoint2D>& pnts);
240 const std::vector<TObject2D>& objs, std::vector<TSegment2D>& sgms);
245 const std::vector<TObject2D>& objs, std::vector<TLine2D>& lins);
250 const std::vector<TObject2D>& objs, std::vector<TPolygon2D>& polys);
256 const std::vector<TObject2D>& objs, std::vector<TPoint2D>& pnts,
257 std::vector<TObject2D>& remainder);
263 const std::vector<TObject2D>& objs, std::vector<TSegment2D>& sgms,
264 std::vector<TObject2D>& remainder);
270 const std::vector<TObject2D>& objs, std::vector<TLine2D>& lins,
271 std::vector<TObject2D>& remainder);
277 const std::vector<TObject2D>& objs, std::vector<TPolygon2D>& polys,
278 std::vector<TObject2D>& remainder);
bool getPoint(TPoint2D &p) const
Gets the content as a point, returning false if the type is inadequate.
bool getPolygon(TPolygon2D &p) const
Gets the content as a polygon, returning false if the type is inadequate.
unsigned char getType() const
Gets content type.
bool isPolygon() const
Checks whether content is a polygon.
static constexpr unsigned char GEOMETRIC_TYPE_POLYGON
Object type identifier for TPolygon2D or TPolygon3D.
TObject2D(const TPoint2D &p)
Implicit constructor from point.
static void getLines(const std::vector< TObject2D > &objs, std::vector< TLine2D > &lins)
Static method to retrieve all the lines in a vector of TObject2D.
void operator=(const TPoint2D &p)
Assign a point to this object.
void operator=(const TSegment2D &s)
Assign a segment to this object.
Standard type for storing any lightweight 2D type.
bool getLine(TLine2D &r) const
Gets the content as a line, returning false if the type is inadequate.
TObject2D()
Implicit constructor from polygon.
static constexpr unsigned char GEOMETRIC_TYPE_POINT
Object type identifier for TPoint2D or TPoint3D.
Standard object for storing any 3D lightweight object.
bool getSegment(TSegment2D &s) const
Gets the content as a segment, returning false if the type is inadequate.
static void getSegments(const std::vector< TObject2D > &objs, std::vector< TSegment2D > &sgms)
Static method to retrieve all the segments in a vector of TObject2D.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
This base provides a set of functions for maths stuff.
2D segment, consisting of two points.
struct mrpt::math::TObject2D::tobject2d_data_t data
TObject2D(const TLine2D &r)
Implicit constructor from line.
tobject2d_data_t()=default
void generate3DObject(TObject3D &obj) const
Project into 3D space.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
unsigned char type
Object type identifier.
bool isSegment() const
Checks whether content is a segment.
TObject2D(const TObject2D &obj)
Constructor from another TObject2D.
TObject2D & operator=(const TObject2D &obj)
Assign another TObject2D.
static constexpr unsigned char GEOMETRIC_TYPE_UNDEFINED
Object type identifier for empty TObject2D or TObject3D.
TObject2D(const TSegment2D &s)
Implicit constructor from segment.
bool isLine() const
Checks whether content is a line.
Virtual base class for "archives": classes abstracting I/O streams.
static void getPoints(const std::vector< TObject2D > &objs, std::vector< TPoint2D > &pnts)
Static method to retrieve all the points in a vector of TObject2D.
void operator=(const TPolygon2D &p)
Assign a polygon to this object.
mrpt::vision::TStereoCalibResults out
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
~TObject2D()
Object destruction.
static void getPolygons(const std::vector< TObject2D > &objs, std::vector< TPolygon2D > &polys)
Static method to retrieve all the polygons in a vector of TObject2D.
TObject2D(const TPolygon2D &p)
Implicit constructor from polygon.
static constexpr unsigned char GEOMETRIC_TYPE_SEGMENT
Object type identifier for TSegment2D or TSegment3D.
void operator=(const TLine2D &l)
Assign a line to this object.
void destroy()
Destroys the object, releasing the pointer to the content (if any).
static constexpr unsigned char GEOMETRIC_TYPE_LINE
Object type identifier for TLine2D or TLine3D.
2D polygon, inheriting from std::vector<TPoint2D>.
Union type storing pointers to every allowed type.
bool isPoint() const
Checks whether content is a point.
2D line without bounds, represented by its equation .