34 #if defined(LinearLeastSquareFittingNormalVectorEstimator_RECURSES)
35 #error Recursive header files inclusion detected in LinearLeastSquareFittingNormalVectorEstimator.h
38 #define LinearLeastSquareFittingNormalVectorEstimator_RECURSES
40 #if !defined LinearLeastSquareFittingNormalVectorEstimator_h
42 #define LinearLeastSquareFittingNormalVectorEstimator_h
47 #include <DGtal/base/Common.h>
48 #include <DGtal/topology/SCellsFunctors.h>
51 #error You need to have activated CGAL (WITH_CGAL) to include this file.
55 #include <CGAL/Cartesian.h>
56 #include <CGAL/linear_least_squares_fitting_3.h>
78 template <
typename TSurfel,
typename TEmbedder>
111 const double aDistance)
113 BOOST_VERIFY(aDistance == aDistance);
127 CGAL::linear_least_squares_fitting_3(
myPoints.begin(),
myPoints.end(), plane, CGAL::Dimension_tag<0>());
130 return vv.getNormalized();
166 #undef LinearLeastSquareFittingNormalVectorEstimator_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Estimates normal vector using CGAL linear least squares plane fitting.
const SCellEmbedder * myEmbedder
Alias of the geometrical embedder.
CGALKernel::Plane_3 CGALPlane
SCellEmbedder::RealPoint RealPoint
LinearLeastSquareFittingNormalVectorEstimator(ConstAlias< SCellEmbedder > anEmbedder, const double h)
std::vector< CGALPoint > myPoints
Array of CGAL points.
CGAL::Cartesian< double > CGALKernel
CGALKernel::Point_3 CGALPoint
void pushSurfel(const Surfel &aSurf, const double aDistance)
CGALKernel::Vector_3 CGALVector
DGtal is the top-level namespace which contains all DGtal functions and types.
PointVector< 3, double > RealPoint