closestPtSurfSurfPlane.h

Go to the documentation of this file.
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 _CLOSESTPTSURFSURFPLANE_H
00034 #define _CLOSESTPTSURFSURFPLANE_H
00035 
00043 #include "ParamSurface.h"
00044 
00045 namespace Go {
00048 
00055     enum AlgorithmChoice {GEOMETRICAL, FUNCTIONAL};
00056 
00084 void closestPtSurfSurfPlane(const std::vector<Point>& epoint,
00085                             const std::vector<Point>& epnt1,
00086                             const std::vector<Point>& epnt2,
00087                             const Point& epar1,
00088                             const Point& epar2,
00089                             const ParamSurface* psurf1,
00090                             const ParamSurface* psurf2,
00091                             double aepsge,
00092                             std::vector<Point>& gpnt1,
00093                             std::vector<Point>& gpnt2,
00094                             Point& gpar1, 
00095                             Point& gpar2, 
00096                             int& jstat,
00097                             AlgorithmChoice algo = FUNCTIONAL);
00098 
00099 
00105 void closestPtSurfSurfPlaneGeometrical(const std::vector<Point>& epoint,
00106                                        const std::vector<Point>& epnt1,
00107                                        const std::vector<Point>& epnt2,
00108                                        const Point& epar1,
00109                                        const Point& epar2,
00110                                        const ParamSurface* psurf1,
00111                                        const ParamSurface* psurf2,
00112                                        double aepsge,
00113                                        std::vector<Point>& gpnt1,
00114                                        std::vector<Point>& gpnt2,
00115                                        Point& gpar1, Point& gpar2, int& jstat);
00116 
00122 void 
00123 closestPtSurfSurfPlaneFunctional(const std::vector<Point>& epoint, //plane description
00124                                  const std::vector<Point>& epnt1, // start pt. in surf. 1
00125                                  const std::vector<Point>& epnt2, // start pt. in surf. 2
00126                                  const Point& epar1, // parameter start pt. in surf. 1
00127                                  const Point& epar2, // parameter start pt. in surf. 2
00128                                  const ParamSurface* psurf1, // ptr. to surf. 1
00129                                  const ParamSurface* psurf2, // ptr. to surf. 2
00130                                  double aepsge, // absolute tolerance
00131                                  std::vector<Point>& gpnt1, // result of iter. in surf. 1
00132                                  std::vector<Point>& gpnt2, // result of iter. in surf. 2
00133                                  Point& gpar1, Point& gpar2, int& jstat); // results of param.
00134 
00135 
00136 // Anonymous namespace
00138 namespace {
00141 
00155 void nextStep(const std::vector<Point>& fpnt,const std::vector<Point>& gpnt,
00156               const Point& snorm, const Point& spoint,
00157               Point& delta, int& kstat);
00158 
00160 } // Anonymous namespace
00163 
00164 
00166 } // namespace Go  
00167 
00168 #endif //  _CLOSESTPTSURFSURFPLANE_H
00169 

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