MeshLib Documentation
Loading...
Searching...
No Matches
MR::PlaneAccumulator Class Reference

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
 

Detailed Description

Class to accumulate planes to find then their crossing point.

Member Function Documentation

◆ addPlane() [1/2]

MRMESH_API void MR::PlaneAccumulator::addPlane ( const Plane3d & pl)

◆ addPlane() [2/2]

void MR::PlaneAccumulator::addPlane ( const Plane3f & pl)
inline

◆ findBestCrossPoint() [1/2]

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

Parameters
tolrelative epsilon-tolerance for too small number detection
rankoptional output for solution matrix rank according to given tolerance
spacerank=1: unit normal to solution plane, rank=2: unit direction of solution line, rank=3: zero vector

◆ findBestCrossPoint() [2/2]

MRMESH_API Vector3f MR::PlaneAccumulator::findBestCrossPoint ( const Vector3f & p0,
float tol,
int * rank = nullptr,
Vector3f * space = nullptr ) const

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