Class to accumulate planes to find then their crossing point. More...
#include <MRBestFit.h>
Public Member Functions | |
MRMESH_API void | addPlane (const Plane3d &pl) |
void | addPlane (const Plane3f &pl) |
MRMESH_API Vector3d | findBestCrossPoint (const Vector3d &p0, double tol, int *rank=nullptr, Vector3d *space=nullptr) const |
MRMESH_API Vector3f | findBestCrossPoint (const Vector3f &p0, float tol, int *rank=nullptr, Vector3f *space=nullptr) const |
Class to accumulate planes to find then their crossing point.
MRMESH_API void MR::PlaneAccumulator::addPlane | ( | const Plane3d & | pl | ) |
|
inline |
MRMESH_API Vector3d MR::PlaneAccumulator::findBestCrossPoint | ( | const Vector3d & | p0, |
double | tol, | ||
int * | rank = nullptr, | ||
Vector3d * | space = nullptr ) const |
computes the point that minimizes the sum of squared distances to accumulated planes; if such point is not unique then returns the one closest to p0
tol | relative epsilon-tolerance for too small number detection |
rank | optional output for solution matrix rank according to given tolerance |
space | rank=1: unit normal to solution plane, rank=2: unit direction of solution line, rank=3: zero vector |
MRMESH_API Vector3f MR::PlaneAccumulator::findBestCrossPoint | ( | const Vector3f & | p0, |
float | tol, | ||
int * | rank = nullptr, | ||
Vector3f * | space = nullptr ) const |