//=========================================================================== // 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. //===========================================================================

HermiteAppC.h

Go to the documentation of this file.
00001 #ifndef _HERMITEAPPC_H_
00002 #define _HERMITEAPPC_H_
00003 
00004 #include "GoTools/creators/EvalCurve.h"
00005 #include "GoTools/geometry/SplineCurve.h"
00006 #include "GoTools/creators/HermiteGrid1D.h"
00007 
00008 
00009 namespace Go
00010 {
00011 
00015 
00016 class HermiteAppC
00017 {
00018 public:
00019 
00025     HermiteAppC(EvalCurve* crv, double tolerance1, double tolerance2);
00026 
00037     HermiteAppC(EvalCurve* crv, double initpars[],int n, 
00038                   double tolerance1, double tolerance2);
00039 
00041     ~HermiteAppC(){}
00042 
00046     void refineApproximation(); // Refine Hermite Grid.
00047 
00051     boost::shared_ptr<SplineCurve> getCurve();  
00052 
00053  private:
00054     EvalCurve* curve_;  // Pointer to original curve existing outside *this.
00055     const double tol1_;
00056     const double tol2_;
00057     double min_interval_;       // Smaller intervals are not refined
00058     HermiteGrid1D grid_;
00059 //     boost::shared_ptr<SplineCurve> curve_approx_; // Spline representation of approximation
00060 
00061     // Distance to evaluator ok (with current grid)? Return value: 1 =
00062     // ok, 0 = insert new_knot, -1 = failed.
00063     int testSegment(int j, double& new_knot);
00064     int bisectSegment(int);
00065     bool method_failed_;
00066 
00067 
00068 };
00069 
00070 } // namespace Go;
00071 
00072 #endif
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3