11#include "./algebraicSphere.h"
44template <
class DataPo
int,
class _WFunctor,
typename T >
47PONCA_FITTING_DECLARE_DEFAULT_TYPES
50 enum { Check = Base::PROVIDES_ALGEBRAIC_SPHERE && Base::PROVIDES_MEAN_POSITION };
52 typedef Eigen::Matrix<Scalar, DataPoint::Dim+1, 1> VectorB;
53 typedef Eigen::Matrix<Scalar, DataPoint::Dim+1, DataPoint::Dim+1> MatrixBB;
56 using Solver = Eigen::EigenSolver<MatrixBB>;
66 PONCA_FITTING_DECLARE_INIT_ADD_FINALIZE
67 PONCA_FITTING_IS_SIGNED(
false)
72template <
class DataPo
int,
class _WFunctor,
typename T>
80template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
84 PONCA_FITTING_DECLARE_DEFAULT_TYPES
85 PONCA_FITTING_DECLARE_DEFAULT_DER_TYPES
87 using VectorB =
typename Base::VectorB;
88 using MatrixBB =
typename Base::MatrixBB;
93 Check = Base::PROVIDES_ALGEBRAIC_SPHERE &
94 Base::PROVIDES_MEAN_POSITION_DERIVATIVE &
95 Base::PROVIDES_PRIMITIVE_DERIVATIVE,
96 PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE,
97 PROVIDES_NORMAL_DERIVATIVE
102 MatrixBB m_dmatA[Base::NbDerivatives];
113 PONCA_FITTING_DECLARE_INIT_ADDDER_FINALIZE
115 PONCA_MULTIARCH
inline ScalarArray dPotential()
const;
116 PONCA_MULTIARCH
inline VectorArray dNormal()
const;
121template <
class DataPo
int,
class _WFunctor,
int DiffType,
typename T>
129#include "unorientedSphereFit.hpp"
Algebraic Sphere primitive.
Compute the barycenter of the input points.
UnorientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T > & unorientedSphereDer()
Explicit conversion to UnorientedSphereDerImpl , to access methods potentially hidden by heritage.
typename Base::ScalarArray ScalarArray
Alias to scalar derivatives array.
typename Base::VectorArray VectorArray
Alias to vector derivatives array.
Algebraic Sphere fitting procedure on point sets with non-oriented normals.
MatrixBB m_matA
The accumulated covariance matrix.
Scalar m_sumDotPP
Sum of the squared relative positions.
typename DataPoint::Scalar Scalar
Alias to scalar type.
UnorientedSphereFitImpl< DataPoint, _WFunctor, T > & unorientedSphereFit()
Explicit conversion to UnorientedSphereFitImpl , to access methods potentially hidden by heritage.
MatrixBB m_matQ
The constraint matrix.
This Source Code Form is subject to the terms of the Mozilla Public License, v.
DiffType
Flags defining which derivatives need to be computed.