#include <mrpt/math/lightweight_geom_data.h>
Public Member Functions | |
TObject3D (const TPoint3D &p) | |
Constructor from point. | |
TObject3D (const TSegment3D &s) | |
Constructor from segment. | |
TObject3D (const TLine3D &r) | |
Constructor from line. | |
TObject3D (const TPolygon3D &p) | |
Constructor from polygon. | |
TObject3D (const TPlane &p) | |
Constructor from plane. | |
TObject3D () | |
Empty constructor. | |
~TObject3D () | |
Destructor. | |
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. | |
bool | isPlane () const |
Checks whether content is a plane. | |
unsigned char | getType () const |
Gets object type. | |
bool | getPoint (TPoint3D &p) const |
Gets the content as a point, returning false if the type is not adequate. | |
bool | getSegment (TSegment3D &s) const |
Gets the content as a segment, returning false if the type is not adequate. | |
bool | getLine (TLine3D &r) const |
Gets the content as a line, returning false if the type is not adequate. | |
bool | getPolygon (TPolygon3D &p) const |
Gets the content as a polygon, returning false if the type is not adequate. | |
bool | getPlane (TPlane &p) const |
Gets the content as a plane, returning false if the type is not adequate. | |
void | operator= (const TObject3D &obj) |
Assigns another object, creating a new pointer if needed. | |
void | operator= (const TPoint3D &p) |
Assigns a point to this object. | |
void | operator= (const TSegment3D &s) |
Assigns a segment to this object. | |
void | operator= (const TLine3D &l) |
Assigns a line to this object. | |
void | operator= (const TPolygon3D &p) |
Assigns a polygon to this object. | |
void | operator= (const TPlane &p) |
Assigns a plane to this object. | |
void | generate2DObject (TObject2D &obj) const |
Projects into 2D space. | |
TObject3D (const TObject3D &obj) | |
Constructs from another object. | |
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. | |
static void | getSegments (const std::vector< TObject3D > &objs, std::vector< TSegment3D > &sgms) |
Static method to retrieve every segment included in a vector of objects. | |
static void | getLines (const std::vector< TObject3D > &objs, std::vector< TLine3D > &lins) |
Static method to retrieve every line included in a vector of objects. | |
static void | getPlanes (const std::vector< TObject3D > &objs, std::vector< TPlane > &plns) |
Static method to retrieve every plane included in a vector of objects. | |
static void | getPolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys) |
Static method to retrieve every polygon included in a vector of objects. | |
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. | |
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. | |
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. | |
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. | |
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. | |
Private Member Functions | |
void | destroy () |
Destroys the object and releases the pointer, if any. | |
Private Attributes | |
unsigned char | type |
Object type identifier. | |
struct { | |
TPoint3D point | |
TSegment3D segment | |
TLine3D line | |
TPolygon3D * polygon | |
TPlane plane | |
} | data |
Union containing pointer to actual data. |
Do not inherit from this class.
Definition at line 1809 of file lightweight_geom_data.h.
mrpt::math::TObject3D::TObject3D | ( | const TPoint3D & | p | ) | [inline] |
mrpt::math::TObject3D::TObject3D | ( | const TSegment3D & | s | ) | [inline] |
mrpt::math::TObject3D::TObject3D | ( | const TLine3D & | r | ) | [inline] |
mrpt::math::TObject3D::TObject3D | ( | const TPolygon3D & | p | ) | [inline] |
Constructor from polygon.
Definition at line 1854 of file lightweight_geom_data.h.
References mrpt::math::TPolygon3D.
mrpt::math::TObject3D::TObject3D | ( | const TPlane & | p | ) | [inline] |
mrpt::math::TObject3D::TObject3D | ( | ) | [inline] |
mrpt::math::TObject3D::~TObject3D | ( | ) | [inline] |
mrpt::math::TObject3D::TObject3D | ( | const TObject3D & | obj | ) | [inline] |
void mrpt::math::TObject3D::destroy | ( | ) | [inline, private] |
Destroys the object and releases the pointer, if any.
Definition at line 1828 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON, and mrpt::math::GEOMETRIC_TYPE_UNDEFINED.
void mrpt::math::TObject3D::generate2DObject | ( | TObject2D & | obj | ) | const [inline] |
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 2026 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.
bool mrpt::math::TObject3D::getLine | ( | TLine3D & | r | ) | const [inline] |
Gets the content as a line, returning false if the type is not adequate.
Definition at line 1930 of file lightweight_geom_data.h.
static void mrpt::math::TObject3D::getLines | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TLine3D > & | lins, | |||
std::vector< TObject3D > & | remainder | |||
) | [static] |
Static method to retrieve every line included in a vector of objects, returning the remaining objects in another argument.
static void mrpt::math::TObject3D::getLines | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TLine3D > & | lins | |||
) | [static] |
Static method to retrieve every line included in a vector of objects.
bool mrpt::math::TObject3D::getPlane | ( | TPlane & | p | ) | const [inline] |
Gets the content as a plane, returning false if the type is not adequate.
Definition at line 1948 of file lightweight_geom_data.h.
static void mrpt::math::TObject3D::getPlanes | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TPlane > & | plns, | |||
std::vector< TObject3D > & | remainder | |||
) | [static] |
Static method to retrieve every plane included in a vector of objects, returning the remaining objects in another argument.
static void mrpt::math::TObject3D::getPlanes | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TPlane > & | plns | |||
) | [static] |
Static method to retrieve every plane included in a vector of objects.
bool mrpt::math::TObject3D::getPoint | ( | TPoint3D & | p | ) | const [inline] |
Gets the content as a point, returning false if the type is not adequate.
Definition at line 1912 of file lightweight_geom_data.h.
static void mrpt::math::TObject3D::getPoints | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TPoint3D > & | pnts, | |||
std::vector< TObject3D > & | remainder | |||
) | [static] |
Static method to retrieve every point included in a vector of objects, returning the remaining objects in another argument.
static void mrpt::math::TObject3D::getPoints | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TPoint3D > & | pnts | |||
) | [static] |
Static method to retrieve every point included in a vector of objects.
bool mrpt::math::TObject3D::getPolygon | ( | TPolygon3D & | p | ) | const [inline] |
Gets the content as a polygon, returning false if the type is not adequate.
Definition at line 1939 of file lightweight_geom_data.h.
static void mrpt::math::TObject3D::getPolygons | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TPolygon3D > & | polys, | |||
std::vector< TObject3D > & | remainder | |||
) | [static] |
Static method to retrieve every polygon included in a vector of objects, returning the remaining objects in another argument.
static void mrpt::math::TObject3D::getPolygons | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TPolygon3D > & | polys | |||
) | [static] |
Static method to retrieve every polygon included in a vector of objects.
bool mrpt::math::TObject3D::getSegment | ( | TSegment3D & | s | ) | const [inline] |
Gets the content as a segment, returning false if the type is not adequate.
Definition at line 1921 of file lightweight_geom_data.h.
static void mrpt::math::TObject3D::getSegments | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TSegment3D > & | sgms, | |||
std::vector< TObject3D > & | remainder | |||
) | [static] |
Static method to retrieve every segment included in a vector of objects, returning the remaining objects in another argument.
static void mrpt::math::TObject3D::getSegments | ( | const std::vector< TObject3D > & | objs, | |
std::vector< TSegment3D > & | sgms | |||
) | [static] |
Static method to retrieve every segment included in a vector of objects.
unsigned char mrpt::math::TObject3D::getType | ( | ) | const [inline] |
bool mrpt::math::TObject3D::isLine | ( | ) | const [inline] |
Checks whether content is a line.
Definition at line 1888 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
bool mrpt::math::TObject3D::isPlane | ( | ) | const [inline] |
Checks whether content is a plane.
Definition at line 1900 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_PLANE.
bool mrpt::math::TObject3D::isPoint | ( | ) | const [inline] |
Checks whether content is a point.
Definition at line 1876 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
bool mrpt::math::TObject3D::isPolygon | ( | ) | const [inline] |
Checks whether content is a polygon.
Definition at line 1894 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON.
bool mrpt::math::TObject3D::isSegment | ( | ) | const [inline] |
Checks whether content is a segment.
Definition at line 1882 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
void mrpt::math::TObject3D::operator= | ( | const TPlane & | p | ) | [inline] |
Assigns a plane to this object.
Definition at line 2017 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_PLANE.
void mrpt::math::TObject3D::operator= | ( | const TPolygon3D & | p | ) | [inline] |
Assigns a polygon to this object.
Definition at line 2009 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POLYGON, and mrpt::math::TPolygon3D.
void mrpt::math::TObject3D::operator= | ( | const TLine3D & | l | ) | [inline] |
Assigns a line to this object.
Definition at line 2001 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_LINE.
void mrpt::math::TObject3D::operator= | ( | const TSegment3D & | s | ) | [inline] |
Assigns a segment to this object.
Definition at line 1993 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_SEGMENT.
void mrpt::math::TObject3D::operator= | ( | const TPoint3D & | p | ) | [inline] |
Assigns a point to this object.
Definition at line 1985 of file lightweight_geom_data.h.
References mrpt::math::GEOMETRIC_TYPE_POINT.
void mrpt::math::TObject3D::operator= | ( | const TObject3D & | obj | ) | [inline] |
Assigns another object, creating a new pointer if needed.
Definition at line 1957 of file lightweight_geom_data.h.
References data, 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, line, plane, point, polygon, segment, THROW_EXCEPTION, mrpt::math::TPolygon3D, and type.
struct { ... } mrpt::math::TObject3D::data [private] |
unsigned char mrpt::math::TObject3D::type [private] |
Object type identifier.
Definition at line 1814 of file lightweight_geom_data.h.
Referenced by operator=().
Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:20:53 EDT 2009 |