Developer Documentation
MeshSelectionT.hh File Reference

Functions for selection on a mesh. More...

#include <vector>

Go to the source code of this file.

Functions

Vertex Selection
template<typename MeshT >
void MeshSelection::selectVertices (MeshT *_mesh, const std::vector< int > &_vertices)
 Select given vertices of a mesh.
 
template<typename MeshT >
void MeshSelection::unselectVertices (MeshT *_mesh, const std::vector< int > &_vertices)
 Unselect given vertices of a mesh.
 
template<typename MeshT >
void MeshSelection::selectAllVertices (MeshT *_mesh)
 Select all vertices of a mesh.
 
template<typename MeshT >
void MeshSelection::clearVertexSelection (MeshT *_mesh)
 Set all vertices to unselected.
 
template<typename MeshT >
void MeshSelection::invertVertexSelection (MeshT *_mesh)
 invert vertex selection
 
template<typename MeshT >
void MeshSelection::selectBoundaryVertices (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::shrinkVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::growVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
std::vector< int > MeshSelection::getVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
std::vector< int > MeshSelection::getVertexSelection (MeshT *_mesh, bool &_invert)
 
template<typename MeshT >
void MeshSelection::selectBoundaryVertices (MeshT *_mesh, const typename MeshT::VertexHandle &_vh)
 
template<typename MeshT >
void MeshSelection::convertVertexToEdgeSelection (MeshT *_mesh, const std::vector< int > &_vertices)
 
template<typename MeshT >
void MeshSelection::convertVertexToEdgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertVertexToHalfedgeSelection (MeshT *_mesh, const std::vector< int > &_vertices)
 
template<typename MeshT >
void MeshSelection::convertVertexToHalfedgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertVertexToFaceSelection (MeshT *_mesh, const std::vector< int > &_vertices)
 
template<typename MeshT >
void MeshSelection::convertVertexToFaceSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertVertexSelectionToFeatureVertices (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertFeatureVerticesToVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::clearFeatureVertices (MeshT *_mesh)
 
Modeling Regions
template<typename MeshT >
void MeshSelection::setArea (MeshT *_mesh, const std::vector< int > &_vertices, unsigned int _type, bool _state)
 
template<typename MeshT >
void MeshSelection::setArea (MeshT *_mesh, unsigned int _type, bool _state)
 
template<typename MeshT >
std::vector< int > MeshSelection::getArea (MeshT *_mesh, unsigned int _type)
 
template<typename MeshT >
std::vector< int > MeshSelection::getArea (MeshT *_mesh, unsigned int _type, bool &_invert)
 
Edge Selection
template<typename MeshT >
void MeshSelection::selectEdges (MeshT *_mesh, const std::vector< int > &_edges)
 Select given edges of a mesh.
 
template<typename MeshT >
void MeshSelection::unselectEdges (MeshT *_mesh, const std::vector< int > &_edges)
 Unselect given edges of a mesh.
 
template<typename MeshT >
void MeshSelection::selectAllEdges (MeshT *_mesh)
 Select all edges of a mesh.
 
template<typename MeshT >
void MeshSelection::clearEdgeSelection (MeshT *_mesh)
 Set all edges to unselected.
 
template<typename MeshT >
void MeshSelection::invertEdgeSelection (MeshT *_mesh)
 Invert Edge selection.
 
template<typename MeshT >
void MeshSelection::growEdgeSelection (MeshT *_mesh)
 Invert Edge selection.
 
template<typename MeshT >
void MeshSelection::selectBoundaryEdges (MeshT *_mesh)
 Select all boundary edges of a mesh.
 
template<typename MeshT >
std::vector< int > MeshSelection::getEdgeSelection (MeshT *_mesh)
 
template<typename MeshT >
std::vector< int > MeshSelection::getEdgeSelection (MeshT *_mesh, bool &_invert)
 
template<typename MeshT >
void MeshSelection::convertEdgeToVertexSelection (MeshT *_mesh, const std::vector< int > &_edges)
 
template<typename MeshT >
void MeshSelection::convertEdgeToVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertEdgeToFaceSelection (MeshT *_mesh, const std::vector< int > &_edges)
 
template<typename MeshT >
void MeshSelection::convertEdgeToFaceSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertEdgeToHalfedgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertEdgeSelectionToFeatureEdges (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertFeatureEdgesToEdgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::clearFeatureEdges (MeshT *_mesh)
 
Halfedge Selection
template<typename MeshT >
void MeshSelection::selectHalfedges (MeshT *_mesh, const std::vector< int > &_halfedges)
 Select given edges of a mesh.
 
template<typename MeshT >
void MeshSelection::unselectHalfedges (MeshT *_mesh, const std::vector< int > &_halfedges)
 Unselect given edges of a mesh.
 
template<typename MeshT >
void MeshSelection::selectAllHalfedges (MeshT *_mesh)
 Select all edges of a mesh.
 
template<typename MeshT >
void MeshSelection::clearHalfedgeSelection (MeshT *_mesh)
 Set all edges to unselected.
 
template<typename MeshT >
void MeshSelection::invertHalfedgeSelection (MeshT *_mesh)
 Invert Edge selection.
 
template<typename MeshT >
void MeshSelection::selectBoundaryHalfedges (MeshT *_mesh)
 Select all boundary edges of a mesh.
 
template<typename MeshT >
std::vector< int > MeshSelection::getHalfedgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertHalfedgeToVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertHalfedgeToEdgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertHalfedgeToFaceSelection (MeshT *_mesh)
 
Face Selection
template<typename MeshT >
void MeshSelection::selectFaces (MeshT *_mesh, const std::vector< int > &_faces)
 Select given faces of a mesh.
 
template<typename MeshT >
void MeshSelection::unselectFaces (MeshT *_mesh, const std::vector< int > &_faces)
 Unselect given faces of a mesh.
 
template<typename MeshT >
void MeshSelection::selectAllFaces (MeshT *_mesh)
 Select all faces of a mesh.
 
template<typename MeshT >
void MeshSelection::clearFaceSelection (MeshT *_mesh)
 Set all faces to unselected.
 
template<typename MeshT >
void MeshSelection::invertFaceSelection (MeshT *_mesh)
 Invert face selection.
 
template<typename MeshT >
void MeshSelection::selectBoundaryFaces (MeshT *_mesh)
 Select all boundary faces of a mesh.
 
template<typename MeshT >
void MeshSelection::shrinkFaceSelection (MeshT *_mesh)
 Shrink Face selection. More...
 
template<typename MeshT >
void MeshSelection::growFaceSelection (MeshT *_mesh)
 Grow Face selection. More...
 
template<typename MeshT >
std::vector< int > MeshSelection::getFaceSelection (MeshT *_mesh)
 
template<typename MeshT >
std::vector< int > MeshSelection::getFaceSelection (MeshT *_mesh, bool &_invert)
 
template<typename MeshT >
void MeshSelection::convertFaceToVertexSelection (MeshT *_mesh, const std::vector< int > &_faces)
 
template<typename MeshT >
void MeshSelection::convertFaceToVertexSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertFaceToEdgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertFaceToHalfedgeSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertFaceSelectionToFeatureFaces (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::convertFeatureFacesToFaceSelection (MeshT *_mesh)
 
template<typename MeshT >
void MeshSelection::clearFeatureFaces (MeshT *_mesh)
 

Detailed Description

Functions for selection on a mesh.

Definition in file MeshSelectionT.hh.

Function Documentation

template<typename MeshT >
void MeshSelection::clearFeatureEdges ( MeshT *  _mesh)
inline

Clear all features

Definition at line 791 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::clearFeatureFaces ( MeshT *  _mesh)
inline

Clear all features

Definition at line 1219 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::clearFeatureVertices ( MeshT *  _mesh)
inline

Clear all features

Definition at line 451 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertEdgeSelectionToFeatureEdges ( MeshT *  _mesh)
inline

Convert edge selection to feature selection

Definition at line 761 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertEdgeToFaceSelection ( MeshT *  _mesh,
const std::vector< int > &  _edges 
)
inline

Select for each edge in _edges all adjacent faces

Parameters
_edgesList of edges to be converted

Definition at line 700 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertEdgeToFaceSelection ( MeshT *  _mesh)
inline

For each selected edge select all adjacent faces

Definition at line 726 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertEdgeToHalfedgeSelection ( MeshT *  _mesh)
inline

For each selected edge select all halfedges

Definition at line 748 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertEdgeToVertexSelection ( MeshT *  _mesh,
const std::vector< int > &  _edges 
)
inline

Select for each edge in _edges all incident vertices

Parameters
_edgesList of edges to be converted

Definition at line 665 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertEdgeToVertexSelection ( MeshT *  _mesh)
inline

For each selected edge select all incident vertices

Definition at line 682 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFaceSelectionToFeatureFaces ( MeshT *  _mesh)
inline

Convert face selection to feature selection

Definition at line 1189 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFaceToEdgeSelection ( MeshT *  _mesh)
inline

For each selected face select all adjacent edges

Definition at line 1159 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFaceToHalfedgeSelection ( MeshT *  _mesh)
inline

For each selected face select all incident halfedges

Definition at line 1174 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFaceToVertexSelection ( MeshT *  _mesh,
const std::vector< int > &  _faces 
)
inline

Select for each face in _faces all adjacent vertices

Parameters
_facesList of faces to be converted

Definition at line 1112 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFaceToVertexSelection ( MeshT *  _mesh)
inline

For each selected face select all adjacent vertices

Definition at line 1128 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFeatureEdgesToEdgeSelection ( MeshT *  _mesh)
inline

Convert feature selection to edge selection

Definition at line 776 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFeatureFacesToFaceSelection ( MeshT *  _mesh)
inline

Convert feature selection to edge selection

Definition at line 1204 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertFeatureVerticesToVertexSelection ( MeshT *  _mesh)
inline

Convert feature selection to vertex selection

Definition at line 436 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertHalfedgeToEdgeSelection ( MeshT *  _mesh)
inline

For each halfedge select all edges

Definition at line 904 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertHalfedgeToFaceSelection ( MeshT *  _mesh)
inline

For each halfedge select all incident faces

Definition at line 916 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertHalfedgeToVertexSelection ( MeshT *  _mesh)
inline

For each halfedge select all incident vertices

Definition at line 891 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexSelectionToFeatureVertices ( MeshT *  _mesh)
inline

Convert vertex selection to feature selection

Definition at line 421 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexToEdgeSelection ( MeshT *  _mesh,
const std::vector< int > &  _vertices 
)
inline

Select for each vertex in _vertices all incident edges

Parameters
_verticesList of vertices to be converted

Definition at line 282 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexToEdgeSelection ( MeshT *  _mesh)
inline

For each selected vertex select all incident edges

Definition at line 305 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexToFaceSelection ( MeshT *  _mesh,
const std::vector< int > &  _vertices 
)
inline

Select for each vertex in _vertices all adjacent faces

Parameters
_verticesList of vertices to be converted

Definition at line 373 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexToFaceSelection ( MeshT *  _mesh)
inline

For each selected vertex select all adjacent faces

Definition at line 399 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexToHalfedgeSelection ( MeshT *  _mesh,
const std::vector< int > &  _vertices 
)
inline

Select for each vertex in _vertices all incident halfedges

Parameters
_verticesList of vertices to be converted

Definition at line 325 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::convertVertexToHalfedgeSelection ( MeshT *  _mesh)
inline

For each selected vertex select all incident halfedges

Definition at line 349 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getArea ( MeshT *  _mesh,
unsigned int  _type 
)
inline

Get the current vertex selection

Definition at line 484 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getArea ( MeshT *  _mesh,
unsigned int  _type,
bool &  _invert 
)
inline

Get the current vertex selection

Parameters
_invertif true : vector has been inverted to save mem

Definition at line 496 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getEdgeSelection ( MeshT *  _mesh)
inline

Get the current edge selection

Definition at line 628 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getEdgeSelection ( MeshT *  _mesh,
bool &  _invert 
)
inline

Get the current edge selection

Parameters
_invertif true : vector has been inverted to save mem

Definition at line 642 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getFaceSelection ( MeshT *  _mesh)
inline

Get the current face selection

Definition at line 1075 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getFaceSelection ( MeshT *  _mesh,
bool &  _invert 
)
inline

Get the current face selection

Parameters
_invertif true : vector has been inverted to save mem

Definition at line 1089 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getHalfedgeSelection ( MeshT *  _mesh)
inline

Get the current edge selection

Definition at line 879 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getVertexSelection ( MeshT *  _mesh)
inline

Get the current vertex selection

Definition at line 210 of file MeshSelectionT.cc.

template<typename MeshT >
std::vector< int > MeshSelection::getVertexSelection ( MeshT *  _mesh,
bool &  _invert 
)
inline

Get the current vertex selection

Parameters
_invertif true : vector has been inverted to save mem

Definition at line 224 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::growFaceSelection ( MeshT *  _mesh)
inline

Grow Face selection.

Selects all faces which are adjacent to a vertex of a already selected face.

Definition at line 1050 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::growVertexSelection ( MeshT *  _mesh)
inline

grow the vertex selection

Definition at line 187 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::selectBoundaryVertices ( MeshT *  _mesh)
inline

Select all vertices of the mesh which are boundary vertices

Definition at line 143 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::selectBoundaryVertices ( MeshT *  _mesh,
const typename MeshT::VertexHandle &  _vh 
)
inline

Select all vertices belonging to the same boundary as _vh

This function gets one vertex that has to be on a boundary. Than the function will follow the boundary and mark all vertices at it as selected.

Parameters
_vhhandle of a boundary vertex

Definition at line 248 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::setArea ( MeshT *  _mesh,
const std::vector< int > &  _vertices,
unsigned int  _type,
bool  _state 
)
inline

Set the area bit for all defined vertices

Parameters
_verticesThe vertices belonging to the modeling area
_typeBit to be changed ( Normally Modeling area is OpenMesh::Attributes::UNUSED << 1 )

Definition at line 465 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::setArea ( MeshT *  _mesh,
unsigned int  _type,
bool  _state 
)
inline

Reset Modeling Status for vertices

Definition at line 477 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::shrinkFaceSelection ( MeshT *  _mesh)
inline

Shrink Face selection.

Deselects all faces which are adjacent to a boundary vertex of the original selection

Definition at line 1015 of file MeshSelectionT.cc.

template<typename MeshT >
void MeshSelection::shrinkVertexSelection ( MeshT *  _mesh)
inline

shrink the vertex selection

Definition at line 157 of file MeshSelectionT.cc.