MeshCore::PlaneFit Class Reference

Approximation of a plane into a given set of points. More...

#include <Approximation.h>

Inheritance diagram for MeshCore::PlaneFit:
MeshCore::Approximation MeshCore::SurfaceFit

List of all members.

Public Member Functions

float Fit ()
 Fit a plane into the given points.
Base::Vector3f GetBase () const
Base::Vector3f GetDirU () const
Base::Vector3f GetDirV () const
float GetDistanceToPlane (const Base::Vector3f &rcPoint) const
 Returns the distance from the point rcPoint to the fitted plane.
Base::Vector3f GetNormal () const
 Returns the normal of the fitted plane.
float GetSignedStdDeviation () const
 Returns the standard deviation from the points to the fitted plane with respect to the orientation of the plane's normal.
float GetStdDeviation () const
 Returns the standard deviation from the points to the fitted plane.
 PlaneFit ()
 Construction.
void ProjectToPlane ()
 Projects the points onto the fitted plane.
virtual ~PlaneFit ()
 Destruction.

Protected Attributes

Base::Vector3f _vBase
 Base vector of the plane.
Base::Vector3f _vDirU
Base::Vector3f _vDirV
Base::Vector3f _vDirW
 Normal of the plane.

Detailed Description

Approximation of a plane into a given set of points.

Definition at line 128 of file Approximation.h.


Constructor & Destructor Documentation

MeshCore::PlaneFit::PlaneFit (  )  [inline]

Construction.

Definition at line 134 of file Approximation.h.

virtual MeshCore::PlaneFit::~PlaneFit (  )  [inline, virtual]

Destruction.

Definition at line 138 of file Approximation.h.


Member Function Documentation

float PlaneFit::Fit (  )  [virtual]
Base::Vector3f PlaneFit::GetBase (  )  const
Base::Vector3f PlaneFit::GetDirU (  )  const
Base::Vector3f PlaneFit::GetDirV (  )  const
float PlaneFit::GetDistanceToPlane ( const Base::Vector3f rcPoint  )  const

Returns the distance from the point rcPoint to the fitted plane.

If Fit() has not been called FLOAT_MAX is returned.

Definition at line 275 of file Approximation.cpp.

References MeshCore::Approximation::_bIsFitted, _vBase, _vDirW, and FLOAT_MAX.

Referenced by MeshCore::MeshPlaneVisitor::AllowVisit(), GetSignedStdDeviation(), and GetStdDeviation().

Base::Vector3f PlaneFit::GetNormal (  )  const
float PlaneFit::GetSignedStdDeviation (  )  const

Returns the standard deviation from the points to the fitted plane with respect to the orientation of the plane's normal.

If Fit() has not been called FLOAT_MAX is returned.

Definition at line 308 of file Approximation.cpp.

References MeshCore::Approximation::_bIsFitted, MeshCore::Approximation::_vPoints, MeshCore::Approximation::CountPoints(), SketcherExample::f, FLOAT_MAX, GetDistanceToPlane(), GetNormal(), Base::Length, and KDL::sqrt().

float PlaneFit::GetStdDeviation (  )  const

Returns the standard deviation from the points to the fitted plane.

If Fit() has not been called FLOAT_MAX is returned.

Definition at line 283 of file Approximation.cpp.

References MeshCore::Approximation::_bIsFitted, MeshCore::Approximation::_vPoints, MeshCore::Approximation::CountPoints(), FLOAT_MAX, GetDistanceToPlane(), and KDL::sqrt().

void PlaneFit::ProjectToPlane (  ) 

Projects the points onto the fitted plane.

Definition at line 349 of file Approximation.cpp.

References MeshCore::Approximation::_vPoints, MeshCore::Approximation::GetGravity(), and GetNormal().


Member Data Documentation

Base vector of the plane.

Definition at line 173 of file Approximation.h.

Referenced by Fit(), GetBase(), GetDistanceToPlane(), and MeshCore::SurfaceFit::PolynomFit().

Definition at line 174 of file Approximation.h.

Referenced by Fit(), GetDirU(), and MeshCore::SurfaceFit::PolynomFit().

Definition at line 175 of file Approximation.h.

Referenced by Fit(), GetDirV(), and MeshCore::SurfaceFit::PolynomFit().

Normal of the plane.

Definition at line 176 of file Approximation.h.

Referenced by Fit(), GetDistanceToPlane(), GetNormal(), and MeshCore::SurfaceFit::PolynomFit().


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

Generated on Wed Nov 23 19:02:26 2011 for FreeCAD by  doxygen 1.6.1