From 2c0fa9a3230286278717f79770933fd131a71235 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 1 Jul 2014 10:13:18 +0000 Subject: [PATCH] Improved float/double consistency removing some wrong Point3f and substitued with MeshType::CoordType --- vcg/complex/algorithms/voronoi_processing.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vcg/complex/algorithms/voronoi_processing.h b/vcg/complex/algorithms/voronoi_processing.h index 317716cc..b6b9ac66 100644 --- a/vcg/complex/algorithms/voronoi_processing.h +++ b/vcg/complex/algorithms/voronoi_processing.h @@ -419,7 +419,7 @@ static void ConvertVoronoiDiagramToMesh(MeshType &m, for(size_t i=0;i pt; + vector pt; for(size_t j=0;jV(qq)] == curSeed) @@ -431,23 +431,23 @@ static void ConvertVoronoiDiagramToMesh(MeshType &m, for(int qq=0;qq<3;qq++) if(sources[borderCornerVec[j]->V(qq)] == curSeed) { - Point3f edgeCenter; + CoordType edgeCenter; for(int jj=0;jj<3;++jj) if(face::IsBorder(*(borderCornerVec[j]),jj)) edgeCenter=(borderCornerVec[j]->P0(jj)+borderCornerVec[j]->P1(jj))/2.0f; pt.push_back(edgeCenter); break; } - Plane3f pl; + Plane3 pl; pt.push_back(curSeed->P()); FitPlaneToPointSet(pt,pl); pt.pop_back(); - Point3f nZ = pl.Direction(); - Point3f nX = (pt[0]-curSeed->P()).Normalize(); - Point3f nY = (nX^nZ).Normalize(); + CoordType nZ = pl.Direction(); + CoordType nX = (pt[0]-curSeed->P()).Normalize(); + CoordType nY = (nX^nZ).Normalize(); vector > angleVec(pt.size()); for(size_t j=0;jP()).Normalize(); + CoordType p = (pt[j]-curSeed->P()).Normalize(); float angle = 180.0f+math::ToDeg(atan2(p*nY,p*nX)); angleVec[j] = make_pair(angle,j); } @@ -1564,7 +1564,7 @@ static void ConvertDelaunayTriangulationToMesh(MeshType &m, } template -static void PreprocessForVoronoi(MeshType &m, float radius, +static void PreprocessForVoronoi(MeshType &m, ScalarType radius, MidPointType mid, VoronoiProcessingParameter &vpp) {