diff --git a/vcg/complex/intersection.h b/vcg/complex/intersection.h index 3155db68..40327b9e 100644 --- a/vcg/complex/intersection.h +++ b/vcg/complex/intersection.h @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -6,7 +6,6 @@ #include #include -using namespace std; namespace vcg{ @@ -16,7 +15,7 @@ namespace vcg{ Function computing the intersection between a grid and a plane. It returns all the cells intersected */ template < typename GridType,typename ScalarType> -bool Intersect( GridType & grid,Plane3 plane, vector &cells){ +bool Intersect( GridType & grid,Plane3 plane, std::vector &cells){ Point3d p,_d; Plane3d pl; _d.Import(plane.Direction()); @@ -43,7 +42,7 @@ bool Intersect( GridType & grid,Plane3 plane, vector *grid, - typename vector< typename GridStaticPtr::Cell* >& cells) + typename std::vector< typename GridStaticPtr::Cell* >& cells) { typedef typename TriMeshType::FaceContainer FaceContainer; typedef GridStaticPtr GridType; - EdgeMeshType::VertexIterator vi; - TriMeshType::FaceIterator fi; - vector v; + typename EdgeMeshType::VertexIterator vi; + typename TriMeshType::FaceIterator fi; + std::vector v; v.clear(); Intersect(*grid,pl,cells); Segment3 seg; ave_length = 0.0; - vector::iterator ic; - GridType::Cell fs,ls; + typename std::vector::iterator ic; + typename GridType::Cell fs,ls; for(ic = cells.begin(); ic != cells.end();++ic) { grid->Grid(*ic,fs,ls); - GridType::Link * lk = fs; + typename GridType::Link * lk = fs; while(lk != ls){ - TriMeshType::FaceType & face = *(lk->Elem()); + typename TriMeshType::FaceType & face = *(lk->Elem()); if(!face.IsS()) { face.SetS(); @@ -116,7 +115,7 @@ bool Intersection( /*TriMeshType & m, */ }//end while } ave_length/=em.en; - vector::iterator v_i; + typename std::vector::iterator v_i; for(v_i=v.begin(); v_i!=v.end(); ++v_i) (*v_i)->ClearS(); return true; @@ -133,13 +132,13 @@ bool IntersectionRayMesh( /* Intersect Point */ Point3 & hitPoint) { //typedef typename TriMeshType::FaceContainer FaceContainer; - TriMeshType::FaceIterator fi; + typename TriMeshType::FaceIterator fi; bool hit=false; if(m==0) return false; //TriMeshType::FaceIterator fi; - //vector::iterator fi; + //std::vector::iterator fi; ScalarType bar1,bar2,dist; Point3 p1;