ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::LocalModel Class Referenceabstract

Local modelization (generic interface) More...

#include <LocalModel.h>

Inheritance diagram for cloudViewer::LocalModel:
Collaboration diagram for cloudViewer::LocalModel:

Public Member Functions

virtual ~LocalModel ()=default
 Destructor. More...
 
virtual CV_LOCAL_MODEL_TYPES getType () const =0
 Returns the model type. More...
 
const CCVector3getCenter () const
 Returns the model center. More...
 
PointCoordinateType getSquareSize () const
 Returns the model max radius (squared) More...
 
virtual ScalarType computeDistanceFromModelToPoint (const CCVector3 *P, CCVector3 *nearestPoint=nullptr) const =0
 Compute the (unsigned) distance between a 3D point and this model. More...
 

Static Public Member Functions

static LocalModelNew (CV_LOCAL_MODEL_TYPES type, Neighbourhood &subset, const CCVector3 &center, PointCoordinateType squaredRadius)
 Factory. More...
 

Protected Member Functions

 LocalModel (const CCVector3 &center, PointCoordinateType squaredRadius)
 Constructor. More...
 

Protected Attributes

CCVector3 m_modelCenter
 Center. More...
 
PointCoordinateType m_squaredRadius
 Max radius (squared) More...
 

Detailed Description

Local modelization (generic interface)

Local surface approximation of a point cloud

Definition at line 17 of file LocalModel.h.

Constructor & Destructor Documentation

◆ ~LocalModel()

virtual cloudViewer::LocalModel::~LocalModel ( )
virtualdefault

Destructor.

◆ LocalModel()

LocalModel::LocalModel ( const CCVector3 center,
PointCoordinateType  squaredRadius 
)
protected

Constructor.

Parameters
centermodel "center"
squaredRadiusmodel max "radius" (squared)

Definition at line 161 of file LocalModel.cpp.

Member Function Documentation

◆ computeDistanceFromModelToPoint()

virtual ScalarType cloudViewer::LocalModel::computeDistanceFromModelToPoint ( const CCVector3 P,
CCVector3 nearestPoint = nullptr 
) const
pure virtual

Compute the (unsigned) distance between a 3D point and this model.

Parameters
[in]Pthe query point
[out]nearestPointreturns the nearest point (optional)
Returns
the (unsigned) distance (or NAN_VALUE if the computation failed)

Implemented in DelaunayLocalModel, LSLocalModel, and QuadricLocalModel.

Referenced by cloudViewer::DistanceComputationTools::computeCellHausdorffDistanceWithLocalModel(), and define_LocalModel().

◆ getCenter()

const CCVector3& cloudViewer::LocalModel::getCenter ( ) const
inline

Returns the model center.

Definition at line 37 of file LocalModel.h.

References m_modelCenter.

Referenced by define_LocalModel().

◆ getSquareSize()

PointCoordinateType cloudViewer::LocalModel::getSquareSize ( ) const
inline

Returns the model max radius (squared)

Definition at line 40 of file LocalModel.h.

References m_squaredRadius.

Referenced by define_LocalModel().

◆ getType()

virtual CV_LOCAL_MODEL_TYPES cloudViewer::LocalModel::getType ( ) const
pure virtual

Returns the model type.

Implemented in QuadricLocalModel, DelaunayLocalModel, and LSLocalModel.

Referenced by define_LocalModel().

◆ New()

Member Data Documentation

◆ m_modelCenter

CCVector3 cloudViewer::LocalModel::m_modelCenter
protected

Center.

Definition at line 59 of file LocalModel.h.

Referenced by getCenter().

◆ m_squaredRadius

PointCoordinateType cloudViewer::LocalModel::m_squaredRadius
protected

Max radius (squared)

Definition at line 62 of file LocalModel.h.

Referenced by getSquareSize().


The documentation for this class was generated from the following files: