80 double x0,
double y0,
double z0,
double x1,
double y1,
double z1)
120 template <
class T_it>
151 template <
class T,
class U>
154 appendLine(p0.x, p0.y, p0.z, p1.x, p1.y, p1.z);
173 size_t index,
double x0,
double y0,
double z0,
double x1,
double y1,
187 size_t index,
double& x0,
double& y0,
double& z0,
double& x1,
188 double& y1,
double& z1)
const;
191 using iterator = std::vector<mrpt::math::TSegment3D>::iterator;
193 std::vector<mrpt::math::TSegment3D>::reverse_iterator;
196 std::vector<mrpt::math::TSegment3D>::const_reverse_iterator;
245 const std::vector<mrpt::math::TSegment3D>& sgms,
246 bool antiAliasing =
true);
256 l->appendLines(s.begin(), s.end());
size_t size() const
Returns the total count of lines in this set.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
void enableAntiAliasing(bool enable=true)
void appendLine(double x0, double y0, double z0, double x1, double y1, double z1)
Appends a line to the set, given the coordinates of its bounds.
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.
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 notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.
void resize(size_t nLines)
Resizes the set.
COpenGLScene::Ptr & operator<<(COpenGLScene::Ptr &s, const CRenderizable::Ptr &r)
Inserts an openGL object into a scene.
std::vector< mrpt::math::TSegment3D >::const_reverse_iterator const_reverse_iterator
void freeOpenGLResources() override
Free opengl buffers.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
Context for calls to render()
void freeOpenGLResources() override
Free opengl buffers.
#define ASSERT_(f)
Defines an assertion mechanism.
std::vector< mrpt::math::TSegment3D >::iterator iterator
void appendLine(const mrpt::math::TSegment3D &sgm)
Appends a line to the set.
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
float getVerticesPointSize() const
3D segment, consisting of two points.
static constexpr shader_id_t WIREFRAME
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.
Renderizable generic renderer for objects using the points shader.
std::vector< mrpt::math::TSegment3D > m_Segments
const_reverse_iterator rbegin() const
Beginning const reverse iterator (actually, accesses the end of the set).
void onUpdateBuffers_Points() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
CSetOfLines()
Constructor.
std::vector< mrpt::math::TSegment3D >::reverse_iterator reverse_iterator
const_reverse_iterator rend() const
Ending const reverse iterator (actually, refers to the starting point of the set).
Renderizable generic renderer for objects using the wireframe shader.
The namespace for 3D scene representation and rendering.
std::vector< mrpt::math::TSegment3D >::const_iterator const_iterator
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
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.
A set of independent lines (or segments), one line with its own start and end positions (X...
void freeOpenGLResources() override
Free opengl buffers.
void appendLines(const T_it &begin, const T_it &end)
Appends certain amount of lines, located between two iterators, into the set.
static constexpr shader_id_t POINTS
~CSetOfLines() override=default
Private, virtual destructor: only can be deleted from smart pointers.
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)