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

ProjectCurveAndCrossTan.h

Go to the documentation of this file.
00001 #ifndef _PROJECTCURVEANDTAN_
00002 #define _PROJECTCURVEANDTAN_
00003 
00004 #include <boost/smart_ptr.hpp>
00005 
00006 #include "GoTools/utils/Point.h"
00007 #include "GoTools/creators/EvalCurveSet.h"
00008 #include "GoTools/geometry/SplineCurve.h"
00009 #include "GoTools/geometry/SplineSurface.h"
00010 
00011 
00012 
00013 namespace Go
00014 {
00015 
00021 class ProjectCurveAndCrossTan : public EvalCurveSet
00022 {
00023 public:
00024 
00036     ProjectCurveAndCrossTan(const SplineCurve& space_crv, 
00037                             const SplineCurve& crosstan_crv,
00038                             const SplineSurface& surf,
00039                             const Point* start_par_pt, 
00040                             const Point* end_par_pt,
00041                             double epsgeo,
00042                             const RectDomain* domain_of_interest = NULL);
00043 
00045     virtual ~ProjectCurveAndCrossTan();
00046 
00050     virtual std::vector<Go::Point> eval(double t);
00051 
00057     virtual void eval(double t, int n, std::vector<std::vector<Go::Point> >& ders);
00058 
00061     virtual double start();
00062 
00065     virtual double end();
00066 
00069     // @@sbr Hmm, this seems strange, the curves not living in the same dimension ...
00070     //       Suppose this means the parameter curve is the most important one.
00071     virtual int dim();
00072 
00080     virtual bool approximationOK(double par, const std::vector<Go::Point>& approxpos,
00081                                  double tol1, double tol2);
00082 
00085     virtual int nmbCvs();
00086 
00087 private:
00088     const SplineCurve& space_crv_;
00089     const SplineCurve& crosstan_crv_;
00090     const SplineSurface& surf_;
00091     const Point* start_par_pt_; // When projecting end pts may be of special interest.
00092     const Point* end_par_pt_;
00093     const double epsgeo_;
00094     const Go::RectDomain* domain_of_interest_;
00095 
00099     std::vector<double> createSeed(double tpar);
00100 
00101 };
00102 
00103 } // namespace Go
00104 
00105 
00106 #endif //_PROJECTCURVEANDTAN_
Generated on Tue Sep 21 15:44:16 2010 for GoTools Core by  doxygen 1.6.3