MRPT logo

mrpt::opengl::CSetOfLines Class Reference

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

#include <mrpt/opengl/CSetOfLines.h>

Inheritance diagram for mrpt::opengl::CSetOfLines:

mrpt::opengl::CRenderizable mrpt::utils::CSerializable

List of all members.

Public Types

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, float x0, float y0, float z0, float x1, float y1, float z1)
 Sets a specific line in the set, given its index.
void render () const
 Render.
const_iterator begin () const
 Beginning const iterator.
const_iterator end () const
 Ending const iterator.
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.


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

Definition at line 50 of file CSetOfLines.h.


Member Typedef Documentation

Const iterator to the set.

Definition at line 155 of file CSetOfLines.h.

Const reverse iterator to the set.

Definition at line 159 of file CSetOfLines.h.


Constructor & Destructor Documentation

mrpt::opengl::CSetOfLines::CSetOfLines (  )  [inline, private]

Constructor.

Definition at line 192 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 196 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 200 of file CSetOfLines.h.


Member Function Documentation

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 120 of file CSetOfLines.h.

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 85 of file CSetOfLines.h.

References mrpt::math::TSegment3D.

void mrpt::opengl::CSetOfLines::appendLine ( const mrpt::math::TSegment3D sgm  )  [inline]

Appends a line to the set.

Definition at line 79 of file CSetOfLines.h.

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 99 of file CSetOfLines.h.

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 92 of file CSetOfLines.h.

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

Beginning const iterator.

See also:
end,rbegin,rend

Definition at line 164 of file CSetOfLines.h.

void mrpt::opengl::CSetOfLines::clear ( void   )  [inline]

Clear the list of segments.

Definition at line 61 of file CSetOfLines.h.

static CSetOfLinesPtr mrpt::opengl::CSetOfLines::Create ( const std::vector< TSegment3D > &  sgms  )  [inline, static]

Class factory.

Definition at line 144 of file CSetOfLines.h.

References mrpt::opengl::CSetOfLines.

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

Ending const iterator.

See also:
begin,rend,rbegin

Definition at line 171 of file CSetOfLines.h.

size_t mrpt::opengl::CSetOfLines::getLineCount (  )  const [inline]

Returns the total count of lines in this set.

Definition at line 126 of file CSetOfLines.h.

float mrpt::opengl::CSetOfLines::getLineWidth (  )  const [inline]

Gets the width with which lines are drawn.

Definition at line 73 of file CSetOfLines.h.

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 178 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 185 of file CSetOfLines.h.

void mrpt::opengl::CSetOfLines::render (  )  const [virtual]

Render.

Implements mrpt::opengl::CRenderizable.

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 114 of file CSetOfLines.h.

void mrpt::opengl::CSetOfLines::resize ( size_t  nLines  )  [inline]

Resizes the set.

See also:
reserve

Definition at line 107 of file CSetOfLines.h.

void mrpt::opengl::CSetOfLines::setLineByIndex ( size_t  index,
float  x0,
float  y0,
float  z0,
float  x1,
float  y1,
float  z1 
) [inline]

Sets a specific line in the set, given its index.

See also:
appendLine

Definition at line 138 of file CSetOfLines.h.

References mrpt::math::TSegment3D.

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::setLineWidth ( float  w  )  [inline]

Sets the width with which lines will be drawn.

Definition at line 67 of file CSetOfLines.h.


Member Data Documentation

Definition at line 55 of file CSetOfLines.h.

Definition at line 54 of file CSetOfLines.h.




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:21:34 EDT 2009