10 #ifndef opengl_CSetOfLines_H 11 #define opengl_CSetOfLines_H 64 float getVerticesPointSize()
const;
66 void setVerticesPointSize(
const float size_points);
71 mSegments.push_back(sgm);
77 inline void appendLine(
float x0,
float y0,
float z0,
float x1,
float y1,
float z1) {
92 this->appendLine(this->rbegin()->point2,point);
100 mSegments.insert(mSegments.end(),sgms.begin(),sgms.end());
108 mSegments.reserve(mSegments.size()+(
end-
begin));
109 mSegments.insert(mSegments.end(),
begin,
end);
117 mSegments.resize(nLines);
125 mSegments.reserve(
r);
131 template<
class T,
class U>
inline void appendLine(T p0,U p1) {
132 appendLine(p0.x,p0.y,p0.z,p1.x,p1.y,p1.z);
138 inline size_t size()
const {
return mSegments.size(); }
140 inline bool empty()
const {
return mSegments.empty(); }
158 void getLineByIndex(
size_t index,
double &x0,
double &y0,
double &z0,
double &x1,
double &y1,
double &z1)
const;
161 static CSetOfLinesPtr Create(
const std::vector<mrpt::math::TSegment3D> &sgms,
const bool antiAliasing =
true);
183 return mSegments.begin();
191 return mSegments.end();
199 return mSegments.rbegin();
206 return mSegments.rend();
219 CSetOfLines(
const std::vector<mrpt::math::TSegment3D> &sgms,
bool antiAliasing=
true);
227 template<class T> inline CSetOfLinesPtr &operator<<(CSetOfLinesPtr &l,const T &
s) {
228 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)
EIGEN_STRONG_INLINE bool empty() const
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.
OPENGL_IMPEXP 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...
size_t getLineCount() const
Returns the total count of lines in this set.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
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 iterator begin()
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
struct BASE_IMPEXP TSegment3D
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.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
void appendLine(const mrpt::math::TSegment3D &sgm)
Appends a line to the set.
3D segment, consisting of two points.
void reserve(size_t r)
Reserves an amount of lines to the set.
void clear()
Clear the list of segments.
virtual ~CSetOfLines()
Private, virtual destructor: only can be deleted from smart pointers.
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...
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.
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.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
std::vector< mrpt::math::TSegment3D >::iterator iterator
Iterator to the set.
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 appendLineStrip(const U &point)