Developer Documentation
PolyLineCollectionT< T > Class Template Reference

Classes

struct  index_iterator
 
struct  iterator
 

Public Types

typedef ACG::PolyLineT< T > PolyLine
 

Public Member Functions

virtual ~PolyLineCollectionT ()
 Destructor. More...
 
size_t add_poly_line (PolyLine *_poly_line)
 
int new_poly_line ()
 Create empty polyline and return id. More...
 
void reserve (size_t _count)
 Reserve space for additional _count polylines.
 
void set_visible_all ()
 Set all polylines to visible. More...
 
void set_visible (const std::vector< size_t > &_visible)
 Set given polylines to visible. More...
 
void set_selected (const std::vector< size_t > &_selected)
 Set given polylines to selected. More...
 
void clear_selection ()
 unselect all polylines in collection
 
void clear ()
 Clear Collection. More...
 
void remove_polyline (int _id)
 Remove one polyline from the collection. More...
 
Access functions
size_t n_polylines ()
 
PolyLinepolyline (size_t _i)
 
size_t n_visible_polylines ()
 
PolyLinevisible_polyline (size_t _i)
 
Iterators
iterator iter ()
 
index_iterator visible_iter ()
 
index_iterator selected_iter ()
 
Coloring
void set_color (size_t _edge_scalar, const ACG::Vec4uc &_color)
 
ACG::Vec4uc color (size_t _edge_scalar)
 

Protected Attributes

std::vector< PolyLine * > poly_lines_
 
std::vector< size_t > visible_
 
std::vector< size_t > selected_
 
std::queue< size_t > empty_slots_
 
std::map< size_t, ACG::Vec4uccolor_map_
 

Detailed Description

template<typename T>
class PolyLineCollectionT< T >

Definition at line 49 of file PolyLineCollectionT.hh.

Constructor & Destructor Documentation

◆ ~PolyLineCollectionT()

template<typename T >
virtual PolyLineCollectionT< T >::~PolyLineCollectionT ( )
inlinevirtual

Destructor.

The destructor will call delete on all PolyLines in the PolyLine Collection!

Definition at line 125 of file PolyLineCollectionT.hh.

Member Function Documentation

◆ add_poly_line()

template<typename T >
size_t PolyLineCollectionT< T >::add_poly_line ( PolyLine _poly_line)
inline

Create a new polyline in the collection

Parameters
_poly_lineThe new polyline to be added to the collection
Returns
Index of the new polyline in the collection

Definition at line 137 of file PolyLineCollectionT.hh.

◆ clear()

template<typename T >
void PolyLineCollectionT< T >::clear ( void  )
inline

Clear Collection.

This will call delete on all polylines in the collection!

Definition at line 242 of file PolyLineCollectionT.hh.

◆ new_poly_line()

template<typename T >
int PolyLineCollectionT< T >::new_poly_line ( )
inline

Create empty polyline and return id.

Returns
Index of new polyline in collection

Definition at line 163 of file PolyLineCollectionT.hh.

◆ remove_polyline()

template<typename T >
void PolyLineCollectionT< T >::remove_polyline ( int  _id)
inline

Remove one polyline from the collection.

This will also call delete on the given polyline!

Parameters
_idId of the polyline to be removed

Definition at line 259 of file PolyLineCollectionT.hh.

◆ set_selected()

template<typename T >
void PolyLineCollectionT< T >::set_selected ( const std::vector< size_t > &  _selected)
inline

Set given polylines to selected.

Parameters
_selectedPolyLine indices to set selected

Definition at line 228 of file PolyLineCollectionT.hh.

◆ set_visible()

template<typename T >
void PolyLineCollectionT< T >::set_visible ( const std::vector< size_t > &  _visible)
inline

Set given polylines to visible.

Parameters
_visiblePolyLine indices to set visible

Definition at line 219 of file PolyLineCollectionT.hh.

◆ set_visible_all()

template<typename T >
void PolyLineCollectionT< T >::set_visible_all ( )
inline

Set all polylines to visible.

Definition at line 206 of file PolyLineCollectionT.hh.


The documentation for this class was generated from the following file: