SplineSurfaceInt.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 _SPLINESURFACEINT_H
00034 #define _SPLINESURFACEINT_H
00035 
00036 
00037 #include "ParamSurfaceInt.h"
00038 
00039 
00040 namespace Go {
00043 
00044 
00045 
00046 class SplineSurface;
00047 class AlgObj3DInt;
00048 
00049 
00052 
00053 class SplineSurfaceInt : public ParamSurfaceInt {
00054 public:
00056 
00059     explicit SplineSurfaceInt(boost::shared_ptr<ParamSurface> surf);
00060 
00065     explicit SplineSurfaceInt(boost::shared_ptr<ParamSurface> surf,
00066                               ParamGeomInt *parent);
00067 
00069     virtual ~SplineSurfaceInt(){};
00070 
00075     virtual boost::shared_ptr<ParamSurfaceInt> 
00076     makeIntObject(boost::shared_ptr<ParamSurface> surf);
00077 
00083     virtual boost::shared_ptr<ParamCurveInt> 
00084     makeIntCurve(boost::shared_ptr<ParamCurve> crv, ParamGeomInt* parent);
00085 
00090     virtual bool hasInnerKnots(int pardir) const;
00091 
00096     virtual bool hasCriticalValsOrKnots(int pardir) const;
00097 
00102     virtual std::vector<double> getInnerKnotVals(int pardir,
00103                                                  bool sort=false) const;
00104 
00109     virtual std::vector<double> getCriticalValsAndKnots(int pardir) const;
00110 
00115     virtual int getMeshSize(int dir);
00116 
00122     virtual double paramFromMesh(int dir, int idx);
00123 
00125     virtual std::vector<double>::iterator getMesh();
00126 
00129     virtual DirectionCone directionCone() const;    
00130 
00132     virtual DirectionCone reducedDirectionCone(bool reduce_at_bd[4],
00133                                                double epsge) const;
00134 
00137     virtual void 
00138     getBoundaryObjects(std::vector<boost::
00139                        shared_ptr<BoundaryGeomInt> >& bd_objs);
00140 
00152     virtual int checkPeriodicity(int pardir) const;
00153 
00158     virtual bool isSimple();
00159 
00162     virtual bool isSpline();
00163 
00166     virtual bool isIsoParametric(ParamCurveInt *curve, int dir, double par,
00167                                  double ptol, double tol);
00168 
00176     virtual double getOptimizedConeAngle(Point& axis1, Point& axis2);
00177 
00186     virtual void knotIntervalFuzzy(double& u, double&v,
00187                                    double utol, double vtol) const; 
00188 
00198     virtual double nextSegmentVal(int dir, double par,
00199                                   bool forward, double tol) const;
00200 
00207     virtual RotatedBox getRotatedBox(std::vector<Point>& axis) const;
00208 
00213     virtual void splitAtG0(double angtol,
00214                            std::vector<boost::
00215                            shared_ptr<ParamSurfaceInt> >& subG1);
00216 
00220     virtual boost::shared_ptr<ParamSurfaceInt> getNormalSurface() const;
00221 
00225     virtual bool canImplicitize();
00226 
00230     virtual bool implicitize(double tol);
00231 
00241     // @@sbr Todo (tol2)!!!
00242     virtual bool getImplicit(double tol, double& tol2,
00243                              AlgObj3DInt& alg_obj_3d_int);
00244 
00250     SplineCurve* constParamCurve(double parameter,
00251                                  bool pardir_is_u) const;
00252 
00255     boost::shared_ptr<SplineSurface> getSplineSurface()
00256     { return spsf_; }
00257 
00260     virtual boost::shared_ptr<const SplineSurface> splineSurface() const
00261     { return spsf_; }
00262 
00264     void setImplicitDeg();
00265 
00266 protected:
00267     // Data members
00268     boost::shared_ptr<SplineSurface> spsf_;   // boost::shared_ptr to
00269                                               // this surface
00270     mutable boost::shared_ptr<SplineSurface> normalsf_;  // Normal
00271                                                          // surface
00272                                                          // corresponding
00273                                                          // to this
00274                                                          // spline
00275                                                          // surface
00276 
00277 private:
00278 
00279 };
00280 
00281 
00283 } // namespace Go
00284 
00285 
00286 #endif // _SPLINESURFACEINT_H
00287 

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