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

HermiteGrid1D.h

Go to the documentation of this file.
00001 #ifndef _HERMITEGRID1D_
00002 #define _HERMITEGRID1D_
00003 
00004 #include <vector>
00005 #include "GoTools/utils/Point.h"
00006 
00007 namespace Go
00008 {
00009 
00010 class EvalCurve;
00011 
00016 
00017 class HermiteGrid1D
00018 {
00019 public:
00020 
00027     HermiteGrid1D(const EvalCurve& crv, double start, double end);
00028 
00035     HermiteGrid1D(const EvalCurve& crv, double param[], int n);
00036     
00038     ~HermiteGrid1D();
00039 
00045     int addKnot(const EvalCurve& crv, double knot);
00046   
00055     void getSegment(int left, int right, double& spar,
00056                     double& epar, Point bezcoef[4]);
00057     
00059     std::vector<double> getKnots() { return knots_; }
00060 
00062     std::vector<Point> getData() { return array_; }
00063 
00065     int dim(){ return dim_; }
00066 
00068     int size() {return MM_;}
00069 
00070 private:
00071   std::vector<double> knots_;     // Sorted array of DISTINCT parameters of curve
00072   std::vector<Point> array_;    // Array holding position, and
00073                                 // directional derivative
00074   int dim_;                     // Spatial dimension of position,
00075   int MM_;                      // Number of grid points
00076   int elem_size_;               // Number of Point stored for each
00077                                 // grid point (typically 2: pt, der)
00078   int index_;                   // Index into knot array
00079 
00080 
00081   int getPosition(double knot);
00082 
00083 };
00084 
00085 } // namespace Go
00086 
00087 #endif
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3