ug4
selection_util.cpp File Reference
#include <vector>
#include <stack>
#include <queue>
#include "lib_grid/selector.h"
#include "selection_util.h"
#include "geom_obj_util/geom_obj_util.h"
#include "lib_grid/grid/grid_util.h"

Namespaces

 ug
 the ug namespace
 

Functions

template<class TSelector >
void ug::CloseSelection (TSelector &sel)
 Selects all associated elements of lower dimensions. More...
 
template void ug::CloseSelection< MGSelector > (MGSelector &sel)
 
template void ug::CloseSelection< Selector > (Selector &sel)
 
size_t ug::CollectVerticesTouchingSelection (std::vector< Vertex * > &vrtsOut, ISelector &sel)
 Collects all vertices which are selected or which touch a selected element. More...
 
template<class TSelector >
void ug::DeselectBoundarySelectionEdges (TSelector &sel)
 deselects all edges that are connected to unselected elements. More...
 
template void ug::DeselectBoundarySelectionEdges< MGSelector > (MGSelector &)
 
template void ug::DeselectBoundarySelectionEdges< Selector > (Selector &)
 
template<class TSelector >
void ug::DeselectBoundarySelectionFaces (TSelector &sel)
 deselects all faces that are connected to unselected elements. More...
 
template void ug::DeselectBoundarySelectionFaces< MGSelector > (MGSelector &)
 
template void ug::DeselectBoundarySelectionFaces< Selector > (Selector &)
 
template<class TSelector >
void ug::DeselectBoundarySelectionVertices (TSelector &sel)
 deselects all vertices that are connected to unselected elements. More...
 
template void ug::DeselectBoundarySelectionVertices< MGSelector > (MGSelector &)
 
template void ug::DeselectBoundarySelectionVertices< Selector > (Selector &)
 
template<class TSelector >
void ug::EraseSelectedObjects (TSelector &sel)
 Erases selected objects from the associated grid. More...
 
template void ug::EraseSelectedObjects< MGSelector > (MGSelector &)
 
template void ug::EraseSelectedObjects< Selector > (Selector &)
 
template<class TSelector >
void ug::ExtendSelection (TSelector &sel, size_t extSize, ISelector::status_t status)
 extends the selection to neighbours of selected elements. More...
 
template void ug::ExtendSelection< MGSelector > (MGSelector &sel, size_t extSize, ISelector::status_t status)
 
template void ug::ExtendSelection< Selector > (Selector &sel, size_t extSize, ISelector::status_t status)
 
template<class elem_t >
void ug::GetSelectedElementIndices (const ISelector &sel, std::vector< size_t > &indsOut)
 
template<class TSelector >
void ug::InvertSelection (TSelector &sel)
 Inverts the selection. More...
 
template void ug::InvertSelection< MGSelector > (MGSelector &)
 
template void ug::InvertSelection< Selector > (Selector &)
 
void ug::SelectAssociatedGenealogy (MGSelector &msel, bool selectAssociatedElements)
 Selects the complete genealogy of all selected elements. More...
 
template<class TSelector >
void ug::SelectAssociatedGridObjects (TSelector &sel, ISelector::status_t status)
 selects associated geometric objects of selected ones on each level. More...
 
template void ug::SelectAssociatedGridObjects< MGSelector > (MGSelector &sel, ISelector::status_t status)
 
template void ug::SelectAssociatedGridObjects< Selector > (Selector &sel, ISelector::status_t status)
 
template void ug::SelectElementsByIndex< Edge > (ISelector &sel, const std::vector< size_t > &inds)
 
template void ug::SelectElementsByIndex< Face > (ISelector &sel, const std::vector< size_t > &inds)
 
template void ug::SelectElementsByIndex< Vertex > (ISelector &sel, const std::vector< size_t > &inds)
 
template void ug::SelectElementsByIndex< Volume > (ISelector &sel, const std::vector< size_t > &inds)
 
template<class TSelector >
void ug::SelectInnerSelectionEdges (TSelector &sel)
 selects all edges that are only connected to selected elements. More...
 
template void ug::SelectInnerSelectionEdges< MGSelector > (MGSelector &)
 
template void ug::SelectInnerSelectionEdges< Selector > (Selector &)
 
template<class TSelector >
void ug::SelectInnerSelectionFaces (TSelector &sel)
 selects all faces that are only connected to selected elements. More...
 
template void ug::SelectInnerSelectionFaces< MGSelector > (MGSelector &)
 
template void ug::SelectInnerSelectionFaces< Selector > (Selector &)
 
template<class TSelector >
void ug::SelectInnerSelectionVertices (TSelector &sel)
 selects all vertices that are only connected to selected elements. More...
 
template void ug::SelectInnerSelectionVertices< MGSelector > (MGSelector &)
 
template void ug::SelectInnerSelectionVertices< Selector > (Selector &)
 
template<class TGeomObj >
void ug::SelectionFill (Selector &sel, typename Grid::traits< typename TGeomObj::side >::callback cbRegionBoundary)
 Extends the selection around selected objects until selected sides are reached. More...
 
template void ug::SelectionFill< Edge > (Selector &, Grid::vertex_traits::callback)
 
template void ug::SelectionFill< Face > (Selector &, Grid::edge_traits::callback)
 
template void ug::SelectionFill< Volume > (Selector &, Grid::face_traits::callback)
 
void ug::SelectLinkedFlatAndDegeneratedFaces (Selector &sel, number maxDeviationAngle, bool ignoreOrientation=false, bool stopAtSelectedEdges=false, number degThreshold=SMALL, APosition &aPos=aPosition)
 Extends the selection of faces to all neighbouring faces that have a similar normal. More...
 
void ug::SelectLinkedFlatFaces (Selector &sel, number maxDeviationAngle, bool ignoreOrientation=false, bool stopAtSelectedEdges=false, APosition &aPos=aPosition)
 Extends the selection of faces to all neighbouring faces that have a similar normal. More...
 
template<class TIterator >
static void ug::SelectParents (MultiGrid &mg, MGSelector &msel, TIterator iterBegin, TIterator iterEnd)
 helper for SelectAssociatedGenealogy. More...
 
void ug::SelectSmoothEdgePath (Selector &sel, number thresholdDegree, number normalWeight, bool stopAtSelVrts=true, APosition &aPos=aPosition)
 selects for each selected edge all edges that can be reached by a smooth path. More...
 
void ug::SelectSubset (ISelector &sel, const ISubsetHandler &sh, int si, ISelector::status_t status)
 Select all elements specified by a subset index ans selection status. More...
 
void ug::GetSelectedElementIndices (const ISelector &sel, std::vector< size_t > &vrtIndsOut, std::vector< size_t > &edgeIndsOut, std::vector< size_t > &faceIndsOut, std::vector< size_t > &volIndsOut)
 Returns indices of selected elements in ascending order. More...
 
template<class elem_t >
void ug::SelectElementsByIndex (ISelector &sel, const std::vector< size_t > &inds)
 Selects elements with the specified indices. More...
 
void ug::SelectElementsByIndex (ISelector &sel, const std::vector< size_t > &vrtInds, const std::vector< size_t > &edgeInds, const std::vector< size_t > &faceInds, const std::vector< size_t > &volInds)
 Selects elements with the specified indices. More...