Commit a7b2dc9a authored by Jan Möbius's avatar Jan Möbius

MeshObjectSelection

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17219 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bf4356ed
......@@ -88,7 +88,7 @@ findClosestBoundary(MeshT* _mesh , typename MeshT::VertexHandle _vh){
//init visited property
typename MeshT::VertexIter v_it, v_end = _mesh->vertices_end();
for( v_it = _mesh->vertices_begin(); v_it != v_end; ++v_it )
_mesh->property( visited, v_it ) = false;
_mesh->property( visited, *v_it ) = false;
std::queue< typename MeshT::VertexHandle > queue;
queue.push( _vh );
......
......@@ -300,7 +300,7 @@ void convertVertexToEdgeSelection(MeshT* _mesh) {
for (v_it = _mesh->vertices_begin(); v_it != v_end; ++v_it) {
if ( _mesh->status( *v_it ).selected() ) {
typename MeshT::VertexOHalfedgeIter ohe_iter = _mesh->voh_iter(v_it);
typename MeshT::VertexOHalfedgeIter ohe_iter = _mesh->voh_iter(*v_it);
for (; ohe_iter.is_valid(); ++ohe_iter) {
// test if both incident vertices are in _vertices
......@@ -963,9 +963,9 @@ void selectBoundaryFaces(MeshT* _mesh) {
for (he_it = _mesh->halfedges_begin(); he_it != he_end ; ++he_it)
if (_mesh->is_boundary(*he_it) ) {
for (typename MeshT::VertexFaceIter vf_it(*_mesh ,_mesh->to_vertex_handle(he_it) ) ; vf_it.is_valid() ; ++vf_it)
for (typename MeshT::VertexFaceIter vf_it(*_mesh ,_mesh->to_vertex_handle(*he_it) ) ; vf_it.is_valid() ; ++vf_it)
_mesh->status(*vf_it).set_selected(true);
for (typename MeshT::VertexFaceIter vf_it(*_mesh ,_mesh->from_vertex_handle(he_it) ) ; vf_it.is_valid() ; ++vf_it)
for (typename MeshT::VertexFaceIter vf_it(*_mesh ,_mesh->from_vertex_handle(*he_it) ) ; vf_it.is_valid() ; ++vf_it)
_mesh->status(*vf_it).set_selected(true);
}
}
......@@ -1138,9 +1138,9 @@ void convertFaceToHalfedgeSelection(MeshT* _mesh) {
for ( typename MeshT::FaceIter f_it= _mesh->faces_begin() ; f_it != _mesh->faces_end() ; ++f_it )
if ( _mesh->status(f_it).selected() ){
if ( _mesh->status(*f_it).selected() ){
typename MeshT::FaceHalfedgeIter fh_iter = _mesh->fh_iter(f_it);
typename MeshT::FaceHalfedgeIter fh_iter = _mesh->fh_iter(*f_it);
for (; fh_iter.is_valid(); ++fh_iter)
_mesh->status(*fh_iter).set_selected(true);
......
......@@ -339,9 +339,9 @@ IdList MeshObjectSelectionPlugin::convertVertexPairsToEdges(int _id, const IdLis
TriMesh::VertexHandle vh = TriMesh::VertexHandle(*it);
if(!vh.is_valid()) continue;
for(TriMesh::VertexOHalfedgeIter voh_it = mesh->voh_iter(vh);
voh_it; ++voh_it) {
if(mesh->to_vertex_handle(voh_it.handle()).idx() == *(it+1)) {
edges.push_back(mesh->edge_handle(voh_it.handle()).idx());
voh_it.is_valid(); ++voh_it) {
if(mesh->to_vertex_handle(*voh_it).idx() == *(it+1)) {
edges.push_back(mesh->edge_handle(*voh_it).idx());
continue;
}
}
......@@ -361,9 +361,9 @@ IdList MeshObjectSelectionPlugin::convertVertexPairsToEdges(int _id, const IdLis
PolyMesh::VertexHandle vh = PolyMesh::VertexHandle(*it);
if(!vh.is_valid()) continue;
for(PolyMesh::VertexOHalfedgeIter voh_it = mesh->voh_iter(vh);
voh_it; ++voh_it) {
if(mesh->to_vertex_handle(voh_it.handle()).idx() == *(it+1)) {
edges.push_back(mesh->edge_handle(voh_it.handle()).idx());
voh_it.is_valid(); ++voh_it) {
if(mesh->to_vertex_handle(*voh_it).idx() == *(it+1)) {
edges.push_back(mesh->edge_handle(*voh_it).idx());
continue;
}
}
......
......@@ -310,9 +310,9 @@ IdList MeshObjectSelectionPlugin::convertVertexPairsToHalfedges(int _id, const I
TriMesh::VertexHandle vh = TriMesh::VertexHandle(*it);
if(!vh.is_valid()) continue;
for(TriMesh::VertexOHalfedgeIter voh_it = mesh->voh_iter(vh);
voh_it; ++voh_it) {
if(mesh->to_vertex_handle(voh_it.handle()).idx() == *(it+1)) {
halfedges.push_back(voh_it.handle().idx());
voh_it.is_valid(); ++voh_it) {
if(mesh->to_vertex_handle(*voh_it).idx() == *(it+1)) {
halfedges.push_back(voh_it->idx());
continue;
}
}
......@@ -332,9 +332,9 @@ IdList MeshObjectSelectionPlugin::convertVertexPairsToHalfedges(int _id, const I
PolyMesh::VertexHandle vh = PolyMesh::VertexHandle(*it);
if(!vh.is_valid()) continue;
for(PolyMesh::VertexOHalfedgeIter voh_it = mesh->voh_iter(vh);
voh_it; ++voh_it) {
if(mesh->to_vertex_handle(voh_it.handle()).idx() == *(it+1)) {
halfedges.push_back(voh_it.handle().idx());
voh_it.is_valid(); ++voh_it) {
if(mesh->to_vertex_handle(*voh_it).idx() == *(it+1)) {
halfedges.push_back(voh_it->idx());
continue;
}
}
......
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