31 #if !defined WindingNumbersShape_h
33 #define WindingNumbersShape_h
36 #error You need to have activated LIBIGL (WITH_LIBIGL flag) to include this file.
41 #include <DGtal/base/Common.h>
42 #include <DGtal/base/CountedConstPtrOrConstPtr.h>
43 #include <DGtal/base/ConstAlias.h>
45 #include <DGtal/shapes/CEuclideanOrientedShape.h>
46 #include <igl/fast_winding_number.h>
47 #include <igl/octree.h>
49 #include <igl/copyleft/cgal/point_areas.h>
65 template<
typename TSpace>
93 if (points->rows()> 20)
103 trace.
warning()<<
"[WindingNumberShape] Too few points to use CGAL point_areas. Using the constant area setting."<<std::endl;
115 const Eigen::VectorXd &areas)
140 const double threshold = 0.3)
const
142 Eigen::MatrixXd queries(1,3);
145 return singlePoint[0];
155 const double threshold = 0.3)
const
158 std::vector<Orientation> results( queries.rows() );
159 Eigen::MatrixXd O_CM;
161 Eigen::MatrixXd O_EC;
165 igl::fast_winding_number(*
myPoints,*
myNormals,
myPointAreas,
myO_PI,
myO_CH,O_CM,O_R,O_EC,queries,2,W);
168 for(
auto i=0u; i < queries.rows(); ++i)
170 if (std::abs(W(i)) < threshold )
173 if (std::abs(W(i)) > threshold)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Space::RealVector RealVector
DGtal is the top-level namespace which contains all DGtal functions and types.
PointVector< 3, double > RealPoint