Commit 5f6e8b7b authored by Matthias Möller's avatar Matthias Möller

OM3 iterators

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17222 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 76c7d0d3
......@@ -28,7 +28,7 @@ std::vector< ACG::Vec3d > PolyLinePlugin::getIntersectionPoints( MeshT* _mesh,
typename MeshT::HalfedgeIter e_it, e_end = _mesh->halfedges_end();
for( e_it = _mesh->halfedges_begin(); e_it != e_end; ++e_it )
_mesh->property( cut, e_it ) = false;
_mesh->property( cut, *e_it ) = false;
// int id = -1;
bool stop = false;
......@@ -47,12 +47,12 @@ std::vector< ACG::Vec3d > PolyLinePlugin::getIntersectionPoints( MeshT* _mesh,
stop = true;
// First check the face we are in
for ( typename MeshT::FaceHalfedgeIter fhe_it( *_mesh, current_face ); fhe_it; ++fhe_it){
if ( _mesh->property(cut,fhe_it) )
for ( typename MeshT::FaceHalfedgeIter fhe_it( *_mesh, current_face ); fhe_it.is_valid(); ++fhe_it){
if ( _mesh->property(cut,*fhe_it) )
continue;
typename MeshT::Point p0 = _mesh->point( _mesh->from_vertex_handle(fhe_it) );
typename MeshT::Point p1 = _mesh->point( _mesh->to_vertex_handle(fhe_it) );
typename MeshT::Point p0 = _mesh->point( _mesh->from_vertex_handle(*fhe_it) );
typename MeshT::Point p1 = _mesh->point( _mesh->to_vertex_handle(*fhe_it) );
typename MeshT::Point u = p1 - p0;
typename MeshT::Point w = p0 - _planePoint;
......@@ -68,9 +68,9 @@ std::vector< ACG::Vec3d > PolyLinePlugin::getIntersectionPoints( MeshT* _mesh,
nothingFound = false;
stop = false;
_mesh->property(cut,fhe_it.handle()) = true;
_mesh->property(cut,_mesh->opposite_halfedge_handle(fhe_it)) = true;
current_face = _mesh->face_handle(_mesh->opposite_halfedge_handle(fhe_it));
_mesh->property(cut,*fhe_it) = true;
_mesh->property(cut,_mesh->opposite_halfedge_handle(*fhe_it)) = true;
current_face = _mesh->face_handle(_mesh->opposite_halfedge_handle(*fhe_it));
if (!current_face.is_valid())
stop = true;
......@@ -98,8 +98,8 @@ std::vector< ACG::Vec3d > PolyLinePlugin::getIntersectionPoints( MeshT* _mesh,
//add the "expansionLevel"-ring of the start-face to the start candidates
for (uint i=0; i < expandable.size(); i++)
for( typename MeshT::FaceFaceIter ff_it(*_mesh, expandable[i]); ff_it; ++ff_it )
startCandidates.push_back( ff_it.handle() );
for( typename MeshT::FaceFaceIter ff_it(*_mesh, expandable[i]); ff_it.is_valid(); ++ff_it )
startCandidates.push_back( *ff_it );
expandable.clear();
expansionLevel++;
......@@ -148,7 +148,7 @@ PolyLinePlugin::getCuttedEdge(MeshT& _mesh, ACG::Vec3d& _planeNormal, ACG::Vec3d
for (e_it = _mesh.edges_begin(); e_it != e_end; ++e_it){
typename MeshT::HalfedgeHandle hh = _mesh.halfedge_handle(e_it, 0);
typename MeshT::HalfedgeHandle hh = _mesh.halfedge_handle(*e_it, 0);
//get intersection point with plane
typename MeshT::Point p0 = _mesh.point( _mesh.from_vertex_handle(hh) );
......@@ -172,7 +172,7 @@ PolyLinePlugin::getCuttedEdge(MeshT& _mesh, ACG::Vec3d& _planeNormal, ACG::Vec3d
if ( dist < minDistance ){
minDistance = dist;
minEdge = e_it.handle();
minEdge = *e_it;
}
}
}
......
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