Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions

mrpt::opengl::CSetOfLines Class Reference


Detailed Description

A set of independent lines (or segments), one line with its own start and end positions (X,Y,Z).

See also:
opengl::COpenGLScene
mrpt::opengl::CSetOfLines
preview_CSetOfLines.png

Definition at line 57 of file CSetOfLines.h.

#include <mrpt/opengl/CSetOfLines.h>

Inheritance diagram for mrpt::opengl::CSetOfLines:
Inheritance graph
[legend]

List of all members.

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< TSegment3DmSegments
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::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CSetOfLinesPtr Create ()

Member Typedef Documentation

Const iterator to the set.

Definition at line 188 of file CSetOfLines.h.

Const reverse iterator to the set.

Definition at line 192 of file CSetOfLines.h.

Iterator to the set.

Definition at line 182 of file CSetOfLines.h.

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CSetOfLines::_GetBaseClass ( ) [static, protected]
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.

template<class T , class U >
void mrpt::opengl::CSetOfLines::appendLine ( p0,
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().

template<class T >
void mrpt::opengl::CSetOfLines::appendLines ( const T &  sgms) [inline]

Appends any iterable collection of lines to the set.

Note that this includes another CSetOfLines.

See also:
appendLine

Definition at line 103 of file CSetOfLines.h.

References mrpt::opengl::CRenderizableDisplayList::notifyChange().

template<class T_it >
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.

See also:
appendLine

Definition at line 111 of file CSetOfLines.h.

References begin(), end(), and mrpt::opengl::CRenderizableDisplayList::notifyChange().

const_iterator mrpt::opengl::CSetOfLines::begin ( ) const [inline]

Beginning const iterator.

See also:
end,rbegin,rend

Definition at line 197 of file CSetOfLines.h.

iterator mrpt::opengl::CSetOfLines::begin ( ) [inline]
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]

Class factory.

Definition at line 174 of file CSetOfLines.h.

References mrpt::opengl::CSetOfLines.

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]

Ending const iterator.

See also:
begin,rend,rbegin

Definition at line 205 of file CSetOfLines.h.

iterator mrpt::opengl::CSetOfLines::end ( ) [inline]
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.

See also:
getLineByIndex

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).

See also:
rend,begin,end

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).

See also:
rbegin,end,begin

Definition at line 220 of file CSetOfLines.h.

void mrpt::opengl::CSetOfLines::render_dl ( ) const [virtual]
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.

See also:
resize

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.

See also:
reserve

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.

See also:
appendLine
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.

See also:
appendLine

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().


Member Data Documentation

Definition at line 59 of file CSetOfLines.h.

Definition at line 59 of file CSetOfLines.h.

Definition at line 59 of file CSetOfLines.h.

Definition at line 62 of file CSetOfLines.h.

Definition at line 61 of file CSetOfLines.h.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011