Patate Lib  0.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Grenaille::PrimitiveBase< DataPoint, _WFunctor, T > Class Template Reference

Detailed Description

template<class DataPoint, class _WFunctor, typename T = void>
class Grenaille::PrimitiveBase< DataPoint, _WFunctor, T >

Primitive base class.

This class stores and provides public access to the fitting state, and must be inherited by classes implementing new primitives.

Protected fields m_eCurrentState and m_nbNeighbors should be updated during the fitting process by the inheriting class.

Public Member Functions

 PrimitiveBase ()
 Default constructor.
 
void resetPrimitive ()
 Reset fitting state status.
 
bool isReady () const
 Is the primitive well fitted an ready to use (finalize has been called) More...
 
bool isStable () const
 Is the plane fitted an ready to use (finalize has been called and the result is stable, eq. having more than 6 neighbors)
 
FIT_RESULT getCurrentState () const
 

Protected Attributes

FIT_RESULT m_eCurrentState
 Represent the current state of the fit (finalize function update the state)
 
int m_nbNeighbors
 Give the number of neighbors.
 

Member Function Documentation

template<class DataPoint, class _WFunctor, typename T = void>
FIT_RESULT Grenaille::PrimitiveBase< DataPoint, _WFunctor, T >::getCurrentState ( ) const
inline
Returns
the current test of the fit
template<class DataPoint, class _WFunctor, typename T = void>
bool Grenaille::PrimitiveBase< DataPoint, _WFunctor, T >::isReady ( ) const
inline

Is the primitive well fitted an ready to use (finalize has been called)

Warning
The fit can be unstable (having neighbors between 3 and 6)