diff --git a/vcg/complex/algorithms/parametrization/tangent_field_operators.h b/vcg/complex/algorithms/parametrization/tangent_field_operators.h index 26a997d6..b181211f 100644 --- a/vcg/complex/algorithms/parametrization/tangent_field_operators.h +++ b/vcg/complex/algorithms/parametrization/tangent_field_operators.h @@ -199,7 +199,7 @@ private: //push the first one SubDEdges.push_back(Edge0); - for (size_t i=1;i=0)&&(IndexF0=0)&&(IndexF1=0)&&(IndexF0<(int)OriginalFace.size())); + assert((IndexF1>=0)&&(IndexF1<(int)OriginalFace.size())); FaceType* F0=OriginalFace[IndexF0]; FaceType* F1=OriginalFace[IndexF1]; @@ -394,7 +394,7 @@ private: const TriangleType &t0, const TriangleType &t1, CoordType &Interpolated, - size_t &Face) + int &Face) { //find smallest edge ScalarType smallestE=std::numeric_limits::max(); @@ -511,7 +511,7 @@ private: directions.clear(); faces.clear(); - for (size_t i=0;i=0); - assert(OrigFIndex::Rotate(f0,f1,dirS); ///then get the closest upf to K*PI/2 rotations - CoordType dir1=f1.cPD1(); + //CoordType dir1=f1.cPD1(); //int ret=I_K_PI(dir1,dirR,f1.cN()); CoordType dir[4]; CrossVector(f1,dir); @@ -936,8 +936,8 @@ public: const CoordType &t1=f.V(1)->PD1(); const CoordType &t2=f.V(2)->PD1(); const CoordType &N0=f.V(0)->N(); - const CoordType &N1=f.V(0)->N(); - const CoordType &N2=f.V(0)->N(); + const CoordType &N1=f.V(1)->N(); + const CoordType &N2=f.V(2)->N(); const CoordType &NF=f.N(); const CoordType bary=CoordType(0.33333,0.33333,0.33333); CoordType tF0,tF1; @@ -948,7 +948,9 @@ public: SetCrossVector(f,tF0,tF1); //then set the magnitudo - ScalarType mag1,mag2; + ScalarType mag1=0; + ScalarType mag2=0; + for (int i=0;i<3;i++) { vcg::Matrix33 rotN=vcg::RotationMatrix(f.V(i)->N(),f.N());