Commit 3b103dfe authored by Mike Kremer's avatar Mike Kremer

Added functions to convert edge selections to features.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12725 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 53b073f4
......@@ -679,7 +679,45 @@ void convertEdgeToHalfedgeSelection(MeshT* _mesh) {
}
}
template< typename MeshT >
inline
void convertEdgeToFeatureSelection(MeshT* _mesh) {
for (typename MeshT::EdgeIter e_it = _mesh->edges_begin(); e_it != _mesh->edges_end(); ++e_it) {
if (_mesh->status(e_it).selected()) {
_mesh->status(e_it).set_feature(true);
} else {
_mesh->status(e_it).set_feature(false);
}
}
}
template< typename MeshT >
inline
void convertFeatureToEdgeSelection(MeshT* _mesh) {
for (typename MeshT::EdgeIter e_it = _mesh->edges_begin(); e_it != _mesh->edges_end(); ++e_it) {
if (_mesh->status(e_it).feature()) {
_mesh->status(e_it).set_selected(true);
} else {
_mesh->status(e_it).set_selected(false);
}
}
}
template< typename MeshT >
inline
void clearFeatureSelection(MeshT* _mesh) {
for (typename MeshT::EdgeIter e_it = _mesh->edges_begin(); e_it != _mesh->edges_end(); ++e_it) {
_mesh->status(e_it).set_feature(false);
}
}
//=========================================================
//== Halfedge Selection =====================================
......
......@@ -304,6 +304,26 @@ template< typename MeshT >
inline
void convertEdgeToHalfedgeSelection(MeshT* _mesh);
/**
* Convert edge selection to feature selection
*/
template< typename MeshT >
inline
void convertEdgeToFeatureSelection(MeshT* _mesh);
/**
* Convert feature selection to edge selection
*/
template< typename MeshT >
inline
void convertFeatureToEdgeSelection(MeshT* _mesh);
/**
* Clear all features
*/
template< typename MeshT >
inline
void clearFeatureSelection(MeshT* _mesh);
/** @} */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment