Standard type for storing any lightweight 2D type.
Do not inherit from this class.
Definition at line 1135 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Classes | |
struct | tobject2d_data_t |
Union type storing pointers to every allowed type. More... | |
Public Member Functions | |
TObject2D (const TPoint2D &p) | |
Implicit constructor from point. More... | |
TObject2D (const TSegment2D &s) | |
Implicit constructor from segment. More... | |
TObject2D (const TLine2D &r) | |
Implicit constructor from line. More... | |
TObject2D (const TPolygon2D &p) | |
Implicit constructor from polygon. More... | |
TObject2D () | |
Implicit constructor from polygon. More... | |
~TObject2D () | |
Object destruction. More... | |
bool | isPoint () const |
Checks whether content is a point. More... | |
bool | isSegment () const |
Checks whether content is a segment. More... | |
bool | isLine () const |
Checks whether content is a line. More... | |
bool | isPolygon () const |
Checks whether content is a polygon. More... | |
unsigned char | getType () const |
Gets content type. More... | |
bool | getPoint (TPoint2D &p) const |
Gets the content as a point, returning false if the type is inadequate. More... | |
bool | getSegment (TSegment2D &s) const |
Gets the content as a segment, returning false if the type is inadequate. More... | |
bool | getLine (TLine2D &r) const |
Gets the content as a line, returning false if the type is inadequate. More... | |
bool | getPolygon (TPolygon2D &p) const |
Gets the content as a polygon, returning false if the type is inadequate. More... | |
TObject2D & | operator= (const TObject2D &obj) |
Assign another TObject2D. More... | |
void | operator= (const TPoint2D &p) |
Assign a point to this object. More... | |
void | operator= (const TSegment2D &s) |
Assign a segment to this object. More... | |
void | operator= (const TLine2D &l) |
Assign a line to this object. More... | |
void | operator= (const TPolygon2D &p) |
Assign a polygon to this object. More... | |
void | generate3DObject (TObject3D &obj) const |
Project into 3D space. More... | |
TObject2D (const TObject2D &obj) | |
Constructor from another TObject2D. More... | |
Static Public Member Functions | |
static void | getPoints (const std::vector< TObject2D > &objs, std::vector< TPoint2D > &pnts) |
Static method to retrieve all the points in a vector of TObject2D. More... | |
static void | getSegments (const std::vector< TObject2D > &objs, std::vector< TSegment2D > &sgms) |
Static method to retrieve all the segments in a vector of TObject2D. More... | |
static void | getLines (const std::vector< TObject2D > &objs, std::vector< TLine2D > &lins) |
Static method to retrieve all the lines in a vector of TObject2D. More... | |
static void | getPolygons (const std::vector< TObject2D > &objs, std::vector< TPolygon2D > &polys) |
Static method to retrieve all the polygons in a vector of TObject2D. More... | |
static void | getPoints (const std::vector< TObject2D > &objs, std::vector< TPoint2D > &pnts, std::vector< TObject2D > &remainder) |
Static method to retrieve all the points in a vector of TObject2D, returning the remainder objects in another parameter. More... | |
static void | getSegments (const std::vector< TObject2D > &objs, std::vector< TSegment2D > &sgms, std::vector< TObject2D > &remainder) |
Static method to retrieve all the segments in a vector of TObject2D, returning the remainder objects in another parameter. More... | |
static void | getLines (const std::vector< TObject2D > &objs, std::vector< TLine2D > &lins, std::vector< TObject2D > &remainder) |
Static method to retrieve all the lines in a vector of TObject2D, returning the remainder objects in another parameter. More... | |
static void | getPolygons (const std::vector< TObject2D > &objs, std::vector< TPolygon2D > &polys, std::vector< TObject2D > &remainder) |
Static method to retrieve all the polygons in a vector of TObject2D, returning the remainder objects in another parameter. More... | |
Private Member Functions | |
void | destroy () |
Destroys the object, releasing the pointer to the content (if any). More... | |
Private Attributes | |
unsigned char | type |
Object type identifier. More... | |
struct mrpt::math::TObject2D::tobject2d_data_t | data |
|
inline |
Implicit constructor from point.
Definition at line 1163 of file lightweight_geom_data.h.
|
inline |
Implicit constructor from segment.
Definition at line 1169 of file lightweight_geom_data.h.
|
inline |
Implicit constructor from line.
Definition at line 1175 of file lightweight_geom_data.h.
|
inline |
Implicit constructor from polygon.
Definition at line 1181 of file lightweight_geom_data.h.
|
inline |
Implicit constructor from polygon.
Definition at line 1187 of file lightweight_geom_data.h.
|
inline |
Object destruction.
Definition at line 1191 of file lightweight_geom_data.h.
|
inline |
Constructor from another TObject2D.
Definition at line 1321 of file lightweight_geom_data.h.
|
inlineprivate |
Destroys the object, releasing the pointer to the content (if any).
Definition at line 1155 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_UNDEFINED.
void mrpt::math::TObject2D::generate3DObject | ( | TObject3D & | obj | ) | const |
Project into 3D space.
|
inline |
Gets the content as a line, returning false if the type is inadequate.
Definition at line 1245 of file lightweight_geom_data.h.
|
static |
Static method to retrieve all the lines in a vector of TObject2D.
|
static |
Static method to retrieve all the lines in a vector of TObject2D, returning the remainder objects in another parameter.
|
inline |
Gets the content as a point, returning false if the type is inadequate.
Definition at line 1227 of file lightweight_geom_data.h.
|
static |
Static method to retrieve all the points in a vector of TObject2D.
|
static |
Static method to retrieve all the points in a vector of TObject2D, returning the remainder objects in another parameter.
|
inline |
Gets the content as a polygon, returning false if the type is inadequate.
Definition at line 1254 of file lightweight_geom_data.h.
|
static |
Static method to retrieve all the polygons in a vector of TObject2D.
|
static |
Static method to retrieve all the polygons in a vector of TObject2D, returning the remainder objects in another parameter.
|
inline |
Gets the content as a segment, returning false if the type is inadequate.
Definition at line 1236 of file lightweight_geom_data.h.
|
static |
Static method to retrieve all the segments in a vector of TObject2D.
|
static |
Static method to retrieve all the segments in a vector of TObject2D, returning the remainder objects in another parameter.
|
inline |
Gets content type.
Definition at line 1221 of file lightweight_geom_data.h.
|
inline |
Checks whether content is a line.
Definition at line 1209 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
|
inline |
Checks whether content is a point.
Definition at line 1197 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
|
inline |
Checks whether content is a polygon.
Definition at line 1215 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON.
|
inline |
Checks whether content is a segment.
Definition at line 1203 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
Assign another TObject2D.
Pointers are not shared.
Definition at line 1263 of file lightweight_geom_data.h.
References data, mrpt::math::TObject2D::tobject2d_data_t::line, mrpt::math::TObject2D::tobject2d_data_t::point, mrpt::math::TObject2D::tobject2d_data_t::polygon, mrpt::math::TObject2D::tobject2d_data_t::segment, and type.
|
inline |
Assign a point to this object.
Definition at line 1285 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
|
inline |
Assign a segment to this object.
Definition at line 1293 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
|
inline |
Assign a line to this object.
Definition at line 1301 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
|
inline |
Assign a polygon to this object.
Definition at line 1309 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON.
|
private |
Referenced by operator=().
|
private |
Object type identifier.
Definition at line 1140 of file lightweight_geom_data.h.
Referenced by operator=().
Page generated by Doxygen 1.8.11 for MRPT 1.3.2 SVN: at Mon May 9 06:50:38 UTC 2016 |