Spline2FunctionInt.h

00001 //===========================================================================
00002 // GoTools - SINTEF Geometry Tools
00003 //
00004 // GoTools module: Intersections, version 1.0
00005 //
00006 // Copyright (C) 2000-2007 SINTEF ICT, Applied Mathematics, Norway.
00007 //
00008 // This program is free software; you can redistribute it and/or          
00009 // modify it under the terms of the GNU General Public License            
00010 // as published by the Free Software Foundation version 2 of the License. 
00011 //
00012 // This program is distributed in the hope that it will be useful,        
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of         
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          
00015 // GNU General Public License for more details.                           
00016 //
00017 // You should have received a copy of the GNU General Public License      
00018 // along with this program; if not, write to the Free Software            
00019 // Foundation, Inc.,                                                      
00020 // 59 Temple Place - Suite 330,                                           
00021 // Boston, MA  02111-1307, USA.                                           
00022 //
00023 // Contact information: E-mail: tor.dokken@sintef.no                      
00024 // SINTEF ICT, Department of Applied Mathematics,                         
00025 // P.O. Box 124 Blindern,                                                 
00026 // 0314 Oslo, Norway.                                                     
00027 //
00028 // Other licenses are also available for this software, notably licenses
00029 // for:
00030 // - Building commercial software.                                        
00031 // - Building software whose source code you wish to keep private.        
00032 //===========================================================================
00033 #ifndef _SPLINE2FUNCTIONINT_H
00034 #define _SPLINE2FUNCTIONINT_H
00035 
00036 
00037 #include "Param2FunctionInt.h"
00038 
00039 
00040 namespace Go {
00043 
00044 
00045 
00048 
00049 class Spline2FunctionInt : public Param2FunctionInt {
00050 public:
00054     explicit Spline2FunctionInt(boost::shared_ptr<SplineSurface> surf);
00055 
00060     explicit Spline2FunctionInt(boost::shared_ptr<SplineSurface> surf, 
00061                                 Param2FunctionInt *parent);
00062 
00064     virtual ~Spline2FunctionInt(){};
00065 
00070     virtual boost::shared_ptr<Param2FunctionInt>
00071     makeIntFunction(boost::shared_ptr<ParamSurface> surf);
00072     
00077     virtual bool hasInnerKnots(int pardir) const;
00078 
00083     virtual bool hasCriticalValsOrKnots(int pardir) const;
00084 
00089     virtual std::vector<double> getInnerKnotVals(int pardir,
00090                                                  bool sort=false) const;
00091 
00096     virtual std::vector<double> getCriticalValsAndKnots(int pardir) const;
00097 
00098 //     void getLengthAndWiggle(double *length, double *wiggle);
00099 
00100     // pardir = 0 || 1
00101     // @@sbr A trimmed sf need not have a startparam/endparam ...
00106     virtual double startParam(int pardir) const;
00107 
00112     virtual double endParam(int pardir) const;
00113 
00114     // We want to know if there exists par direction in which the
00115     // function is monotone (guarantees at most one solution for a
00116     // continuous function).  We also would like to know in what
00117     // direction the function is monotone (will then move in
00118     // orthogonal direction).
00123     virtual bool monotone(Point& dir, double tol=1.0e-15) const;
00124 
00125     // Functions used for coincidence testing
00126 
00127     // Find the interval in which t lies, if t is within tol of an
00128     // existing knot, t will be changed to that knot.
00136     virtual int knotIntervalFuzzy(int pardir, double& t, double tol) const;
00137 
00145     virtual double nextSegmentVal(int pardir, double par, bool forward) const;
00146 
00149     virtual void 
00150     getBoundaryObjects(std::vector<boost::
00151                        shared_ptr<BoundaryFunctionInt> >& bd_objs);
00152 
00156     boost::shared_ptr<SplineSurface> surface3D();
00157 
00161     boost::shared_ptr<SplineSurface> createGradSurface() const;
00162 
00163 protected:
00164     // Data members
00165     boost::shared_ptr<SplineSurface> spsf_; // shared_ptr to this
00166                                             // curve
00167 
00168 };
00169 
00170 
00172 } // namespace Go
00173 
00174 
00175 #endif // _SPLINE2FUNCTIONINT_H
00176 
00177 

Generated on Fri Nov 23 12:24:33 2007 for GoTools Intersections Library by  doxygen 1.5.1