MRPT
1.9.9
|
Standard object for storing any 3D lightweight object.
Do not inherit from this class.
Definition at line 1809 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Classes | |
struct | tobject3d_data_t |
Union containing pointer to actual data. More... | |
Public Member Functions | |
TObject3D (const TPoint3D &p) | |
Constructor from point. More... | |
TObject3D (const TSegment3D &s) | |
Constructor from segment. More... | |
TObject3D (const TLine3D &r) | |
Constructor from line. More... | |
TObject3D (const TPolygon3D &p) | |
Constructor from polygon. More... | |
TObject3D (const TPlane &p) | |
Constructor from plane. More... | |
TObject3D () | |
Empty constructor. More... | |
~TObject3D () | |
Destructor. 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... | |
bool | isPlane () const |
Checks whether content is a plane. More... | |
unsigned char | getType () const |
Gets object type. More... | |
bool | getPoint (TPoint3D &p) const |
Gets the content as a point, returning false if the type is not adequate. More... | |
bool | getSegment (TSegment3D &s) const |
Gets the content as a segment, returning false if the type is not adequate. More... | |
bool | getLine (TLine3D &r) const |
Gets the content as a line, returning false if the type is not adequate. More... | |
bool | getPolygon (TPolygon3D &p) const |
Gets the content as a polygon, returning false if the type is not adequate. More... | |
bool | getPlane (TPlane &p) const |
Gets the content as a plane, returning false if the type is not adequate. More... | |
TObject3D & | operator= (const TObject3D &obj) |
Assigns another object, creating a new pointer if needed. More... | |
void | operator= (const TPoint3D &p) |
Assigns a point to this object. More... | |
void | operator= (const TSegment3D &s) |
Assigns a segment to this object. More... | |
void | operator= (const TLine3D &l) |
Assigns a line to this object. More... | |
void | operator= (const TPolygon3D &p) |
Assigns a polygon to this object. More... | |
void | operator= (const TPlane &p) |
Assigns a plane to this object. More... | |
void | generate2DObject (TObject2D &obj) const |
Projects into 2D space. More... | |
TObject3D (const TObject3D &obj) | |
Constructs from another object. More... | |
Static Public Member Functions | |
static void | getPoints (const std::vector< TObject3D > &objs, std::vector< TPoint3D > &pnts) |
Static method to retrieve every point included in a vector of objects. More... | |
static void | getSegments (const std::vector< TObject3D > &objs, std::vector< TSegment3D > &sgms) |
Static method to retrieve every segment included in a vector of objects. More... | |
static void | getLines (const std::vector< TObject3D > &objs, std::vector< TLine3D > &lins) |
Static method to retrieve every line included in a vector of objects. More... | |
static void | getPlanes (const std::vector< TObject3D > &objs, std::vector< TPlane > &plns) |
Static method to retrieve every plane included in a vector of objects. More... | |
static void | getPolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys) |
Static method to retrieve every polygon included in a vector of objects. More... | |
static void | getPoints (const std::vector< TObject3D > &objs, std::vector< TPoint3D > &pnts, std::vector< TObject3D > &remainder) |
Static method to retrieve every point included in a vector of objects, returning the remaining objects in another argument. More... | |
static void | getSegments (const std::vector< TObject3D > &objs, std::vector< TSegment3D > &sgms, std::vector< TObject3D > &remainder) |
Static method to retrieve every segment included in a vector of objects, returning the remaining objects in another argument. More... | |
static void | getLines (const std::vector< TObject3D > &objs, std::vector< TLine3D > &lins, std::vector< TObject3D > &remainder) |
Static method to retrieve every line included in a vector of objects, returning the remaining objects in another argument. More... | |
static void | getPlanes (const std::vector< TObject3D > &objs, std::vector< TPlane > &plns, std::vector< TObject3D > &remainder) |
Static method to retrieve every plane included in a vector of objects, returning the remaining objects in another argument. More... | |
static void | getPolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys, std::vector< TObject3D > &remainder) |
Static method to retrieve every polygon included in a vector of objects, returning the remaining objects in another argument. More... | |
Private Member Functions | |
void | destroy () |
Destroys the object and releases the pointer, if any. More... | |
Private Attributes | |
unsigned char | type |
Object type identifier. More... | |
struct mrpt::math::TObject3D::tobject3d_data_t | data |
|
inline |
Constructor from point.
Definition at line 1842 of file lightweight_geom_data.h.
|
inline |
Constructor from segment.
Definition at line 1849 of file lightweight_geom_data.h.
|
inline |
Constructor from line.
Definition at line 1856 of file lightweight_geom_data.h.
|
inline |
Constructor from polygon.
Definition at line 1860 of file lightweight_geom_data.h.
|
inline |
Constructor from plane.
Definition at line 1867 of file lightweight_geom_data.h.
|
inline |
Empty constructor.
Definition at line 1871 of file lightweight_geom_data.h.
|
inline |
|
inline |
Constructs from another object.
Definition at line 2076 of file lightweight_geom_data.h.
References operator=().
|
inlineprivate |
Destroys the object and releases the pointer, if any.
Definition at line 1832 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON, and mrpt::math::GEOMETRIC_TYPE_UNDEFINED.
Referenced by operator=(), and ~TObject3D().
Projects into 2D space.
std::logic_error | if the 3D object loses its properties when projecting into 2D space (for example, it's a plane or a vertical line). |
Definition at line 2050 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE, mrpt::math::GEOMETRIC_TYPE_PLANE, mrpt::math::GEOMETRIC_TYPE_POINT, mrpt::math::GEOMETRIC_TYPE_POLYGON, and mrpt::math::GEOMETRIC_TYPE_SEGMENT.
|
inline |
Gets the content as a line, returning false if the type is not adequate.
Definition at line 1931 of file lightweight_geom_data.h.
References isLine().
Referenced by mrpt::math::intersect(), and mrpt::math::operator<<().
|
static |
Static method to retrieve every line included in a vector of objects.
Definition at line 1363 of file lightweight_geom_data.cpp.
|
static |
Static method to retrieve every line included in a vector of objects, returning the remaining objects in another argument.
Definition at line 1406 of file lightweight_geom_data.cpp.
|
inline |
Gets the content as a plane, returning false if the type is not adequate.
Definition at line 1959 of file lightweight_geom_data.h.
References isPlane().
Referenced by mrpt::math::intersect(), and mrpt::math::operator<<().
|
static |
Static method to retrieve every plane included in a vector of objects.
Definition at line 1370 of file lightweight_geom_data.cpp.
|
static |
Static method to retrieve every plane included in a vector of objects, returning the remaining objects in another argument.
Definition at line 1417 of file lightweight_geom_data.cpp.
|
inline |
Gets the content as a point, returning false if the type is not adequate.
Definition at line 1904 of file lightweight_geom_data.h.
References isPoint().
Referenced by mrpt::math::intersect(), intersect(), intersectAux(), mrpt::maps::CHeightGridMap2D_Base::intersectLine3D(), and mrpt::math::operator<<().
|
static |
Static method to retrieve every point included in a vector of objects.
Definition at line 1349 of file lightweight_geom_data.cpp.
|
static |
Static method to retrieve every point included in a vector of objects, returning the remaining objects in another argument.
Definition at line 1384 of file lightweight_geom_data.cpp.
|
inline |
Gets the content as a polygon, returning false if the type is not adequate.
Definition at line 1945 of file lightweight_geom_data.h.
References isPolygon().
Referenced by mrpt::math::intersect(), and mrpt::math::operator<<().
|
static |
Static method to retrieve every polygon included in a vector of objects.
Definition at line 1377 of file lightweight_geom_data.cpp.
Referenced by mrpt::math::assemblePolygons().
|
static |
Static method to retrieve every polygon included in a vector of objects, returning the remaining objects in another argument.
Definition at line 1428 of file lightweight_geom_data.cpp.
|
inline |
Gets the content as a segment, returning false if the type is not adequate.
Definition at line 1918 of file lightweight_geom_data.h.
References isSegment().
Referenced by intersect(), mrpt::math::intersect(), intersectAux(), and mrpt::math::operator<<().
|
static |
Static method to retrieve every segment included in a vector of objects.
Definition at line 1356 of file lightweight_geom_data.cpp.
Referenced by mrpt::math::assemblePolygons().
|
static |
Static method to retrieve every segment included in a vector of objects, returning the remaining objects in another argument.
Definition at line 1395 of file lightweight_geom_data.cpp.
|
inline |
Gets object type.
Definition at line 1899 of file lightweight_geom_data.h.
References type.
Referenced by mrpt::math::operator<<().
|
inline |
Checks whether content is a line.
Definition at line 1887 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
Referenced by getLine().
|
inline |
Checks whether content is a plane.
Definition at line 1895 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_PLANE.
Referenced by getPlane().
|
inline |
Checks whether content is a point.
Definition at line 1879 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
Referenced by getPoint(), and mrpt::math::intersect().
|
inline |
Checks whether content is a polygon.
Definition at line 1891 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON.
Referenced by getPolygon().
|
inline |
Checks whether content is a segment.
Definition at line 1883 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
Referenced by getSegment().
Assigns another object, creating a new pointer if needed.
Definition at line 1972 of file lightweight_geom_data.h.
References destroy(), mrpt::math::GEOMETRIC_TYPE_LINE, mrpt::math::GEOMETRIC_TYPE_PLANE, mrpt::math::GEOMETRIC_TYPE_POINT, mrpt::math::GEOMETRIC_TYPE_POLYGON, mrpt::math::GEOMETRIC_TYPE_SEGMENT, mrpt::math::GEOMETRIC_TYPE_UNDEFINED, and THROW_EXCEPTION.
Referenced by TObject3D().
Assigns a point to this object.
Definition at line 2003 of file lightweight_geom_data.h.
References destroy(), and mrpt::math::GEOMETRIC_TYPE_POINT.
|
inline |
Assigns a segment to this object.
Definition at line 2012 of file lightweight_geom_data.h.
References destroy(), and mrpt::math::GEOMETRIC_TYPE_SEGMENT.
Assigns a line to this object.
Definition at line 2021 of file lightweight_geom_data.h.
References destroy(), and mrpt::math::GEOMETRIC_TYPE_LINE.
|
inline |
Assigns a polygon to this object.
Definition at line 2030 of file lightweight_geom_data.h.
References destroy(), and mrpt::math::GEOMETRIC_TYPE_POLYGON.
Assigns a plane to this object.
Definition at line 2039 of file lightweight_geom_data.h.
References destroy(), and mrpt::math::GEOMETRIC_TYPE_PLANE.
|
private |
|
private |
Object type identifier.
Definition at line 1815 of file lightweight_geom_data.h.
Referenced by getType().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |