diff --git a/vcg/complex/algorithms/intersection.h b/vcg/complex/algorithms/intersection.h index 3aff52ed..9e59daca 100644 --- a/vcg/complex/algorithms/intersection.h +++ b/vcg/complex/algorithms/intersection.h @@ -142,8 +142,8 @@ bool IntersectionPlaneMesh(TriMeshType & m, Plane3 pl, EdgeMeshType & em) { - std::vector ptVec; - std::vector nmVec; + std::vector > ptVec; + std::vector > nmVec; typename TriMeshType::template PerVertexAttributeHandle < ScalarType > qH = tri::Allocator :: template AddPerVertexAttribute < ScalarType >(m,"TemporaryPlaneDistance"); @@ -161,18 +161,18 @@ bool IntersectionPlaneMesh(TriMeshType & m, { if((qH[m.face[i].V0(j)] * qH[m.face[i].V1(j)])<0) { - const Point3f &p0 = m.face[i].V0(j)->cP(); - const Point3f &p1 = m.face[i].V1(j)->cP(); - const Point3f &n0 = m.face[i].V0(j)->cN(); - const Point3f &n1 = m.face[i].V1(j)->cN(); + const Point3 &p0 = m.face[i].V0(j)->cP(); + const Point3 &p1 = m.face[i].V1(j)->cP(); + const Point3 &n0 = m.face[i].V0(j)->cN(); + const Point3 &n1 = m.face[i].V1(j)->cN(); float q0 = qH[m.face[i].V0(j)]; float q1 = qH[m.face[i].V1(j)]; // printf("Intersection ( %3.2f %3.2f %3.2f )-( %3.2f %3.2f %3.2f )\n",p0[0],p0[1],p0[2],p1[0],p1[1],p1[2]); - Point3f pp; - Segment3f seg(p0,p1); + Point3 pp; + Segment3 seg(p0,p1); IntersectionPlaneSegment(pl,seg,pp); ptVec.push_back(pp); - Point3f nn =(n0*fabs(q1) + n1*fabs(q0))/fabs(q0-q1); + Point3 nn =(n0*fabs(q1) + n1*fabs(q0))/fabs(q0-q1); nmVec.push_back(nn); } if(qH[m.face[i].V(j)]==0) ptVec.push_back(m.face[i].V(j)->cP());