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

Member Typedef Documentation

◆ PolyLine

template<typename T >
typedef ACG::PolyLineT<T> PolyLineCollectionT< T >::PolyLine

Definition at line 51 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.

◆ clear_selection()

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

unselect all polylines in collection

Definition at line 234 of file PolyLineCollectionT.hh.

◆ color()

template<typename T >
ACG::Vec4uc PolyLineCollectionT< T >::color ( size_t  _edge_scalar)
inline

Definition at line 272 of file PolyLineCollectionT.hh.

◆ iter()

template<typename T >
iterator PolyLineCollectionT< T >::iter ( )
inline

Definition at line 198 of file PolyLineCollectionT.hh.

◆ n_polylines()

template<typename T >
size_t PolyLineCollectionT< T >::n_polylines ( )
inline

Definition at line 186 of file PolyLineCollectionT.hh.

◆ n_visible_polylines()

template<typename T >
size_t PolyLineCollectionT< T >::n_visible_polylines ( )
inline

Definition at line 189 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.

◆ polyline()

template<typename T >
PolyLine * PolyLineCollectionT< T >::polyline ( size_t  _i)
inline

Definition at line 187 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.

◆ reserve()

template<typename T >
void PolyLineCollectionT< T >::reserve ( size_t  _count)
inline

Reserve space for additional _count polylines.

Definition at line 177 of file PolyLineCollectionT.hh.

◆ selected_iter()

template<typename T >
index_iterator PolyLineCollectionT< T >::selected_iter ( )
inline

Definition at line 200 of file PolyLineCollectionT.hh.

◆ set_color()

template<typename T >
void PolyLineCollectionT< T >::set_color ( size_t  _edge_scalar,
const ACG::Vec4uc _color 
)
inline

Definition at line 271 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.

◆ visible_iter()

template<typename T >
index_iterator PolyLineCollectionT< T >::visible_iter ( )
inline

Definition at line 199 of file PolyLineCollectionT.hh.

◆ visible_polyline()

template<typename T >
PolyLine * PolyLineCollectionT< T >::visible_polyline ( size_t  _i)
inline

Definition at line 190 of file PolyLineCollectionT.hh.

Member Data Documentation

◆ color_map_

template<typename T >
std::map<size_t, ACG::Vec4uc> PolyLineCollectionT< T >::color_map_
protected

Definition at line 283 of file PolyLineCollectionT.hh.

◆ empty_slots_

template<typename T >
std::queue<size_t> PolyLineCollectionT< T >::empty_slots_
protected

Definition at line 280 of file PolyLineCollectionT.hh.

◆ poly_lines_

template<typename T >
std::vector<PolyLine*> PolyLineCollectionT< T >::poly_lines_
protected

Definition at line 276 of file PolyLineCollectionT.hh.

◆ selected_

template<typename T >
std::vector<size_t> PolyLineCollectionT< T >::selected_
protected

Definition at line 278 of file PolyLineCollectionT.hh.

◆ visible_

template<typename T >
std::vector<size_t> PolyLineCollectionT< T >::visible_
protected

Definition at line 277 of file PolyLineCollectionT.hh.


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