From cd29dc7b29e720d5d33e49af8c2f89d4a8d4a1f8 Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Tue, 26 Mar 2024 13:19:24 +0100 Subject: [PATCH] Updating API --- src/DGtal/shapes/WindingNumbersShape.h | 29 ++++---------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/DGtal/shapes/WindingNumbersShape.h b/src/DGtal/shapes/WindingNumbersShape.h index 91ec70278b..3e20a76d94 100644 --- a/src/DGtal/shapes/WindingNumbersShape.h +++ b/src/DGtal/shapes/WindingNumbersShape.h @@ -78,7 +78,7 @@ namespace DGtal /// This constructor estimates the @a area @a of each point using CGAL. /// /// If the number of points is greater than 20, CGAL is used to estimate the - /// per-sample area (if skipPointAreas is set to false). + /// per-sample area (if skipPointAreas is set to false). /// /// @param points a "nx3" matrix with the sample coordinates. /// @param normals a "nx3" matrix for the normal vectors. @@ -90,11 +90,10 @@ namespace DGtal myPoints = points; myNormals = normals; myPointAreas = Eigen::VectorXd::Ones(myPoints->rows()); - myPointAreasSet = false; // Build octree, from libIGL tutorials igl::octree(*myPoints,myO_PI,myO_CH,myO_CN,myO_W); if (skipPointAreas) - trace.warning()<<"[WindingNumberShape] Skipping the CGAL point area estimation."<rows()> 20) { @@ -103,7 +102,6 @@ namespace DGtal // CGAL is only used to help get point areas igl::copyleft::cgal::point_areas(*myPoints,I,*myNormals,myPointAreas); trace.info()<<"[WindingNumberShape] Min/max point area : "< areas) { myPointAreas = areas; - myPointAreasSet = true; } /// Orientation of a point using the winding number value from /// an oriented pointcloud. /// - /// @note For multiple queries, orientationBatch() should be used. If point areas have been - /// provided, we always return "OUTSIDE" + /// @note For multiple queries, orientationBatch() should be used. /// /// @param aPoint [in] a point in space /// @param threshold [in] the iso-value of the surface of the winding number implicit map (default = 0.3). @@ -149,11 +144,6 @@ namespace DGtal Orientation orientation(const RealPoint aPoint, const double threshold = 0.3) const { - if (!myPointAreasSet) - { - trace.error() <<"[WindingNumber] the point areas have not been set. Always returning 'OUTSIDE' "< > myO_PI; ///libIGL octree for fast queries data structure