//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation version 2 of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., // 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //===========================================================================

HermiteAppS.h

Go to the documentation of this file.
00001 #ifndef _HERMITEAPPS_H_
00002 #define _HERMITEAPPS_H_
00003 
00004 #include "GoTools/creators/EvalCurve.h"
00005 #include "GoTools/geometry/SplineCurve.h"
00006 #include "GoTools/geometry/SplineSurface.h"
00007 #include "GoTools/creators/HermiteGrid1DMulti.h"
00008 
00009 namespace Go
00010 {
00011 
00016 
00017 class HermiteAppS
00018 {
00019 public:
00030     HermiteAppS(EvalCurveSet* surface, 
00031                   double tolerance1, 
00032                   double tolerance2, 
00033                   std::vector<int> dims);
00034 
00049     HermiteAppS(EvalCurveSet* surface, double initpars[], int n,
00050                   double tolerance1, double tolerance2, std::vector<int> dims);
00051 
00053     ~HermiteAppS(){}
00054 
00058     void refineApproximation(); // Refine Hermite Grid.
00059 
00065     std::vector<boost::shared_ptr<SplineCurve> > getCurves();
00066 
00067 private:
00068     EvalCurveSet* surface_;     // Pointer to original surface existing outside *this.
00069     HermiteGrid1DMulti grid_; // We define a grid for all curves, separating point values.
00070     const double tol1_;
00071     const double tol2_;
00072     const double min_interval_; // Smaller intervals are not refined
00073     std::vector<boost::shared_ptr<SplineCurve> > curve_approx_; // Spline representations of approximation.
00074     /*   shared_ptr<SplineSurface> surface_approx_; // Spline representation of approximation */
00075 
00076     bool testSegment(int j, double& new_knot);  // Distance to _original
00077     int bisectSegment(int);
00078 
00079 
00080 };
00081 
00082 
00083 } // namespace Go
00084 
00085 #endif // _HERMITEAPPS_H_
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3