MeshLib
 
Loading...
Searching...
No Matches
MR::QuadricApprox Class Reference

#include <MRBestFitQuadric.h>

Public Member Functions

MRMESH_API QuadricApprox ()
 
MRMESH_API void addPoint (const Vector3d &point, double weight=1.0)
 Adds point to accumulation with weight.
 
MRMESH_API Eigen::Matrix< double, 6, 1 > calcBestCoefficients () const
 

Static Public Member Functions

static MRMESH_API Vector3d findZeroProjection (const Eigen::Matrix< double, 6, 1 > &coefs)
 

Detailed Description

Accumulate points and make best quadric approximation

$ a*x^2 + b*x*y + c*y^2 + d*x + e*y + f = z $

Constructor & Destructor Documentation

◆ QuadricApprox()

MRMESH_API MR::QuadricApprox::QuadricApprox ( )

Member Function Documentation

◆ addPoint()

MRMESH_API void MR::QuadricApprox::addPoint ( const Vector3d & point,
double weight = 1.0 )

Adds point to accumulation with weight.

◆ calcBestCoefficients()

MRMESH_API Eigen::Matrix< double, 6, 1 > MR::QuadricApprox::calcBestCoefficients ( ) const

Calculates best coefficients a, b, c, d a*x^2 + b*x*y + c*y^2 + d*x + e*y + f = z

◆ findZeroProjection()

static MRMESH_API Vector3d MR::QuadricApprox::findZeroProjection ( const Eigen::Matrix< double, 6, 1 > & coefs)
static

Finds projection of zero point to surface given by coefs: a*x^2 + b*x*y + c*y^2 + d*x + e*y + f = z


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