From 191168cc4799b2d9dc914baf56637698f1ebbc82 Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Fri, 19 Nov 2004 16:12:57 +0000 Subject: [PATCH] aggiunto vettore delle face sel, per poi ripulirle.... --- vcg/complex/intersection.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/vcg/complex/intersection.h b/vcg/complex/intersection.h index 560d8a29..b717c598 100644 --- a/vcg/complex/intersection.h +++ b/vcg/complex/intersection.h @@ -36,10 +36,10 @@ bool Intersect( GridType & grid,Plane3 plane, vector pl,EdgeMeshType & em,dou typedef GridStaticPtr GridType; EdgeMeshType::VertexIterator vi; TriMeshType::FaceIterator fi; - + vector v; + v.clear(); Intersect(*grid,pl,cells); Segment3 seg; ave_length = 0.0; @@ -91,8 +92,10 @@ bool Intersection( TriMeshType & m, Plane3 pl,EdgeMeshType & em,dou if(!face.IsS()) { face.SetS(); + v.push_back(&face); if(vcg::Intersection(pl,face,seg))// intersezione piano triangolo { + face.SetS(); // add to em ave_length+=seg.Length(); vcg::edge::Allocator::AddEdges(em,1); @@ -108,6 +111,8 @@ bool Intersection( TriMeshType & m, Plane3 pl,EdgeMeshType & em,dou }//end while } ave_length/=em.en; + vector::iterator v_i; + for(v_i=v.begin(); v_i!=v.end(); ++v_i) (*v_i)->ClearS(); return true; }