#include <mrpt/math/lightweight_geom_data.h>
Public Member Functions | |
TObject2D (const TPoint2D &p) | |
Implicit constructor from point. | |
TObject2D (const TSegment2D &s) | |
Implicit constructor from segment. | |
TObject2D (const TLine2D &r) | |
Implicit constructor from line. | |
TObject2D (const TPolygon2D &p) | |
Implicit constructor from polygon. | |
TObject2D () | |
Implicit constructor from polygon. | |
~TObject2D () | |
Object destruction. | |
bool | isPoint () const |
Checks whether content is a point. | |
bool | isSegment () const |
Checks whether content is a segment. | |
bool | isLine () const |
Checks whether content is a line. | |
bool | isPolygon () const |
Checks whether content is a polygon. | |
unsigned char | getType () const |
Gets content type. | |
bool | getPoint (TPoint2D &p) const |
Gets the content as a point, returning false if the type is inadequate. | |
bool | getSegment (TSegment2D &s) const |
Gets the content as a segment, returning false if the type is inadequate. | |
bool | getLine (TLine2D &r) const |
Gets the content as a line, 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. | |
void | operator= (const TObject2D &obj) |
Assign another TObject2D. | |
void | operator= (const TPoint2D &p) |
Assign a point to this object. | |
void | operator= (const TSegment2D &s) |
Assign a segment to this object. | |
void | operator= (const TLine2D &l) |
Assign a line to this object. | |
void | operator= (const TPolygon2D &p) |
Assign a polygon to this object. | |
void | generate3DObject (TObject3D &obj) const |
Project into 3D space. | |
TObject2D (const TObject2D &obj) | |
Constructor from another TObject2D. | |
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. | |
static void | getSegments (const std::vector< TObject2D > &objs, std::vector< TSegment2D > &sgms) |
Static method to retrieve all the segments in a vector of TObject2D. | |
static void | getLines (const std::vector< TObject2D > &objs, std::vector< TLine2D > &lins) |
Static method to retrieve all the lines in a vector of TObject2D. | |
static void | getPolygons (const std::vector< TObject2D > &objs, std::vector< TPolygon2D > &polys) |
Static method to retrieve all the polygons in a vector of TObject2D. | |
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. | |
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. | |
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. | |
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. | |
Private Member Functions | |
void | destroy () |
Destroys the object, releasing the pointer to the content (if any). | |
Private Attributes | |
unsigned char | type |
Object type identifier. | |
struct { | |
TPoint2D point | |
TSegment2D segment | |
TLine2D line | |
TPolygon2D * polygon | |
} | data |
Union type storing pointers to every allowed type. |
Do not inherit from this class.
Definition at line 1586 of file lightweight_geom_data.h.
mrpt::math::TObject2D::TObject2D | ( | const TPoint2D & | p | ) | [inline] |
mrpt::math::TObject2D::TObject2D | ( | const TSegment2D & | s | ) | [inline] |
mrpt::math::TObject2D::TObject2D | ( | const TLine2D & | r | ) | [inline] |
mrpt::math::TObject2D::TObject2D | ( | const TPolygon2D & | p | ) | [inline] |
mrpt::math::TObject2D::TObject2D | ( | ) | [inline] |
mrpt::math::TObject2D::~TObject2D | ( | ) | [inline] |
mrpt::math::TObject2D::TObject2D | ( | const TObject2D & | obj | ) | [inline] |
void mrpt::math::TObject2D::destroy | ( | ) | [inline, private] |
Destroys the object, releasing the pointer to the content (if any).
Definition at line 1604 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON, and mrpt::math::GEOMETRIC_TYPE_UNDEFINED.
void mrpt::math::TObject2D::generate3DObject | ( | TObject3D & | obj | ) | const |
Project into 3D space.
bool mrpt::math::TObject2D::getLine | ( | TLine2D & | r | ) | const [inline] |
Gets the content as a line, returning false if the type is inadequate.
Definition at line 1694 of file lightweight_geom_data.h.
static void mrpt::math::TObject2D::getLines | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TLine2D > & | lins, | |||
std::vector< TObject2D > & | remainder | |||
) | [static] |
Static method to retrieve all the lines in a vector of TObject2D, returning the remainder objects in another parameter.
static void mrpt::math::TObject2D::getLines | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TLine2D > & | lins | |||
) | [static] |
Static method to retrieve all the lines in a vector of TObject2D.
bool mrpt::math::TObject2D::getPoint | ( | TPoint2D & | p | ) | const [inline] |
Gets the content as a point, returning false if the type is inadequate.
Definition at line 1676 of file lightweight_geom_data.h.
static void mrpt::math::TObject2D::getPoints | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TPoint2D > & | pnts, | |||
std::vector< TObject2D > & | remainder | |||
) | [static] |
Static method to retrieve all the points in a vector of TObject2D, returning the remainder objects in another parameter.
static void mrpt::math::TObject2D::getPoints | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TPoint2D > & | pnts | |||
) | [static] |
Static method to retrieve all the points in a vector of TObject2D.
bool mrpt::math::TObject2D::getPolygon | ( | TPolygon2D & | p | ) | const [inline] |
Gets the content as a polygon, returning false if the type is inadequate.
Definition at line 1703 of file lightweight_geom_data.h.
static void mrpt::math::TObject2D::getPolygons | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TPolygon2D > & | polys, | |||
std::vector< TObject2D > & | remainder | |||
) | [static] |
Static method to retrieve all the polygons in a vector of TObject2D, returning the remainder objects in another parameter.
static void mrpt::math::TObject2D::getPolygons | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TPolygon2D > & | polys | |||
) | [static] |
Static method to retrieve all the polygons in a vector of TObject2D.
bool mrpt::math::TObject2D::getSegment | ( | TSegment2D & | s | ) | const [inline] |
Gets the content as a segment, returning false if the type is inadequate.
Definition at line 1685 of file lightweight_geom_data.h.
static void mrpt::math::TObject2D::getSegments | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TSegment2D > & | sgms, | |||
std::vector< TObject2D > & | remainder | |||
) | [static] |
Static method to retrieve all the segments in a vector of TObject2D, returning the remainder objects in another parameter.
static void mrpt::math::TObject2D::getSegments | ( | const std::vector< TObject2D > & | objs, | |
std::vector< TSegment2D > & | sgms | |||
) | [static] |
Static method to retrieve all the segments in a vector of TObject2D.
unsigned char mrpt::math::TObject2D::getType | ( | ) | const [inline] |
bool mrpt::math::TObject2D::isLine | ( | ) | const [inline] |
Checks whether content is a line.
Definition at line 1658 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
bool mrpt::math::TObject2D::isPoint | ( | ) | const [inline] |
Checks whether content is a point.
Definition at line 1646 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
bool mrpt::math::TObject2D::isPolygon | ( | ) | const [inline] |
Checks whether content is a polygon.
Definition at line 1664 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON.
bool mrpt::math::TObject2D::isSegment | ( | ) | const [inline] |
Checks whether content is a segment.
Definition at line 1652 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
void mrpt::math::TObject2D::operator= | ( | const TPolygon2D & | p | ) | [inline] |
Assign a polygon to this object.
Definition at line 1757 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON.
void mrpt::math::TObject2D::operator= | ( | const TLine2D & | l | ) | [inline] |
Assign a line to this object.
Definition at line 1749 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
void mrpt::math::TObject2D::operator= | ( | const TSegment2D & | s | ) | [inline] |
Assign a segment to this object.
Definition at line 1741 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
void mrpt::math::TObject2D::operator= | ( | const TPoint2D & | p | ) | [inline] |
Assign a point to this object.
Definition at line 1733 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
void mrpt::math::TObject2D::operator= | ( | const TObject2D & | obj | ) | [inline] |
Assign another TObject2D.
Pointers are not shared.
Definition at line 1712 of file lightweight_geom_data.h.
References data, mrpt::math::GEOMETRIC_TYPE_LINE, mrpt::math::GEOMETRIC_TYPE_POINT, mrpt::math::GEOMETRIC_TYPE_POLYGON, mrpt::math::GEOMETRIC_TYPE_SEGMENT, line, point, polygon, segment, and type.
struct { ... } mrpt::math::TObject2D::data [private] |
unsigned char mrpt::math::TObject2D::type [private] |
Object type identifier.
Definition at line 1591 of file lightweight_geom_data.h.
Referenced by operator=().
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 22:58:25 EDT 2009 |