10 #ifndef opengl_CSetOfLines_H 11 #define opengl_CSetOfLines_H 81 float x0,
float y0,
float z0,
float x1,
float y1,
float z1)
122 template <
class T_it>
153 template <
class T,
class U>
156 appendLine(p0.x, p0.y, p0.z, p1.x, p1.y, p1.z);
175 size_t index,
double x0,
double y0,
double z0,
double x1,
double y1,
189 size_t index,
double& x0,
double& y0,
double& z0,
double& x1,
190 double& y1,
double&
z1)
const;
194 const std::vector<mrpt::math::TSegment3D>& sgms,
195 const bool antiAliasing =
true);
204 typedef std::vector<mrpt::math::TSegment3D>::reverse_iterator
214 typedef std::vector<mrpt::math::TSegment3D>::const_reverse_iterator
264 const std::vector<mrpt::math::TSegment3D>& sgms,
265 bool antiAliasing =
true);
275 l->appendLines(
s.begin(),
s.end());
size_t size() const
Returns the total count of lines in this set.
std::vector< mrpt::math::TSegment3D > mSegments
void enableAntiAliasing(bool enable=true)
void setLineByIndex(size_t index, double x0, double y0, double z0, double x1, double y1, double z1)
Sets a specific line in the set, given its index.
void appendLines(const T &sgms)
Appends any iterable collection of lines to the set.
mrpt::utils::CStream & operator<<(mrpt::utils::CStream &out, const mrpt::opengl::CLight &o)
void appendLineStrip(float x, float y, float z)
Appends a line whose starting point is the end point of the last line (similar to OpenGL's GL_LINE_ST...
const_iterator begin() const
Beginning const iterator.
size_t getLineCount() const
Returns the total count of lines in this set.
void getLineByIndex(size_t index, double &x0, double &y0, double &z0, double &x1, double &y1, double &z1) const
Gets a specific line in the set, given its index.
const_iterator end() const
Ending const iterator.
void setLineWidth(float w)
Sets the width with which lines will be drawn.
void resize(size_t nLines)
Resizes the set.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
float m_verticesPointSize
0: means hidden
const Scalar * const_iterator
GLubyte GLubyte GLubyte GLubyte w
A renderizable object suitable for rendering with OpenGL's display lists.
float getLineWidth() const
Gets the width with which lines are drawn.
void appendLine(const mrpt::math::TSegment3D &sgm)
Appends a line to the set.
float getVerticesPointSize() const
3D segment, consisting of two points.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
void reserve(size_t r)
Reserves an amount of lines to the set.
void setVerticesPointSize(const float size_points)
Enable showing vertices as dots if size_points>0.
void clear()
Clear the list of segments.
virtual ~CSetOfLines()
Private, virtual destructor: only can be deleted from smart pointers.
void render_dl() const override
Render.
const_reverse_iterator rbegin() const
Beginning const reverse iterator (actually, accesses the end of the set).
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CSetOfLines()
Constructor.
GLdouble GLdouble GLdouble r
const_reverse_iterator rend() const
Ending const reverse iterator (actually, refers to the starting point of the set).
std::vector< mrpt::math::TSegment3D >::const_reverse_iterator const_reverse_iterator
Const reverse iterator to the set.
std::shared_ptr< CSetOfLines > Ptr
bool isAntiAliasingEnabled() const
void appendLine(T p0, U p1)
Inserts a line, given its bounds.
bool empty() const
Returns true if there are no line segments.
std::vector< mrpt::math::TSegment3D >::reverse_iterator reverse_iterator
Iterator to the set.
A set of independent lines (or segments), one line with its own start and end positions (X...
void appendLines(const T_it &begin, const T_it &end)
Appends certain amount of lines, located between two iterators, into the set.
std::vector< mrpt::math::TSegment3D >::iterator iterator
Iterator to the set.
static Ptr Create(Args &&... args)
void appendLine(float x0, float y0, float z0, float x1, float y1, float z1)
Appends a line to the set, given the coordinates of its bounds.
std::vector< mrpt::math::TSegment3D >::const_iterator const_iterator
Const iterator to the set.
void setLineByIndex(size_t index, const mrpt::math::TSegment3D &segm)
Sets a specific line in the set, given its index.
void appendLineStrip(const U &point)