diff --git a/libs/MVS/DepthMap.cpp b/libs/MVS/DepthMap.cpp index 12973ac..f6621f0 100644 --- a/libs/MVS/DepthMap.cpp +++ b/libs/MVS/DepthMap.cpp @@ -1071,16 +1071,25 @@ void MVS::EstimatePointNormals(const ImageArr& images, PointCloud& pointcloud, i // estimates normals direction; // Note: pca_estimate_normals() requires an iterator over points // as well as property maps to access each point's position and normal. - #if CGAL_VERSION_NR < 1040800000 - CGAL::pca_estimate_normals( - #else - CGAL::pca_estimate_normals( - #endif - pointvectors.begin(), pointvectors.end(), - CGAL::First_of_pair_property_map(), - CGAL::Second_of_pair_property_map(), - numNeighbors - ); + #if CGAL_VERSION_NR < 1041301000 + #if CGAL_VERSION_NR < 1040800000 + CGAL::pca_estimate_normals( + #else + CGAL::pca_estimate_normals( + #endif + pointvectors.begin(), pointvectors.end(), + CGAL::First_of_pair_property_map(), + CGAL::Second_of_pair_property_map(), + numNeighbors + ); + #else + CGAL::pca_estimate_normals( + pointvectors, + numNeighbors, + CGAL::parameters::point_map(CGAL::First_of_pair_property_map()) + .normal_map(CGAL::Second_of_pair_property_map()) + ); + #endif // store the point normals pointcloud.normals.Resize(pointcloud.points.GetSize()); FOREACH(i, pointcloud.normals) {