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

CrossTanOffDist.h

Go to the documentation of this file.
00001 #ifndef _CROSSTANOFFDIST_
00002 #define _CROSSTANOFFDIST_
00003 
00004 #include "GoTools/creators/EvalCurve.h"
00005 #include "GoTools/geometry/SplineCurve.h"
00006 #include <vector>
00007 #include <boost/smart_ptr.hpp>
00008 
00009 
00010 namespace Go
00011 {
00012 
00016 class CrossTanOffDist : public EvalCurve
00017 {
00018 public:
00019 
00035     CrossTanOffDist(boost::shared_ptr<SplineCurve>& poscurve,
00036                     boost::shared_ptr<SplineCurve>& tangcv1,
00037                     boost::shared_ptr<SplineCurve>& tangcv2,
00038                     boost::shared_ptr<SplineCurve>& blend1,
00039                     boost::shared_ptr<SplineCurve>& blend2,
00040                     boost::shared_ptr<SplineCurve>& opposite1,
00041                     boost::shared_ptr<SplineCurve>& opposite2,
00042                     double factor);
00043 
00044 
00046     virtual ~CrossTanOffDist();
00047 
00051     virtual Point eval( double t) const;
00052 
00065     virtual void eval( double t, int n, Point der[]) const; // n = order of diff
00066 
00069     virtual double start() const;
00070 
00073     virtual double end() const;
00074 
00077     virtual int dim() const;
00078 
00089     virtual bool approximationOK(double par, Point approxpos,
00090                                  double tol1, double tol2) const;
00091 
00092 private:
00093     const boost::shared_ptr<SplineCurve> poscurve_;
00094     std::vector<boost::shared_ptr<SplineCurve> > tangcurves_;
00095     std::vector<boost::shared_ptr<SplineCurve> > blends_;
00096     boost::shared_ptr<SplineCurve> oppositepos_;
00097     boost::shared_ptr<SplineCurve> lengthfac_;
00098     boost::shared_ptr<SplineCurve> avcross_;
00099     const double epstol_;
00100 
00108     void evalcrtan(double t, Point& blend, Point& projdiff) const ;
00109 
00119     void evalcrtan(double t, int n, Point derblend[], Point derproj[]) const;
00120 
00125     Point evalblend(double t) const;
00126 
00130     Point evaldiff(double t) const ;
00131 
00138     void evaldiff(double t, int n, Point der[]) const ;
00139 };
00140 
00141 
00142 } // namespace Go
00143 
00144 #endif
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3