Approximation of a quadratic surface into a given set of points. More...
#include <Approximation.h>
Public Member Functions | |
| void | CalcEigenValues (float &dLambda1, float &dLambda2, float &dLambda3, Base::Vector3f &clEV1, Base::Vector3f &clEV2, Base::Vector3f &clEV3) const |
| Aufstellen der Formanmatrix A und Berechnen der Eigenwerte. | |
| void | CalcZValues (float x, float y, float &dZ1, float &dZ2) const |
| float | Fit () |
| Aufruf des Fit-Algorithmus. | |
| float | GetCoeff (unsigned long ulIndex) const |
| Übertragen der Quadric-Koeffizienten. | |
| const float & | GetCoeffArray () const |
| Übertragen der Koeffizientan als Referenz auf das interne Array. | |
| bool | GetCurvatureInfo (float x, float y, float z, float &rfCurv0, float &rfcurv1) |
| bool | GetCurvatureInfo (float x, float y, float z, float &rfCurv0, float &rfCurv1, Base::Vector3f &rkDir0, Base::Vector3f &rkDir1, float &dDistance) |
| Berechnen der Krümmungswerte der Quadric in einem bestimmten Punkt. | |
| QuadraticFit () | |
| Construction. | |
| virtual | ~QuadraticFit () |
| Destruction. | |
Protected Attributes | |
| float | _fCoeff [10] |
| Ziel der Koeffizienten aus dem Fit. | |
Approximation of a quadratic surface into a given set of points.
The implicit form of the surface is defined by F(x,y,z) = a * x^2 + b * y^2 + c * z^2 + 2d * x * y + 2e * x * z + 2f * y * z + g * x + h * y + * i * z + k = 0 Depending on the parameters (a,..,k) this surface defines a sphere, ellipsoid, cylinder, cone and so on.
Definition at line 190 of file Approximation.h.
| MeshCore::QuadraticFit::QuadraticFit | ( | ) | [inline] |
Construction.
Definition at line 196 of file Approximation.h.
| virtual MeshCore::QuadraticFit::~QuadraticFit | ( | ) | [inline, virtual] |
Destruction.
Definition at line 200 of file Approximation.h.
| void QuadraticFit::CalcEigenValues | ( | float & | dLambda1, | |
| float & | dLambda2, | |||
| float & | dLambda3, | |||
| Base::Vector3f & | clEV1, | |||
| Base::Vector3f & | clEV2, | |||
| Base::Vector3f & | clEV3 | |||
| ) | const |
Aufstellen der Formanmatrix A und Berechnen der Eigenwerte.
| dLambda1 | Eigenwert 1 | |
| dLambda2 | Eigenwert 2 | |
| dLambda3 | Eigenwert 3 | |
| clEV1 | Eigenvektor 1 | |
| clEV2 | Eigenvektor 2 | |
| clEV3 | Eigenvektor 3 |
Definition at line 428 of file Approximation.cpp.
References MeshCore::Approximation::_bIsFitted, _fCoeff, MeshCore::Approximation::Convert(), Wm4::Matrix3< Real >::EigenDecomposition(), SketcherExample::f, and Wm4::Matrix3< Real >::GetColumn().
| void QuadraticFit::CalcZValues | ( | float | x, | |
| float | y, | |||
| float & | dZ1, | |||
| float & | dZ2 | |||
| ) | const |
Definition at line 474 of file Approximation.cpp.
References MeshCore::Approximation::_bIsFitted, _fCoeff, SketcherExample::f, FLOAT_MAX, and KDL::sqrt().
| float QuadraticFit::Fit | ( | ) | [virtual] |
Aufruf des Fit-Algorithmus.
Implements MeshCore::Approximation.
Definition at line 412 of file Approximation.cpp.
References MeshCore::Approximation::_bIsFitted, _fCoeff, MeshCore::Approximation::_fLastResult, MeshCore::Approximation::CountPoints(), FLOAT_MAX, MeshCore::Approximation::GetMgcVectorArray(), and Wm4::QuadraticFit3< float >().
| float QuadraticFit::GetCoeff | ( | unsigned long | ulIndex | ) | const |
Übertragen der Quadric-Koeffizienten.
| ulIndex | Nummer des Koeffizienten (0..9) |
Definition at line 402 of file Approximation.cpp.
References MeshCore::Approximation::_bIsFitted, _fCoeff, and FLOAT_MAX.
| const float & QuadraticFit::GetCoeffArray | ( | ) | const |
Übertragen der Koeffizientan als Referenz auf das interne Array.
Definition at line 397 of file Approximation.cpp.
References _fCoeff.
| bool QuadraticFit::GetCurvatureInfo | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| float & | rfCurv0, | |||
| float & | rfcurv1 | |||
| ) |
Definition at line 385 of file Approximation.cpp.
References MeshCore::Approximation::_bIsFitted, _fCoeff, and MeshCore::FunctionContainer::CurvatureInfo().
| bool QuadraticFit::GetCurvatureInfo | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| float & | rfCurv0, | |||
| float & | rfCurv1, | |||
| Base::Vector3f & | rkDir0, | |||
| Base::Vector3f & | rkDir1, | |||
| float & | dDistance | |||
| ) |
Berechnen der Krümmungswerte der Quadric in einem bestimmten Punkt.
| x | X-Koordinate | |
| y | Y-Koordinate | |
| z | Z-Koordinate | |
| rfCurv0 | 1. Hauptkrümmung | |
| rfCurv1 | 2. Hauptkrümmung | |
| rkDir0 | Richtung der 1. Hauptkrümmung | |
| rkDir1 | Richtung der 2. Hauptkrümmung | |
| dDistance |
Definition at line 365 of file Approximation.cpp.
References MeshCore::Approximation::_bIsFitted, _fCoeff, MeshCore::Approximation::Convert(), MeshCore::FunctionContainer::CurvatureInfo(), MeshCore::FunctionContainer::GetGradient(), and Base::Vector3< _Precision >::Length().
float MeshCore::QuadraticFit::_fCoeff[10] [protected] |
Ziel der Koeffizienten aus dem Fit.
Definition at line 251 of file Approximation.h.
Referenced by CalcEigenValues(), CalcZValues(), Fit(), GetCoeff(), GetCoeffArray(), and GetCurvatureInfo().
1.6.1