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

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

#include <plane.h>

+ Inheritance diagram for Ponca::Plane< DataPoint, _NFilter, T >:
+ Collaboration diagram for Ponca::Plane< 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.
 
using EigenBase = Eigen::Hyperplane< typename DataPoint::Scalar, DataPoint::Dim >
 Specialization of Eigen::Hyperplane inherited by Ponca::Plane.
 

Public Member Functions

 Plane ()
 Default constructor.
 
Plane< DataPoint, _NFilter, T > & compactPlane ()
 Explicit conversion to Plane , to access methods potentially hidden by heritage.
 
const Plane< DataPoint, _NFilter, T > & compactPlane () const
 Explicit conversion to Plane , to access methods potentially hidden by heritage.
 
Plane< DataPoint, _NFilter, T > & plane ()
 Explicit conversion to Plane , to access methods potentially hidden by heritage.
 
const Plane< DataPoint, _NFilter, T > & plane () const
 Explicit conversion to Plane , to access methods potentially hidden by heritage.
 
void init ()
 Set the scalar field values to 0.
 
bool isValid () const
 Tell if the plane as been correctly set. Used to set CONFLICT_ERROR_FOUND during fitting.
 
bool operator== (const Plane< DataPoint, NeighborFilter, T > &other) const
 
bool operator!= (const Plane< DataPoint, NeighborFilter, T > &other) const
 Comparison operator, convenience function.
 
void setPlane (const VectorType &_dir, const VectorType &_pos)
 
void changeBasis (const VectorType &newbasis)
 Express the scalar field relatively to a new basis.
 
Scalar potential () const
 Value of the scalar field at the evaluation point.
 
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
 Scalar field gradient direction at the evaluation point.
 
VectorType primitiveGradient (const VectorType &) const
 Scalar field gradient direction at \( \mathbf{q}\).
 

Protected Types

enum  { check = Base::PROVIDES_PRIMITIVE_BASE , PROVIDES_PLANE }
 
using Base = T
 Base class of the procedure.
 

Protected Member Functions

Scalar potentialLocal (const VectorType &_lq) const
 Value of the scalar field at the evaluation point.
 
VectorType primitiveGradientLocal (const VectorType &) const
 Scalar field gradient direction at the evaluation point.
 

Detailed Description

template<class DataPoint, class _NFilter, typename T>
class Ponca::Plane< DataPoint, _NFilter, 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 inherits Eigen::Hyperplane.

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

This primitive provides:

PROVIDES_PLANE 

Definition at line 35 of file plane.h.

Member Typedef Documentation

◆ Base

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

Base class of the procedure.

Definition at line 37 of file plane.h.

◆ EigenBase

template<class DataPoint , class _NFilter , typename T >
using Ponca::Plane< DataPoint, _NFilter, T >::EigenBase = Eigen::Hyperplane<typename DataPoint::Scalar, DataPoint::Dim>

Specialization of Eigen::Hyperplane inherited by Ponca::Plane.

Definition at line 41 of file plane.h.

◆ NeighborFilter

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

Alias to the filter applied on the neighbors.

Definition at line 37 of file plane.h.

◆ Scalar

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

Alias to scalar type.

Definition at line 37 of file plane.h.

◆ VectorType

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

Alias to vector type.

Definition at line 37 of file plane.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 44 of file plane.h.

Constructor & Destructor Documentation

◆ Plane()

template<class DataPoint , class _NFilter , typename T >
Ponca::Plane< DataPoint, _NFilter, T >::Plane ( )
inline

Default constructor.

Definition at line 52 of file plane.h.

Member Function Documentation

◆ changeBasis()

template<class DataPoint , class _NFilter , typename T >
void Ponca::Plane< DataPoint, _NFilter, T >::changeBasis ( const VectorType newbasis)
inline

Express the scalar field relatively to a new basis.

