A set of independent lines (or segments), one line with its own start and end positions (X,Y,Z).
Definition at line 57 of file CSetOfLines.h.
#include <mrpt/opengl/CSetOfLines.h>
Public Types | |
typedef std::vector < TSegment3D >::iterator | iterator |
Iterator to the set. | |
typedef std::vector < TSegment3D > ::reverse_iterator | reverse_iterator |
Iterator to the set. | |
typedef std::vector < TSegment3D >::const_iterator | const_iterator |
Const iterator to the set. | |
typedef std::vector < TSegment3D > ::const_reverse_iterator | const_reverse_iterator |
Const reverse iterator to the set. | |
Public Member Functions | |
void | clear () |
Clear the list of segments. | |
void | setLineWidth (float w) |
Sets the width with which lines will be drawn. | |
float | getLineWidth () const |
Gets the width with which lines are drawn. | |
void | appendLine (const mrpt::math::TSegment3D &sgm) |
Appends a line 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. | |
template<class T > | |
void | appendLines (const T &sgms) |
Appends any iterable collection of lines to the set. | |
template<class T_it > | |
void | appendLines (const T_it &begin, const T_it &end) |
Appends certain amount of lines, located between two iterators, into the set. | |
void | resize (size_t nLines) |
Resizes the set. | |
void | reserve (size_t r) |
Reserves an amount of lines to the set. | |
template<class T , class U > | |
void | appendLine (T p0, U p1) |
Inserts a line, given its bounds. | |
size_t | getLineCount () const |
Returns the total count of lines in this set. | |
void | setLineByIndex (size_t index, const TSegment3D &segm) |
Sets a specific line in the set, given its index. | |
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 | 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. | |
void | render_dl () const |
Render. | |
const_iterator | begin () const |
Beginning const iterator. | |
iterator | begin () |
const_iterator | end () const |
Ending const iterator. | |
iterator | end () |
const_reverse_iterator | rbegin () const |
Beginning const reverse iterator (actually, accesses the end of the set). | |
const_reverse_iterator | rend () const |
Ending const reverse iterator (actually, refers to the starting point of the set). | |
Static Public Member Functions | |
static CSetOfLinesPtr | Create (const std::vector< TSegment3D > &sgms) |
Class factory. | |
Protected Attributes | |
std::vector< TSegment3D > | mSegments |
float | mLineWidth |
Private Member Functions | |
CSetOfLines () | |
Constructor. | |
CSetOfLines (const std::vector< TSegment3D > &sgms) | |
Constructor with a initial set of lines. | |
virtual | ~CSetOfLines () |
Private, virtual destructor: only can be deleted from smart pointers. | |
RTTI stuff | |
typedef CSetOfLinesPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CSetOfLines |
static mrpt::utils::TRuntimeClassId | classCSetOfLines |
static const mrpt::utils::TRuntimeClassId * | classinfo |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
Returns information about the class of an object in runtime. | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. | |
static mrpt::utils::CObject * | CreateObject () |
static CSetOfLinesPtr | Create () |
typedef std::vector<TSegment3D>::const_iterator mrpt::opengl::CSetOfLines::const_iterator |
Const iterator to the set.
Definition at line 188 of file CSetOfLines.h.
typedef std::vector<TSegment3D>::const_reverse_iterator mrpt::opengl::CSetOfLines::const_reverse_iterator |
Const reverse iterator to the set.
Definition at line 192 of file CSetOfLines.h.
typedef std::vector<TSegment3D>::iterator mrpt::opengl::CSetOfLines::iterator |
Iterator to the set.
Definition at line 182 of file CSetOfLines.h.
typedef std::vector<TSegment3D>::reverse_iterator mrpt::opengl::CSetOfLines::reverse_iterator |
Iterator to the set.
Definition at line 183 of file CSetOfLines.h.
A typedef for the associated smart pointer
Definition at line 59 of file CSetOfLines.h.
mrpt::opengl::CSetOfLines::CSetOfLines | ( | ) | [inline, private] |
Constructor.
Definition at line 227 of file CSetOfLines.h.
mrpt::opengl::CSetOfLines::CSetOfLines | ( | const std::vector< TSegment3D > & | sgms | ) | [inline, private] |
Constructor with a initial set of lines.
Definition at line 231 of file CSetOfLines.h.
virtual mrpt::opengl::CSetOfLines::~CSetOfLines | ( | ) | [inline, private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
Definition at line 235 of file CSetOfLines.h.
static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfLines::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
void mrpt::opengl::CSetOfLines::appendLine | ( | const mrpt::math::TSegment3D & | sgm | ) | [inline] |
Appends a line to the set.
Definition at line 88 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::appendLine | ( | float | x0, |
float | y0, | ||
float | z0, | ||
float | x1, | ||
float | y1, | ||
float | z1 | ||
) | [inline] |
Appends a line to the set, given the coordinates of its bounds.
Definition at line 95 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange(), and mrpt::math::TSegment3D.
void mrpt::opengl::CSetOfLines::appendLine | ( | T | p0, |
U | p1 | ||
) | [inline] |
Inserts a line, given its bounds.
Works with any pair of objects with access to x, y and z members.
Definition at line 135 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::appendLines | ( | const T & | sgms | ) | [inline] |
Appends any iterable collection of lines to the set.
Note that this includes another CSetOfLines.
Definition at line 103 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::appendLines | ( | const T_it & | begin, |
const T_it & | end | ||
) | [inline] |
Appends certain amount of lines, located between two iterators, into the set.
Definition at line 111 of file CSetOfLines.h.
References begin(), end(), and mrpt::opengl::CRenderizableDisplayList::notifyChange().
const_iterator mrpt::opengl::CSetOfLines::begin | ( | ) | const [inline] |
iterator mrpt::opengl::CSetOfLines::begin | ( | ) | [inline] |
Definition at line 200 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::clear | ( | void | ) | [inline] |
Clear the list of segments.
Definition at line 68 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
static CSetOfLinesPtr mrpt::opengl::CSetOfLines::Create | ( | ) | [static] |
static CSetOfLinesPtr mrpt::opengl::CSetOfLines::Create | ( | const std::vector< TSegment3D > & | sgms | ) | [inline, static] |
static mrpt::utils::CObject* mrpt::opengl::CSetOfLines::CreateObject | ( | ) | [static] |
virtual mrpt::utils::CObject* mrpt::opengl::CSetOfLines::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
const_iterator mrpt::opengl::CSetOfLines::end | ( | ) | const [inline] |
iterator mrpt::opengl::CSetOfLines::end | ( | ) | [inline] |
Definition at line 208 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::getLineByIndex | ( | size_t | index, |
double & | x0, | ||
double & | y0, | ||
double & | z0, | ||
double & | x1, | ||
double & | y1, | ||
double & | z1 | ||
) | const [inline] |
Gets a specific line in the set, given its index.
Definition at line 162 of file CSetOfLines.h.
References ASSERT_.
size_t mrpt::opengl::CSetOfLines::getLineCount | ( | ) | const [inline] |
Returns the total count of lines in this set.
Definition at line 142 of file CSetOfLines.h.
float mrpt::opengl::CSetOfLines::getLineWidth | ( | ) | const [inline] |
Gets the width with which lines are drawn.
Definition at line 82 of file CSetOfLines.h.
virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfLines::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
const_reverse_iterator mrpt::opengl::CSetOfLines::rbegin | ( | ) | const [inline] |
Beginning const reverse iterator (actually, accesses the end of the set).
Definition at line 213 of file CSetOfLines.h.
const_reverse_iterator mrpt::opengl::CSetOfLines::rend | ( | ) | const [inline] |
Ending const reverse iterator (actually, refers to the starting point of the set).
Definition at line 220 of file CSetOfLines.h.
void mrpt::opengl::CSetOfLines::render_dl | ( | ) | const [virtual] |
Render.
Implements mrpt::opengl::CRenderizableDisplayList.
void mrpt::opengl::CSetOfLines::reserve | ( | size_t | r | ) | [inline] |
Reserves an amount of lines to the set.
This method should be used when some known amount of lines is going to be inserted, so that only a memory allocation is needed.
Definition at line 128 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::resize | ( | size_t | nLines | ) | [inline] |
Resizes the set.
Definition at line 120 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::CSetOfLines::setLineByIndex | ( | size_t | index, |
const TSegment3D & | segm | ||
) |
Sets a specific line in the set, given its index.
void mrpt::opengl::CSetOfLines::setLineByIndex | ( | size_t | index, |
double | x0, | ||
double | y0, | ||
double | z0, | ||
double | x1, | ||
double | y1, | ||
double | z1 | ||
) | [inline] |
Sets a specific line in the set, given its index.
Definition at line 154 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange(), and mrpt::math::TSegment3D.
void mrpt::opengl::CSetOfLines::setLineWidth | ( | float | w | ) | [inline] |
Sets the width with which lines will be drawn.
Definition at line 75 of file CSetOfLines.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
mrpt::utils::CLASSINIT mrpt::opengl::CSetOfLines::_init_CSetOfLines [static, protected] |
Definition at line 59 of file CSetOfLines.h.
Definition at line 59 of file CSetOfLines.h.
const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfLines::classinfo [static] |
Definition at line 59 of file CSetOfLines.h.
float mrpt::opengl::CSetOfLines::mLineWidth [protected] |
Definition at line 62 of file CSetOfLines.h.
std::vector<TSegment3D> mrpt::opengl::CSetOfLines::mSegments [protected] |
Definition at line 61 of file CSetOfLines.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011 |