Skip to content

Commit

Permalink
[Fitting] Change init API (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmellado committed Aug 3, 2023
1 parent 0a48bd0 commit e96d185
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Ponca/src/Fitting/algebraicSphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class AlgebraicSphere : public T
\warning Set m_ul to Zero(), which leads to nans in OrientedSphere::normal()
*/
PONCA_MULTIARCH inline void init(const VectorType& _basisCenter = VectorType::Zero())
PONCA_MULTIARCH inline void init()
{
Base::init(_basisCenter);
Base::init();

m_uc = Scalar(0);
m_ul = VectorType::Zero();
Expand Down
8 changes: 4 additions & 4 deletions Ponca/src/Fitting/covarianceFit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

template < class DataPoint, class _WFunctor, typename T>
void
CovarianceFitBase<DataPoint, _WFunctor, T>::init(const VectorType& _evalPos)
CovarianceFitBase<DataPoint, _WFunctor, T>::init()
{
Base::init(_evalPos);
Base::init();
m_cov.setZero();
}

Expand Down Expand Up @@ -65,9 +65,9 @@ CovarianceFitBase<DataPoint, _WFunctor, T>::surfaceVariation () const

template < class DataPoint, class _WFunctor, int DiffType, typename T>
void
CovarianceFitDer<DataPoint, _WFunctor, DiffType, T>::init(const VectorType& _evalPos)
CovarianceFitDer<DataPoint, _WFunctor, DiffType, T>::init()
{
Base::init(_evalPos);
Base::init();

for(int k=0; k<Base::NbDerivatives; ++k)
m_dCov[k].setZero();
Expand Down
3 changes: 1 addition & 2 deletions Ponca/src/Fitting/primitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,10 @@ class PrimitiveBase
}

PONCA_FITTING_APIDOC_INIT
PONCA_MULTIARCH inline void init(const VectorType& _basisCenter = VectorType::Zero())
PONCA_MULTIARCH inline void init()
{
m_eCurrentState = UNDEFINED;
startNewPass();
m_w.init( _basisCenter );
}

/*! \brief Is the primitive well fitted an ready to use (finalize has been
Expand Down

0 comments on commit e96d185

Please sign in to comment.