//=========================================================================== // 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. //=========================================================================== 00015 #ifndef _CLOSESTPTSURFSURFPLANE_H 00016 #define _CLOSESTPTSURFSURFPLANE_H 00017 00025 #include "GoTools/geometry/ParamSurface.h" 00026 00027 namespace Go { 00034 enum AlgorithmChoice {GEOMETRICAL, FUNCTIONAL}; 00035 00063 void closestPtSurfSurfPlane(const std::vector<Point>& epoint, 00064 const std::vector<Point>& epnt1, 00065 const std::vector<Point>& epnt2, 00066 const Point& epar1, 00067 const Point& epar2, 00068 const ParamSurface* psurf1, 00069 const ParamSurface* psurf2, 00070 double aepsge, 00071 std::vector<Point>& gpnt1, 00072 std::vector<Point>& gpnt2, 00073 Point& gpar1, 00074 Point& gpar2, 00075 int& jstat, 00076 AlgorithmChoice algo = FUNCTIONAL); 00077 00078 00084 void closestPtSurfSurfPlaneGeometrical(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, Point& gpar2, int& jstat); 00095 00101 void 00102 closestPtSurfSurfPlaneFunctional(const std::vector<Point>& epoint, //plane description 00103 const std::vector<Point>& epnt1, // start pt. in surf. 1 00104 const std::vector<Point>& epnt2, // start pt. in surf. 2 00105 const Point& epar1, // parameter start pt. in surf. 1 00106 const Point& epar2, // parameter start pt. in surf. 2 00107 const ParamSurface* psurf1, // ptr. to surf. 1 00108 const ParamSurface* psurf2, // ptr. to surf. 2 00109 double aepsge, // absolute tolerance 00110 std::vector<Point>& gpnt1, // result of iter. in surf. 1 00111 std::vector<Point>& gpnt2, // result of iter. in surf. 2 00112 Point& gpar1, Point& gpar2, int& jstat); // results of param. 00113 00114 00115 // Anonymous namespace 00116 namespace { 00130 void nextStep(const std::vector<Point>& fpnt,const std::vector<Point>& gpnt, 00131 const Point& snorm, const Point& spoint, 00132 Point& delta, int& kstat); 00133 00134 } // Anonymous namespace 00135 00136 } // namespace Go 00137 00138 #endif // _CLOSESTPTSURFSURFPLANE_H