Commit f51537d0 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed buggy paintSphere selection

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7293 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3a6d25c0
......@@ -79,9 +79,6 @@ void SelectionPlugin::paintSphereSelection( MeshT* _mesh ,
for (v_it=_mesh->vertices_begin(); v_it!=v_end; ++v_it)
_mesh->status(v_it).set_tagged(false);
//tag vertices from hitface
for (typename MeshT::FaceVertexIter fv_it(*_mesh,hitface); fv_it; ++fv_it)
_mesh->status(fv_it).set_tagged(true);
}
if (selectionType_ & EDGE){
......@@ -90,9 +87,6 @@ void SelectionPlugin::paintSphereSelection( MeshT* _mesh ,
for (e_it=_mesh->edges_begin(); e_it!=e_end; ++e_it)
_mesh->status(e_it).set_tagged(false);
//tag edges from hitface
for (typename MeshT::FaceEdgeIter fe_it(*_mesh,hitface); fe_it; ++fe_it)
_mesh->status(fe_it).set_tagged(true);
}
......@@ -141,9 +135,10 @@ void SelectionPlugin::paintSphereSelection( MeshT* _mesh ,
if ( (_mesh->point(vh) - _hitpoint).sqrnorm() <= sqr_radius ){
vertex_handles.push_back( vh );
if (lastVertexInside)
edge_handles.push_back( _mesh->edge_handle( fh_it.handle() ) );
if ( ( _mesh->point(_mesh->to_vertex_handle( fh_it.handle() ) ) - _hitpoint).sqrnorm() <= sqr_radius )
edge_handles.push_back( _mesh->edge_handle( fh_it.handle() ) );
lastVertexInside = true;
}else
......@@ -152,16 +147,6 @@ void SelectionPlugin::paintSphereSelection( MeshT* _mesh ,
fVertices++;
}
//perhaps check the first edge again
if (lastVertexInside){
typename MeshT::FaceHalfedgeIter fh_it(*_mesh,ff_it);
typename MeshT::VertexHandle vh = _mesh->from_vertex_handle( fh_it.handle() );
if ( (_mesh->point(vh) - _hitpoint).sqrnorm() <= sqr_radius )
edge_handles.push_back( _mesh->edge_handle( fh_it.handle() ) );
}
//check what has to be tagged
bool tagged = false;
......
Supports Markdown
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