Go to the documentation of this file.
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());
void clear()
Clear the list of segments.
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 renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers,...
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
bool empty() const
Returns true if there are no line segments.
std::vector< mrpt::math::TSegment3D >::const_iterator const_iterator
void enableAntiAliasing(bool enable=true)
std::vector< mrpt::math::TSegment3D >::const_reverse_iterator const_reverse_iterator
CSetOfLines()
Constructor.
A set of independent lines (or segments), one line with its own start and end positions (X,...
Renderizable generic renderer for objects using the wireframe shader.
std::vector< mrpt::math::TSegment3D > m_Segments
#define ASSERT_(f)
Defines an assertion mechanism.
float getVerticesPointSize() const
void freeOpenGLResources() override
Free opengl buffers.
void reserve(size_t r)
Reserves an amount of lines to the set.
size_t getLineCount() const
Returns the total count of lines in this set.
void appendLine(const mrpt::math::TSegment3D &sgm)
Appends a line 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...
size_t size() const
Returns the total count of lines in this set.
~CSetOfLines() override=default
Private, virtual destructor: only can be deleted from smart pointers.
static constexpr shader_id_t WIREFRAME
void appendLine(T p0, U p1)
Inserts a line, given its bounds.
void setLineByIndex(size_t index, const mrpt::math::TSegment3D &segm)
Sets a specific line in the set, given its index.
std::shared_ptr< mrpt::opengl ::CSetOfLines > Ptr
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 resize(size_t nLines)
Resizes the set.
COpenGLScene::Ptr & operator<<(COpenGLScene::Ptr &s, const CRenderizable::Ptr &r)
Inserts an openGL object into a scene.
const_reverse_iterator rend() const
Ending const reverse iterator (actually, refers to the starting point of the set).
3D segment, consisting of two points.
void freeOpenGLResources() override
Free opengl buffers.
Context for calls to render()
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
void freeOpenGLResources() override
Free opengl buffers.
bool isAntiAliasingEnabled() const
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...
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
void appendLineStrip(const U &point)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void appendLines(const T &sgms)
Appends any iterable collection of lines to the set.
void appendLines(const T_it &begin, const T_it &end)
Appends certain amount of lines, located between two iterators, into the set.
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.
Renderizable generic renderer for objects using the points shader.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
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.
std::vector< mrpt::math::TSegment3D >::iterator iterator
const_iterator end() const
Ending const iterator.
std::vector< mrpt::math::TSegment3D >::reverse_iterator reverse_iterator
The namespace for 3D scene representation and rendering.
static constexpr shader_id_t POINTS
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void setVerticesPointSize(const float size_points)
Enable showing vertices as dots if size_points>0.
const_iterator begin() const
Beginning const iterator.
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 15 15:49:54 UTC 2020 | |