ParamSurface.h

00001 //===========================================================================
00002 // GoTools - SINTEF Geometry Tools version 1.1
00003 //
00004 // GoTools module: CORE
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 _GOPARAMSURFACE_H
00034 #define _GOPARAMSURFACE_H
00035 
00036 #include "Domain.h"
00037 #include "GeomObject.h"
00038 #include "RectDomain.h"
00039 #include "CurveLoop.h"
00040 #include <vector>
00041 
00042 
00043 namespace Go
00044 {
00047 
00048 
00049 class CurveLoop; // forward declaration
00050 
00054 class ParamSurface : public GeomObject
00055 {
00056 public:
00058     virtual ~ParamSurface();
00059 
00063     virtual ParamSurface* clone() const = 0;
00069     virtual const Domain& parameterDomain() const = 0;
00070 
00076     virtual RectDomain containingDomain() const = 0;
00077 
00078 
00084     virtual CurveLoop outerBoundaryLoop(double degenerate_epsilon
00085                                           = DEFAULT_SPACE_EPSILON) const = 0;
00086 
00095     virtual std::vector<CurveLoop> allBoundaryLoops(double degenerate_epsilon
00096                                                       = DEFAULT_SPACE_EPSILON) const = 0;
00097 
00101     virtual DirectionCone normalCone() const = 0;
00102     
00110     virtual DirectionCone tangentCone(bool pardir_is_u) const = 0;
00111 
00119     virtual CompositeBox compositeBox() const;
00120    
00125     virtual void point(Point& pt, double upar, double vpar) const = 0;
00126 
00150     virtual void point(std::vector<Point>& pts, 
00151                        double upar, double vpar,
00152                        int derivs,
00153                        bool u_from_right = true,
00154                        bool v_from_right = true,
00155                        double resolution = 1.0e-12) const = 0;
00156 
00165     Point point(double upar, double vpar) const;
00166 
00182     std::vector<Point> point(double upar, double vpar,
00183                                int derivs) const;
00184 
00189     virtual void normal(Point& n, double upar, double vpar) const = 0;
00190 
00201     virtual std::vector<boost::shared_ptr<ParamCurve> >
00202     constParamCurves(double parameter, bool pardir_is_u) const = 0;
00203 
00217     virtual std::vector<boost::shared_ptr<ParamSurface> >
00218     subSurfaces(double from_upar, double from_vpar,
00219                 double to_upar, double to_vpar,
00220                 double fuzzy = DEFAULT_PARAMETER_EPSILON) const = 0;
00221 
00240     virtual double nextSegmentVal(int dir, double par, bool forward, double tol) const = 0;
00241 
00254     virtual void closestPoint(const Point& pt,
00255                               double&        clo_u,
00256                               double&        clo_v, 
00257                               Point&       clo_pt,
00258                               double&        clo_dist,
00259                               double         epsilon,
00260                               const RectDomain* domain_of_interest = NULL,
00261                               double   *seed = 0) const = 0;
00262 
00263     void singularity(double& sing_u,
00264                      double& sing_v, 
00265                      Point& sing_pt,
00266                      double& sing_dist,
00267                      double epsilon,
00268                      const RectDomain* rd = NULL,
00269                      double *seed = 0) const;
00270 
00273     virtual void closestBoundaryPoint(const Point& pt,
00274                                       double&        clo_u,
00275                                       double&        clo_v, 
00276                                       Point&       clo_pt,
00277                                       double&        clo_dist,
00278                                       double epsilon,
00279                                       const RectDomain* rd = NULL,
00280                                       double *seed = 0) const = 0;
00281 
00303     virtual void getBoundaryInfo(Point& pt1, Point& pt2,
00304                                  double epsilon, SplineCurve*& cv,
00305                                  SplineCurve*& crosscv, double knot_tol = 1e-05) const = 0;
00306 
00308     virtual void turnOrientation() = 0;
00309 
00313     virtual void reverseParameterDirection(bool direction_is_u) = 0;
00314 
00316     virtual void swapParameterDirection() = 0;
00317 
00320 
00332     virtual bool isDegenerate(bool& b, bool& r,
00333                               bool& t, bool& l, double tolerance) const = 0;
00334 };
00335 
00336 
00338 } // namespace Go
00339 
00340 
00341 #endif // _GOPARAMSURFACE_H
00342 
00343 

Generated on Mon Jun 11 14:48:18 2007 for GoTools Core Library by  doxygen 1.5.1