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

CrossTangentOffset.h

Go to the documentation of this file.
00001 #ifndef _BLENDINGCURVE_
00002 #define _BLENDINGCURVE_
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 
00017 
00018 class CrossTangentOffset : public EvalCurve
00019 {
00020  public:
00021 
00035   CrossTangentOffset(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 
00041 
00043   virtual ~CrossTangentOffset();
00044 
00045   // Inherited from EvalCurve
00046   virtual Point eval( double t) const ;
00047 
00048   // Inherited from EvalCurve
00049   virtual void eval( double t, int n, Point der[]) const ; // n = order of diff
00050 
00051   // Inherited from EvalCurve
00052   virtual double start() const ;
00053 
00054   // Inherited from EvalCurve
00055   virtual double end() const ;
00056 
00057   // Inherited from EvalCurve
00058   virtual int dim() const ;
00059 
00076   virtual bool approximationOK(double par, Point approxpos,
00077                                double tol1, double tol2) const ;
00078 
00079  private:
00080   const boost::shared_ptr<SplineCurve> poscurve_;
00081   std::vector<boost::shared_ptr<SplineCurve> > tangcurves_;  // will always have 2 elements
00082   std::vector<boost::shared_ptr<SplineCurve> > blends_; // will always have two elemnets
00083   boost::shared_ptr<SplineCurve> length_;
00084 
00085   void evalcrtan(double t, int n, Point der[]) const ;
00086   Point evalcrtan(double t) const ;
00087 };
00088 
00089 }
00090 #endif
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3