Class to accumulate points and make best line / plane approximation. More...
#include <MRBestFit.h>
Public Member Functions | |
MRMESH_API void | addPoint (const Vector3d &pt) |
MRMESH_API void | addPoint (const Vector3d &pt, double weight) |
void | addPoint (const Vector3f &pt) |
void | addPoint (const Vector3f &pt, float weight) |
MRMESH_API Plane3d | getBestPlane () const |
computes the best approximating plane from the accumulated points | |
Plane3f | getBestPlanef () const |
MRMESH_API Line3d | getBestLine () const |
computes the best approximating line from the accumulated points | |
Line3f | getBestLinef () const |
MRMESH_API bool | getCenteredCovarianceEigen (Vector3d ¢roid, Matrix3d &eigenvectors, Vector3d &eigenvalues) const |
computes centroid and eigenvectors/eigenvalues of the covariance matrix of the accumulated points | |
MRMESH_API bool | getCenteredCovarianceEigen (Vector3f ¢roid, Matrix3f &eigenvectors, Vector3f &eigenvalues) const |
MRMESH_API AffineXf3d | getBasicXf () const |
AffineXf3f | getBasicXf3f () const |
MRMESH_API std::array< AffineXf3d, 4 > | get4BasicXfs () const |
MRMESH_API std::array< AffineXf3f, 4 > | get4BasicXfs3f () const |
bool | valid () const |
Class to accumulate points and make best line / plane approximation.
MRMESH_API void MR::PointAccumulator::addPoint | ( | const Vector3d & | pt | ) |
MRMESH_API void MR::PointAccumulator::addPoint | ( | const Vector3d & | pt, |
double | weight ) |
|
inline |
|
inline |
MRMESH_API std::array< AffineXf3d, 4 > MR::PointAccumulator::get4BasicXfs | ( | ) | const |
returns 4 transformations, each maps (0,0,0) into point centroid, and maps vectors (1,0,0), (0,1,0), (0,0,1) into +/- first, +/- second, +/- third eigenvectors (forming positive reference frame) corresponding to ascending eigenvalues
MRMESH_API std::array< AffineXf3f, 4 > MR::PointAccumulator::get4BasicXfs3f | ( | ) | const |
MRMESH_API AffineXf3d MR::PointAccumulator::getBasicXf | ( | ) | const |
returns the transformation that maps (0,0,0) into point centroid, and maps vectors (1,0,0), (0,1,0), (0,0,1) into first, second, third eigenvectors corresponding to ascending eigenvalues
|
inline |
MRMESH_API Line3d MR::PointAccumulator::getBestLine | ( | ) | const |
computes the best approximating line from the accumulated points
|
inline |
MRMESH_API Plane3d MR::PointAccumulator::getBestPlane | ( | ) | const |
computes the best approximating plane from the accumulated points
|
inline |
MRMESH_API bool MR::PointAccumulator::getCenteredCovarianceEigen | ( | Vector3d & | centroid, |
Matrix3d & | eigenvectors, | ||
Vector3d & | eigenvalues ) const |
computes centroid and eigenvectors/eigenvalues of the covariance matrix of the accumulated points
MRMESH_API bool MR::PointAccumulator::getCenteredCovarianceEigen | ( | Vector3f & | centroid, |
Matrix3f & | eigenvectors, | ||
Vector3f & | eigenvalues ) const |
|
inline |