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

Protected Types

enum  { Check }
 
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>
class Ponca::OrientedSphereFitImpl< DataPoint, _NFilter, T >

Algebraic Sphere fitting procedure on oriented point sets.

Method published in [6].

See also
AlgebraicSphere

Definition at line 25 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 27 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 27 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 27 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 27 of file orientedSphereFit.h.

Member Enumeration Documentation

◆ anonymous enum

template<class DataPoint , class _NFilter , typename T >
anonymous enum
protected

Definition at line 30 of file orientedSphereFit.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _NFilter , typename T >
bool OrientedSphereFitImpl::addLocalNeighbor ( Scalar  w,
const VectorType localQ,
const DataPoint &  attributes 
)
inline

Add a neighbor to perform the fit.

Returns
false if param nei is not a valid neighbour (weight = 0)

Definition at line 23 of file orientedSphereFit.hpp.

◆ finalize()

template<class DataPoint , class _NFilter , typename T >
FIT_RESULT OrientedSphereFitImpl::finalize ( )
inline

Finalize the procedure.

Returns
Fitting Status
Warning
Must be called be for any use of the fitting output

Definition at line 37 of file orientedSphereFit.hpp.

◆ init()

template<class DataPoint , class _NFilter , typename T >
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.hpp.

◆ isSigned()

template<class DataPoint , class _NFilter , typename T >
constexpr 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 46 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 OrientedSphereFitImpl , to access methods potentially hidden by heritage.

Definition at line 44 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 OrientedSphereFitImpl , to access methods potentially hidden by heritage.

Definition at line 44 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 41 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 40 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 38 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 39 of file orientedSphereFit.h.