24 void addPoint(
const Vector3f& pt,
float weight ) {
addPoint( Vector3d( pt ), weight ); }
47 bool valid()
const {
return sumWeight_ > 0; };
50 double sumWeight_ = 0;
52 SymMatrix3d momentum2_;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Class to accumulate planes to find then their crossing point.
Definition MRBestFit.h:74
MRMESH_API Vector3f findBestCrossPoint(const Vector3f &p0, float tol, int *rank=nullptr, Vector3f *space=nullptr) const
MRMESH_API void addPlane(const Plane3d &pl)
void addPlane(const Plane3f &pl)
Definition MRBestFit.h:77
MRMESH_API Vector3d findBestCrossPoint(const Vector3d &p0, double tol, int *rank=nullptr, Vector3d *space=nullptr) const
Class to accumulate points and make best line / plane approximation.
Definition MRBestFit.h:19
MRMESH_API void addPoint(const Vector3d &pt, double weight)
MRMESH_API Line3d getBestLine() const
computes the best approximating line from the accumulated points
MRMESH_API Plane3d getBestPlane() const
computes the best approximating plane from the accumulated points
void addPoint(const Vector3f &pt, float weight)
Definition MRBestFit.h:24
AffineXf3f getBasicXf3f() const
Definition MRBestFit.h:40
void addPoint(const Vector3f &pt)
Definition MRBestFit.h:23
bool valid() const
Definition MRBestFit.h:47
MRMESH_API std::array< AffineXf3d, 4 > get4BasicXfs() 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 AffineXf3d getBasicXf() const
Plane3f getBestPlanef() const
Definition MRBestFit.h:28
MRMESH_API std::array< AffineXf3f, 4 > get4BasicXfs3f() const
Line3f getBestLinef() const
Definition MRBestFit.h:31
MRMESH_API void addPoint(const Vector3d &pt)
MRMESH_API bool getCenteredCovarianceEigen(Vector3f ¢roid, Matrix3f &eigenvectors, Vector3f &eigenvalues) const
MRMESH_API void accumulateWeighedPoints(PointAccumulator &accum, const std::vector< Vector3f > &points, const std::vector< float > &weights, const AffineXf3f *xf=nullptr)
Adds in existing PointAccumulator all given weighed points.
MRMESH_API void accumulateLineCenters(PointAccumulator &accum, const Polyline3 &pl, const AffineXf3f *xf=nullptr)
Adds in existing PointAccumulator all line centers with the weight equal to the length line.
MRMESH_API void accumulateFaceCenters(PointAccumulator &accum, const MeshPart &mp, const AffineXf3f *xf=nullptr)
Adds in existing PointAccumulator all mesh face centers with the weight equal to face area.
MRMESH_API void accumulatePoints(PointAccumulator &accum, const std::vector< Vector3f > &points, const AffineXf3f *xf=nullptr)
Adds in existing PointAccumulator all given points.
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh/MRPointCloud.h:16