SplineCurveInt.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 _SPLINECURVEINT_H
00034 #define _SPLINECURVEINT_H
00035 
00036 
00037 #include "ParamCurveInt.h"
00038 
00039 
00040 namespace Go {
00043 
00044 
00045 
00046 class SplineCurve;
00047 
00048 
00050 
00051 class SplineCurveInt : public ParamCurveInt {
00052 public:
00056     explicit SplineCurveInt(boost::shared_ptr<ParamCurve> curve);
00057 
00063     explicit SplineCurveInt(boost::shared_ptr<ParamCurve> curve, 
00064                             ParamGeomInt *parent);
00065 
00067     virtual ~SplineCurveInt(){};
00068 
00073     virtual boost::shared_ptr<ParamCurveInt> 
00074     makeIntObject(boost::shared_ptr<ParamCurve> curve);
00075 
00080     virtual bool hasInnerKnots(int pardir) const;
00081 
00086     virtual bool hasCriticalValsOrKnots(int pardir) const;
00087 
00092     virtual std::vector<double> getInnerKnotVals(int pardir,
00093                                                  bool sort=false) const;
00094 
00099     virtual std::vector<double> getCriticalValsAndKnots(int pardir) const;
00100 
00105     virtual int getMeshSize(int dir);
00106 
00112     virtual double paramFromMesh(int dir, int idx);
00113 
00115     virtual std::vector<double>::iterator getMesh();
00116 
00128     virtual int checkPeriodicity(int pardir = 0) const;
00129 
00135     virtual int knotIntervalFuzzy(double& t, double tol) const;
00136 
00144     virtual double nextSegmentVal(double par, bool forward, double tol) const;
00145 
00148     virtual bool isSpline();
00149 
00150     virtual const SplineCurve* getSpline()
00151         { return spcv_.get(); }
00152 
00160     virtual double getOptimizedConeAngle(Point& axis1, Point& axis2);
00161 
00162     // Functions used for coincidence testint
00163 
00170     virtual RotatedBox getRotatedBox(std::vector<Point>& axis) const;
00171 
00172 protected:
00173     // Data members
00174     boost::shared_ptr<SplineCurve> spcv_; // shared_ptr to this curve
00175     
00176 };
00177 
00178 
00180 } // namespace Go
00181 
00182 
00183 #endif // _SPLINECURVEINT_H
00184 

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