MeshCore::Approximation Class Referenceabstract

Abstract base class for approximation of a geometry to a given set of points. More...

#include <Approximation.h>

Public Member Functions

void AddPoint (const Base::Vector3f &rcVector)
 Add point for the fit algorithm. More...
 
void AddPoints (const MeshPointArray &points)
 Add points for the fit algorithm. More...
 
void AddPoints (const std::list< Base::Vector3f > &rsPointList)
 Add points for the fit algorithm. More...
 
void AddPoints (const std::set< Base::Vector3f > &rsPointSet)
 Add points for the fit algorithm. More...
 
void AddPoints (const std::vector< Base::Vector3f > &rvPointVect)
 Add points for the fit algorithm. More...
 
 Approximation ()
 Construction. More...
 
void Clear ()
 Deletes the inserted points and frees any allocated resources. More...
 
std::size_t CountPoints () const
 Determines the number of the current added points. More...
 
bool Done () const
 Returns true if Fit() has been called for the current set of points, false otherwise. More...
 
virtual float Fit ()=0
 Pure virtual function to fit the geometry to the given points. More...
 
Base::Vector3f GetGravity () const
 Returns the center of gravity of the current added points. More...
 
float GetLastResult () const
 Returns the result of the last fit. More...
 
const std::list< Base::Vector3f > & GetPoints () const
 Get all added points. More...
 
virtual ~Approximation ()
 Destroys the object and frees any allocated resources. More...
 

Protected Member Functions

void GetMgcVectorArray (std::vector< Wm4::Vector3< double > > &rcPts) const
 Creates a vector of Wm4::Vector3 elements. More...
 

Detailed Description

Abstract base class for approximation of a geometry to a given set of points.

Constructor & Destructor Documentation

◆ Approximation()

Approximation::Approximation ( )

Construction.

◆ ~Approximation()

Approximation::~Approximation ( )
virtual

Destroys the object and frees any allocated resources.

References Clear().

Member Function Documentation

◆ AddPoint()

◆ AddPoints() [1/4]

void Approximation::AddPoints ( const MeshPointArray points)

Add points for the fit algorithm.

◆ AddPoints() [2/4]

void Approximation::AddPoints ( const std::list< Base::Vector3f > &  rsPointList)

Add points for the fit algorithm.

◆ AddPoints() [3/4]

void Approximation::AddPoints ( const std::set< Base::Vector3f > &  rsPointSet)

Add points for the fit algorithm.

◆ AddPoints() [4/4]

◆ Clear()

void Approximation::Clear ( void  )

◆ CountPoints()

◆ Done()

◆ Fit()

virtual float MeshCore::Approximation::Fit ( )
pure virtual

Pure virtual function to fit the geometry to the given points.

This function must be implemented by every subclass.

Implemented in MeshCore::PlaneFit, MeshCore::QuadraticFit, MeshCore::SurfaceFit, MeshCore::CylinderFit, MeshCore::SphereFit, MeshCore::PolynomialFit, MeshCoreFit::CylinderFit, and MeshCoreFit::SphereFit.

◆ GetGravity()

Base::Vector3f Approximation::GetGravity ( ) const

◆ GetLastResult()

float Approximation::GetLastResult ( ) const

Returns the result of the last fit.

Returns
float Quality of the last fit.

◆ GetMgcVectorArray()

void Approximation::GetMgcVectorArray ( std::vector< Wm4::Vector3< double > > &  rcPts) const
protected

Creates a vector of Wm4::Vector3 elements.

Referenced by MeshCore::QuadraticFit::Fit().

◆ GetPoints()

const std::list< Base::Vector3f > & MeshCore::Approximation::GetPoints ( ) const

Get all added points.


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