The plane in dimension \(d\) is parametrized in the original basis. Moving the basis only affects the constant term: \(c' = c - \mathbf{u}_l^T.\mathbf{\Delta}\) with \(\Delta=old-new\).

Definition at line 100 of file plane.h.

◆ compactPlane() [1/2]

template<class DataPoint , class _NFilter , typename T >
Plane< DataPoint, _NFilter, T > & Ponca::Plane< DataPoint, _NFilter, T >::compactPlane ( )
inline

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

Definition at line 54 of file plane.h.

◆ compactPlane() [2/2]

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

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

Definition at line 54 of file plane.h.

◆ init()

template<class DataPoint , class _NFilter , typename T >
void Ponca::Plane< DataPoint, _NFilter, T >::init ( )
inline

Set the scalar field values to 0.

Definition at line 58 of file plane.h.

◆ isValid()

template<class DataPoint , class _NFilter , typename T >
bool Ponca::Plane< DataPoint, _NFilter, T >::isValid ( ) const
inline

Tell if the plane as been correctly set. Used to set CONFLICT_ERROR_FOUND during fitting.

Returns
false when called straight after init. Should be true after fitting

Definition at line 67 of file plane.h.

◆ operator!=()

template<class DataPoint , class _NFilter , typename T >
bool Ponca::Plane< DataPoint, _NFilter, T >::operator!= ( const Plane< DataPoint, NeighborFilter, T > &  other) const
inline

Comparison operator, convenience function.

Definition at line 78 of file plane.h.

◆ operator==()

template<class DataPoint , class _NFilter , typename T >
bool Ponca::Plane< DataPoint, _NFilter, T >::operator== ( const Plane< DataPoint, NeighborFilter, T > &  other) const
inline

Definition at line 72 of file plane.h.

◆ plane() [1/2]

template<class DataPoint , class _NFilter , typename T >
Plane< DataPoint, _NFilter, T > & Ponca::Plane< DataPoint, _NFilter, T >::plane ( )
inline

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

Definition at line 55 of file plane.h.

◆ plane() [2/2]

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

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

Definition at line 55 of file plane.h.

◆ potential() [1/2]

template<class DataPoint , class _NFilter , typename T >
Scalar Ponca::Plane< DataPoint, _NFilter, T >::potential ( ) const
inline

Value of the scalar field at the evaluation point.

See also
method #isSigned of the fit to check if the sign is reliable

Definition at line 110 of file plane.h.

◆ potential() [2/2]

template<class DataPoint , class _NFilter , typename T >
Scalar Ponca::Plane< DataPoint, _NFilter, T >::potential ( const VectorType _q) const
inline

Value of the scalar field at the location \( \mathbf{q} \).

See also
method #isSigned of the fit to check if the sign is reliable

Definition at line 117 of file plane.h.

◆ potentialLocal()

template<class DataPoint , class _NFilter , typename T >
Scalar Ponca::Plane< DataPoint, _NFilter, T >::potentialLocal ( const VectorType _lq) const
inlineprotected

Value of the scalar field at the evaluation point.

See also
method #isSigned of the fit to check if the sign is reliable

Definition at line 148 of file plane.h.

◆ primitiveGradient() [1/2]

template<class DataPoint , class _NFilter , typename T >
VectorType Ponca::Plane< DataPoint, _NFilter, T >::primitiveGradient ( ) const
inline

Scalar field gradient direction at the evaluation point.

Definition at line 133 of file plane.h.

◆ primitiveGradient() [2/2]

template<class DataPoint , class _NFilter , typename T >
VectorType Ponca::Plane< DataPoint, _NFilter, T >::primitiveGradient ( const VectorType ) const
inline

Scalar field gradient direction at \( \mathbf{q}\).

Definition at line 140 of file plane.h.

◆ primitiveGradientLocal()

template<class DataPoint , class _NFilter , typename T >
VectorType Ponca::Plane< DataPoint, _NFilter, T >::primitiveGradientLocal ( const VectorType ) const
inlineprotected

Scalar field gradient direction at the evaluation point.

Definition at line 154 of file plane.h.

◆ project()

template<class DataPoint , class _NFilter , typename T >
VectorType Ponca::Plane< DataPoint, _NFilter, T >::project ( const VectorType _q) const
inline

Project a point on the plane.

Definition at line 125 of file plane.h.

◆ setPlane()

template<class DataPoint , class _NFilter , typename T >
void Ponca::Plane< DataPoint, _NFilter, T >::setPlane ( const VectorType _dir,
const VectorType _pos 
)
inline

Definition at line 87 of file plane.h.