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

Inherits Grenaille::PrimitiveBase< DataPoint, _WFunctor >.

Detailed Description

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

Implicit hyperplane defined by an homogeneous vector \(\mathbf{p}\).

In n-dimensionnal space, the plane is defined as the \(0\)-isosurface of the scalar field

\( s_\mathbf{u}(\mathbf{x}) = \left[ \mathbf{x}^T \; 1 \;\right]^T \cdot \mathbf{p} \).

This class uses a compact storage of n+1 scalars in n-dimensionnal space. It can be sensitive to the data scale, leading to potential instabilities due to round errors at large scales.

This primitive requires the definition of n-dimensionnal vectors (VectorType) and homogeneous n-dimensionnal vectors (HVectorType) in Concept::PointConcept.

This primitive provides:

PROVIDES_PLANE 
Note
The first n-components of the plane must define a normalized vector

Public Types

typedef DataPoint::Scalar Scalar
 Scalar type inherited from DataPoint.
 
typedef DataPoint::VectorType VectorType
 Vector type inherited from DataPoint.
 
typedef DataPoint::MatrixType MatrixType
 Matrix type inherited from DataPoint.
 
typedef DataPoint::HVectorType HVectorType
 Homogeneous vector type inherited from DataPoint.
 
typedef _WFunctor WFunctor
 Weight Function.
 

Public Member Functions

 CompactPlane ()
 Default constructor.
 
void resetPrimitive ()
 Set the scalar field values to 0 and reset the isNormalized() status.
 
void setPlane (const VectorType &_dir, const VectorType &_pos)
 
Scalar potential (const VectorType &_q) const
 Value of the scalar field at the location \( \mathbf{q} \).
 
VectorType project (const VectorType &_q) const
 Project a point on the plane.
 
VectorType primitiveGradient (const VectorType &) const
 Scalar field gradient direction at \( \mathbf{q}\).
 
- Public Member Functions inherited from Grenaille::PrimitiveBase< DataPoint, _WFunctor >
 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
 

Public Attributes

HVectorType m_p
 Homogeneous plane representation.
 

Protected Types

enum  { PROVIDES_PLANE }
 

Additional Inherited Members

- Protected Attributes inherited from Grenaille::PrimitiveBase< DataPoint, _WFunctor >
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 Enumeration Documentation

template<class DataPoint , class _WFunctor , typename T = void>
anonymous enum
protected
Enumerator
PROVIDES_PLANE 

Provides a Plane primitive.