190 if (
this == &
obj)
return *
this;
198 data.segment =
obj.data.segment;
278 const std::vector<TObject3D>& objs, std::vector<TPoint3D>& pnts);
283 const std::vector<TObject3D>& objs, std::vector<TSegment3D>& sgms);
288 const std::vector<TObject3D>& objs, std::vector<TLine3D>& lins);
293 const std::vector<TObject3D>& objs, std::vector<TPlane>& plns);
298 const std::vector<TObject3D>& objs, std::vector<TPolygon3D>& polys);
304 const std::vector<TObject3D>& objs, std::vector<TPoint3D>& pnts,
305 std::vector<TObject3D>& remainder);
311 const std::vector<TObject3D>& objs, std::vector<TSegment3D>& sgms,
312 std::vector<TObject3D>& remainder);
318 const std::vector<TObject3D>& objs, std::vector<TLine3D>& lins,
319 std::vector<TObject3D>& remainder);
325 const std::vector<TObject3D>& objs, std::vector<TPlane>& plns,
326 std::vector<TObject3D>& remainder);
332 const std::vector<TObject3D>& objs, std::vector<TPolygon3D>& polys,
333 std::vector<TObject3D>& remainder);
void destroy()
Destroys the object and releases the pointer, if any.
#define THROW_EXCEPTION(msg)
static constexpr unsigned char GEOMETRIC_TYPE_POLYGON
Object type identifier for TPolygon2D or TPolygon3D.
bool getSegment(TSegment3D &s) const
Gets the content as a segment, returning false if the type is not adequate.
Union containing pointer to actual data.
Standard type for storing any lightweight 2D type.
static constexpr unsigned char GEOMETRIC_TYPE_POINT
Object type identifier for TPoint2D or TPoint3D.
bool getPlane(TPlane &p) const
Gets the content as a plane, returning false if the type is not adequate.
Standard object for storing any 3D lightweight object.
TObject3D()
Empty constructor.
void operator=(const TSegment3D &s)
Assigns a segment to this object.
void operator=(const TPoint3D &p)
Assigns a point to this object.
GLsizei GLsizei GLuint * obj
TObject3D(const TPlane &p)
Constructor from plane.
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 constexpr unsigned char GEOMETRIC_TYPE_PLANE
Object type identifier for TPlane.
bool getPolygon(TPolygon3D &p) const
Gets the content as a polygon, returning false if the type is not adequate.
This base provides a set of functions for maths stuff.
bool isPoint() const
Checks whether content is a point.
3D segment, consisting of two points.
TObject3D(const TPoint3D &p)
Constructor from point.
TObject3D & operator=(const TObject3D &obj)
Assigns another object, creating a new pointer if needed.
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 getPolygons(const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys)
Static method to retrieve every polygon included in a vector of objects.
3D Plane, represented by its equation
void operator=(const TPolygon3D &p)
Assigns a polygon to this object.
#define MRPT_DECLARE_TTYPENAME_NO_NAMESPACE(_TYPE, __NS)
Declares a typename to be "type" (without the NS prefix)
bool isPlane() const
Checks whether content is a plane.
static constexpr unsigned char GEOMETRIC_TYPE_UNDEFINED
Object type identifier for empty TObject2D or TObject3D.
void operator=(const TPlane &p)
Assigns a plane to this object.
mrpt::serialization::CArchive & operator>>(mrpt::serialization::CArchive &in, CMatrixD::Ptr &pObj)
bool getPoint(TPoint3D &p) const
Gets the content as a point, returning false if the type is not adequate.
TObject3D(const TLine3D &r)
Constructor from line.
Virtual base class for "archives": classes abstracting I/O streams.
GLdouble GLdouble GLdouble r
mrpt::serialization::CArchive & operator<<(mrpt::serialization::CArchive &s, const CVectorFloat &a)
unsigned char type
Object type identifier.
struct mrpt::math::TObject3D::tobject3d_data_t data
bool getLine(TLine3D &r) const
Gets the content as a line, returning false if the type is not adequate.
void generate2DObject(TObject2D &obj) const
Projects into 2D space.
bool isLine() const
Checks whether content is a line.
bool isSegment() const
Checks whether content is a segment.
TObject3D(const TObject3D &obj)
Constructs from another object.
unsigned char getType() const
Gets object type.
void operator=(const TLine3D &l)
Assigns a line to this object.
static constexpr unsigned char GEOMETRIC_TYPE_SEGMENT
Object type identifier for TSegment2D or TSegment3D.
bool isPolygon() const
Checks whether content is a polygon.
TObject3D(const TSegment3D &s)
Constructor from segment.
GLsizei GLsizei GLenum GLenum const GLvoid * data
static void getPlanes(const std::vector< TObject3D > &objs, std::vector< TPlane > &plns)
Static method to retrieve every plane included in a vector of objects.
TObject3D(const TPolygon3D &p)
Constructor from polygon.
GLuint GLuint GLsizei GLenum type
static constexpr unsigned char GEOMETRIC_TYPE_LINE
Object type identifier for TLine2D or TLine3D.
3D polygon, inheriting from std::vector<TPoint3D>
tobject3d_data_t()=default
3D line, represented by a base point and a director vector.
static void getPoints(const std::vector< TObject3D > &objs, std::vector< TPoint3D > &pnts)
Static method to retrieve every point included in a vector of objects.