33 #ifndef __H__LIBGRID__SELECTOR_INTERFACE__
34 #define __H__LIBGRID__SELECTOR_INTERFACE__
153 inline void select(
GridObject* elem,
byte status);
157 template <
class TElem>
158 inline void select(TElem* elem,
byte status);
159 template <
class TElem>
163 template <
class TIterator>
164 inline void select(TIterator iterBegin, TIterator iterEnd,
byte status = 1);
171 template <
class TElem>
175 template <
class TElem>
176 inline void mark(TElem* elem,
byte status)
177 {select(elem, status);}
184 template <
class TElem>
185 inline void deselect(TElem* elem);
187 template <
class TIterator>
188 inline void deselect(TIterator iterBegin, TIterator iterEnd);
192 template <
class TElem>
199 inline byte get_selection_status(
GridObject* elem)
const;
209 template <
class TElem>
211 {
return get_selection_status(elem);}
214 template <
class TElem>
215 inline bool is_selected(TElem* elem)
const {
return get_selection_status(elem) != 0;}
225 inline bool elements_are_supported(
uint shElements)
const;
228 void enable_autoselection(
bool bEnable);
232 void enable_selection_inheritance(
bool bEnable);
240 void enable_strict_inheritance(
bool bEnable);
247 virtual void grid_to_be_destroyed(
Grid* grid);
248 virtual void elements_to_be_cleared(
Grid* grid);
251 virtual void vertex_created(
Grid* grid,
Vertex* vrt,
253 bool replacesParent =
false);
255 virtual void edge_created(
Grid* grid,
Edge* e,
257 bool replacesParent =
false);
259 virtual void face_created(
Grid* grid,
Face* f,
261 bool replacesParent =
false);
263 virtual void volume_created(
Grid* grid,
Volume* vol,
265 bool replacesParent =
false);
267 virtual void vertex_to_be_erased(
Grid* grid,
Vertex* vrt,
268 Vertex* replacedBy = NULL);
270 virtual void edge_to_be_erased(
Grid* grid,
Edge* e,
271 Edge* replacedBy = NULL);
273 virtual void face_to_be_erased(
Grid* grid,
Face* f,
274 Face* replacedBy = NULL);
276 virtual void volume_to_be_erased(
Grid* grid,
Volume* vol,
277 Volume* replacedBy = NULL);
314 virtual void broadcast_selection_states(
bool deselect =
false,
315 bool includeGhosts =
false);
345 void set_grid(
Grid* grid);
351 void set_supported_elements(
uint shElements);
356 void enable_element_support(
uint shElements);
361 void disable_element_support(
uint shElements);
374 template <
class TElem>
375 void elems_to_be_merged(
Grid* grid, TElem*
target,
376 TElem* elem1, TElem* elem2);
382 template <
class TIntfcCom>
383 void broadcast_selection_states(
bool deselect,
bool includeGhosts,
Performs communication between interfaces on different processes.
Definition: pcl_interface_communicator.h:68
A linked list of elements living in an attachment.
Definition: attached_list.h:182
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
the generic attachment-accessor for access to grids attachment pipes.
Definition: grid.h:182
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
a helper class that holds a collection of possibly unconnected geometric-objects.
Definition: grid_object_collection.h:96
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Definition: grid_observer.h:80
base-implementation of a selector
Definition: selector_interface.h:126
pcl::InterfaceCommunicator< VolumeLayout > m_icomVOL
Definition: selector_interface.h:407
virtual GridObjectCollection get_grid_objects() const =0
returns a geometric object collection, containing all selected objects
AUChar m_aSelected
Definition: selector_interface.h:396
void unmark(TElem *elem)
deselects an element
Definition: selector_interface.h:193
bool is_selected(TElem *elem) const
returns true if an element is selected
Definition: selector_interface.h:215
Grid::traits< Face >::SectionContainer FaceSectionContainer
Definition: selector_interface.h:325
Grid::traits< Edge >::AttachedElementList AttachedEdgeList
Definition: selector_interface.h:319
bool m_bStrictInheritanceEnabled
Definition: selector_interface.h:392
void mark_selected(Face *elem, byte status)
Definition: selector_interface.h:365
virtual void add_to_list(Vertex *elem)=0
Grid::traits< Vertex >::AttachedElementList AttachedVertexList
Definition: selector_interface.h:318
pcl::InterfaceCommunicator< EdgeLayout > m_icomEDGE
Definition: selector_interface.h:405
virtual void add_to_list(Face *elem)=0
virtual void erase_from_list(Vertex *elem)=0
bool strict_inheritance_enabled()
Definition: selector_interface.h:241
Grid * grid() const
Definition: selector_interface.h:218
Grid::traits< Edge >::SectionContainer EdgeSectionContainer
Definition: selector_interface.h:324
ISelector(const ISelector &sel)
Definition: selector_interface.h:379
void mark_deselected(Volume *elem)
Definition: selector_interface.h:371
byte get_selection_status(Vertex *vrt) const
returns the selection state of the specified elelent
Definition: selector_interface.h:200
Grid::traits< Face >::AttachedElementList AttachedFaceList
Definition: selector_interface.h:320
byte get_mark(TElem *elem) const
returns the selection state of the specified elelent
Definition: selector_interface.h:210
void select(GridObject *elem)
selects an element
Definition: selector_interface.h:154
virtual bool contains_faces() const =0
returns true if the selector contains faces
Grid::traits< Vertex >::SectionContainer VertexSectionContainer
Definition: selector_interface.h:323
Grid::AttachmentAccessor< Face, AUChar > m_aaSelFACE
Definition: selector_interface.h:400
Attachment< unsigned char > AUChar
Definition: selector_interface.h:395
Grid::AttachmentAccessor< Vertex, AUChar > m_aaSelVRT
Definition: selector_interface.h:398
void select(TElem *elem)
selects an element
Definition: selector_interface.h:160
Grid::traits< Volume >::SectionContainer VolumeSectionContainer
Definition: selector_interface.h:326
virtual bool contains_edges() const =0
returns true if the selector contains edges
void mark(TElem *elem, byte status)
selects an element
Definition: selector_interface.h:176
void mark_deselected(Face *elem)
Definition: selector_interface.h:370
virtual void erase_from_list(Face *elem)=0
pcl::InterfaceCommunicator< FaceLayout > m_icomFACE
Definition: selector_interface.h:406
byte get_selection_status(Volume *vol) const
returns the selection state of the specified elelent
Definition: selector_interface.h:203
virtual void add_to_list(Volume *elem)=0
virtual void erase_from_list(Volume *elem)=0
bool selection_inheritance_enabled()
Definition: selector_interface.h:233
void mark_deselected(Vertex *elem)
Definition: selector_interface.h:368
void mark_selected(Vertex *elem, byte status)
Definition: selector_interface.h:363
bool autoselection_enabled()
Definition: selector_interface.h:229
void mark_selected(Edge *elem, byte status)
Definition: selector_interface.h:364
virtual void erase_from_list(Edge *elem)=0
byte get_selection_status(Edge *edge) const
returns the selection state of the specified elelent
Definition: selector_interface.h:201
uint m_supportedElements
Definition: selector_interface.h:389
bool m_bAutoselectionEnabled
Definition: selector_interface.h:390
byte get_selection_status(Face *face) const
returns the selection state of the specified elelent
Definition: selector_interface.h:202
virtual bool contains_vertices() const =0
returns true if the selector contains vertices
Grid * m_pGrid
Definition: selector_interface.h:388
Grid::AttachmentAccessor< Volume, AUChar > m_aaSelVOL
Definition: selector_interface.h:401
byte status_t
Definition: selector_interface.h:128
void mark(TElem *elem)
selects an element
Definition: selector_interface.h:172
void mark_deselected(Edge *elem)
Definition: selector_interface.h:369
virtual bool contains_volumes() const =0
returns true if the selector contains volumes
Grid::traits< Volume >::AttachedElementList AttachedVolumeList
Definition: selector_interface.h:321
bool m_bSelectionInheritanceEnabled
Definition: selector_interface.h:391
virtual void add_to_list(Edge *elem)=0
void mark_selected(Volume *elem, byte status)
Definition: selector_interface.h:366
pcl::InterfaceCommunicator< VertexLayout > m_icomVRT
Definition: selector_interface.h:404
Grid::AttachmentAccessor< Edge, AUChar > m_aaSelEDGE
Definition: selector_interface.h:399
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
#define UG_API
Definition: ug_config.h:65
unsigned int uint
Definition: types.h:114
size_t target(SM_edge< typename T::value_type > const &e, ug::BidirectionalMatrix< T > const &m)
Definition: bidirectional_boost.h:100