This commit is contained in:
Paolo Cignoni 2018-02-20 10:24:34 +01:00
commit d6e5aa2116
7 changed files with 7 additions and 7 deletions

View File

@ -1369,7 +1369,7 @@ public:
count = 0; count = 0;
ScalarType NormalThrRad = math::ToRad(normalThresholdDeg); ScalarType NormalThrRad = math::ToRad(normalThresholdDeg);
ScalarType eps = 0.0001; // this epsilon value is in absolute value. It is a distance from edge in baricentric coords. ScalarType eps = ScalarType(0.0001); // this epsilon value is in absolute value. It is a distance from edge in baricentric coords.
//detection stage //detection stage
for(FaceIterator fi=m.face.begin();fi!= m.face.end();++fi ) if(!(*fi).IsV()) for(FaceIterator fi=m.face.begin();fi!= m.face.end();++fi ) if(!(*fi).IsV())
{ Point3<ScalarType> NN = vcg::TriangleNormal((*fi)).Normalize(); { Point3<ScalarType> NN = vcg::TriangleNormal((*fi)).Normalize();

View File

@ -92,7 +92,7 @@ static void UniformCone(int vn, std::vector<Point3<ScalarType > > &NN, ScalarTyp
printf("----------AngleRad %f Angledeg %f ratio %f vn %i vn2 %i \n",AngleRad,math::ToDeg(AngleRad),Ratio,vn,int(vn/Ratio)); printf("----------AngleRad %f Angledeg %f ratio %f vn %i vn2 %i \n",AngleRad,math::ToDeg(AngleRad),Ratio,vn,int(vn/Ratio));
Fibonacci(vn/Ratio,NNT); Fibonacci(vn/Ratio,NNT);
printf("asked %i got %i (expecting %i instead of %i)\n", int(vn/Ratio), NNT.size(), int(NNT.size()*Ratio), vn); printf("asked %i got %i (expecting %i instead of %i)\n", int(vn/Ratio), int(NNT.size()), int(NNT.size()*Ratio), vn);
typename std::vector<Point3<ScalarType> >::iterator vi; typename std::vector<Point3<ScalarType> >::iterator vi;
ScalarType cosAngle = cos(AngleRad); ScalarType cosAngle = cos(AngleRad);

View File

@ -154,7 +154,7 @@ static int Open( OpenMeshType &m, std::vector<Shot<ScalarType> > & shots,
shots[i].Intrinsics.FocalMm = f/100.0f; shots[i].Intrinsics.FocalMm = f/100.0f;
shots[i].Intrinsics.k[0] = 0.0;//k1; To be uncommented when distortion is taken into account reliably shots[i].Intrinsics.k[0] = 0.0;//k1; To be uncommented when distortion is taken into account reliably
shots[i].Intrinsics.k[1] = 0.0;//k2; shots[i].Intrinsics.k[1] = 0.0;//k2;
shots[i].Intrinsics.PixelSizeMm = vcg::Point2<ScalarType>(0.01,0.01); shots[i].Intrinsics.PixelSizeMm = vcg::Point2<ScalarType>(ScalarType(0.01), ScalarType(0.01));
QImageReader sizeImg(QString::fromStdString(image_filenames[i])); QImageReader sizeImg(QString::fromStdString(image_filenames[i]));
QSize size=sizeImg.size(); QSize size=sizeImg.size();
shots[i].Intrinsics.ViewportPx = vcg::Point2i(size.width(),size.height()); shots[i].Intrinsics.ViewportPx = vcg::Point2i(size.width(),size.height());

View File

@ -76,7 +76,7 @@ public:
elemDescVec[elemType]->push_back(PropDescriptor()); elemDescVec[elemType]->push_back(PropDescriptor());
elemNameVec[elemType]->push_back(attrName); elemNameVec[elemType]->push_back(attrName);
elemDescVec[elemType]->back().elemname=elemStr[elemType]; elemDescVec[elemType]->back().elemname=elemStr[elemType];
elemDescVec[elemType]->back().propname=propName; elemDescVec[elemType]->back().propname=strdup(propName);
elemDescVec[elemType]->back().stotype1 = vcg::ply::T_FLOAT; elemDescVec[elemType]->back().stotype1 = vcg::ply::T_FLOAT;
elemDescVec[elemType]->back().memtype1 = vcg::ply::T_FLOAT; elemDescVec[elemType]->back().memtype1 = vcg::ply::T_FLOAT;
} }