CCCoreLib 31 May 2022
CloudCompare Core algorithms
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CCCoreLib::LocalModel Class Referenceabstract

Local modelization (generic interface) More...

#include <LocalModel.h>

Inheritance diagram for CCCoreLib::LocalModel:
Inheritance graph
[legend]
Collaboration diagram for CCCoreLib::LocalModel:
Collaboration graph
[legend]

Public Member Functions

virtual ~LocalModel ()=default
 Destructor.
 
virtual LOCAL_MODEL_TYPES getType () const =0
 Returns the model type.
 
const CCVector3getCenter () const
 Returns the model center.
 
PointCoordinateType getSquareSize () const
 Returns the model max radius (squared)
 
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 (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.
 
PointCoordinateType m_squaredRadius
 Max radius (squared)
 

Detailed Description

Local modelization (generic interface)

Local surface approximation of a point cloud

Constructor & Destructor Documentation

◆ LocalModel()

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

Constructor.

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

Member Function Documentation

◆ computeDistanceFromModelToPoint()

virtual ScalarType CCCoreLib::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 CCCoreLib::NAN_VALUE if the computation failed)

◆ New()

LocalModel * LocalModel::New ( LOCAL_MODEL_TYPES  type,
Neighbourhood subset,
const CCVector3 center,
PointCoordinateType  squaredRadius 
)
static

Factory.

Parameters
typethe model type
subset(small) set of points from which to compute the local model
centermodel "center"
squaredRadiusmodel max radius (squared)

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