Ponca  eb7239a9c07e156fb1edc6faac7fe89e2b256bda
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T > Class Template Reference

Algebraic Sphere fitting procedure on oriented point sets. More...

#include <orientedSphereFit.h>

Inheritance diagram for Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >:
Collaboration diagram for Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >:

Public Types

using Scalar = typename DataPoint::Scalar
 Alias to scalar type.
using VectorType = typename Base::VectorType
 Alias to vector type.
using NeighborFilter = typename Base::NeighborFilter
 Alias to the filter applied on the neighbors.

Public Member Functions

OrientedSphereFitImpl< DataPoint, _NFilter, T > & orientedSphereFit ()
 Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
const OrientedSphereFitImpl< DataPoint, _NFilter, T > & orientedSphereFit () const
 Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.
void init ()
 Set the evaluation position and reset the internal states.
void addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes)
 Add a neighbor to perform the fit.
FIT_RESULT finalize ()
constexpr bool isSigned ()
 Is scalar field signed.

Protected Types

using Base = T
 Base class of the procedure.

Protected Attributes

Scalar m_sumDotPN {0}
 Sum of the dot product between relative positions and normals.
Scalar m_sumDotPP {0}
 Sum of the squared relative positions.
Scalar m_nume {0}
 Numerator of the quadratic parameter (excluding the 0.5 coefficient).
Scalar m_deno {0}
 Denominator of the quadratic parameter (excluding the 0.5 coefficient).

Detailed Description

template<class DataPoint, class _NFilter, typename T>
requires ProvidesAlgebraicSphere<T>&& ProvidesMeanPosition<T>&& ProvidesMeanNormal<T>&& ProvidesNormal<DataPoint>
class Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >

Algebraic Sphere fitting procedure on oriented point sets.

Method published in [9].

See also
AlgebraicSphere

Definition at line 33 of file orientedSphereFit.h.

Member Typedef Documentation

◆ Base

template<class DataPoint, class _NFilter, typename T>
using Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::Base = T
protected

Base class of the procedure.

Definition at line 35 of file orientedSphereFit.h.

◆ NeighborFilter

template<class DataPoint, class _NFilter, typename T>
using Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::NeighborFilter = typename Base::NeighborFilter

Alias to the filter applied on the neighbors.

Definition at line 35 of file orientedSphereFit.h.

◆ Scalar

template<class DataPoint, class _NFilter, typename T>
using Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::Scalar = typename DataPoint::Scalar

Alias to scalar type.

Definition at line 35 of file orientedSphereFit.h.

◆ VectorType

template<class DataPoint, class _NFilter, typename T>
using Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::VectorType = typename Base::VectorType

Alias to vector type.

Definition at line 35 of file orientedSphereFit.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint, class _NFilter, typename T>
requires ProvidesAlgebraicSphere<T>&& ProvidesMeanPosition<T>&& ProvidesMeanNormal<T>&& ProvidesNormal<DataPoint>
void OrientedSphereFitImpl::addLocalNeighbor ( Scalar w,
const VectorType & localQ,
const DataPoint & attributes )
inline

Add a neighbor to perform the fit.

Definition at line 23 of file orientedSphereFit.h.

◆ finalize()

template<class DataPoint, class _NFilter, typename T>
requires ProvidesAlgebraicSphere<T>&& ProvidesMeanPosition<T>&& ProvidesMeanNormal<T>&& ProvidesNormal<DataPoint>
FIT_RESULT OrientedSphereFitImpl::finalize ( )
inline

Definition at line 33 of file orientedSphereFit.h.

◆ init()

template<class DataPoint, class _NFilter, typename T>
requires ProvidesAlgebraicSphere<T>&& ProvidesMeanPosition<T>&& ProvidesMeanNormal<T>&& ProvidesNormal<DataPoint>
void OrientedSphereFitImpl::init ( )
inline

Set the evaluation position and reset the internal states.

Warning
Must be called be for any computation (but * after #setNeighborFilter)

Definition at line 10 of file orientedSphereFit.h.

◆ isSigned()

template<class DataPoint, class _NFilter, typename T>
bool Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::isSigned ( )
inlineconstexpr

Is scalar field signed.

If not, the method the sign of potential() must be ignored

Definition at line 47 of file orientedSphereFit.h.

◆ orientedSphereFit() [1/2]

template<class DataPoint, class _NFilter, typename T>
OrientedSphereFitImpl< DataPoint, _NFilter, T > & Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::orientedSphereFit ( )
inline

Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.

Definition at line 45 of file orientedSphereFit.h.

◆ orientedSphereFit() [2/2]

template<class DataPoint, class _NFilter, typename T>
const OrientedSphereFitImpl< DataPoint, _NFilter, T > & Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::orientedSphereFit ( ) const
inline

Explicit conversion to CLASSNAME, to access methods potentially hidden by heritage.

Definition at line 45 of file orientedSphereFit.h.

Member Data Documentation

◆ m_deno

template<class DataPoint, class _NFilter, typename T>
Scalar Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::m_deno {0}
protected

Denominator of the quadratic parameter (excluding the 0.5 coefficient).

Definition at line 42 of file orientedSphereFit.h.

◆ m_nume

template<class DataPoint, class _NFilter, typename T>
Scalar Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::m_nume {0}
protected

Numerator of the quadratic parameter (excluding the 0.5 coefficient).

Definition at line 41 of file orientedSphereFit.h.

◆ m_sumDotPN

template<class DataPoint, class _NFilter, typename T>
Scalar Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::m_sumDotPN {0}
protected

Sum of the dot product between relative positions and normals.

Definition at line 39 of file orientedSphereFit.h.

◆ m_sumDotPP

template<class DataPoint, class _NFilter, typename T>
Scalar Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >::m_sumDotPP {0}
protected

Sum of the squared relative positions.

Definition at line 40 of file orientedSphereFit.h.