00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _CLOSESTPTCURVES2D_H
00034 #define _CLOSESTPTCURVES2D_H
00035
00047 #include "ParamCurve.h"
00048
00049 namespace Go {
00052
00053
00078 void closestPtCurves2D(ParamCurve* cv1, ParamCurve* cv2, double aepsge,
00079 double tmin1, double tmax1, double tmin2, double tmax2,
00080 double seed1, double seed2, int method, bool quick,
00081 double& par1, double& par2, double& dist,
00082 Point& ptc1, Point& ptc2, int& istat);
00083
00084
00085
00087 namespace {
00090
00100 void insideParamDomain2D(Point& gd, const Point& acoef, double astart1,
00101 double aend1, double astart2,double aend2, int& corr);
00102
00103
00121 void nextStep2D(double& dist, Point& diff, Point& delta, double& det,
00122 int& kstat, std::vector<Point>& eval1,
00123 std::vector<Point>& eval2, int method);
00124
00125
00142 void makeEqSys1(double A[], double b[], const std::vector<Point>& eval1,
00143 const std::vector<Point>&eval2, const Point& diff);
00144
00145
00164 void makeEqSys2(double A[], double b[], const std::vector<Point>& eval1,
00165 const std::vector<Point>&eval2, const Point& diff);
00166
00167
00186 void makeEqSys3(double A[], double b[], const std::vector<Point>& eval1,
00187 const std::vector<Point>&eval2, const Point& diff);
00188
00189
00199 int localPretop(double dist,const Point& diff,
00200 const std::vector<Point>& eval1,
00201 const std::vector<Point>& eval2);
00202
00203
00220 void singular(ParamCurve* cv1, ParamCurve* cv2,Point& par_val,double& dist,
00221 int quick,double aepsge,double delta,const Point& diff,
00222 const std::vector<Point>&eval1,const std::vector<Point>&eval2,
00223 double astart1,double astart2,double aend1,double aend2);
00224
00225
00239 void secant2D(ParamCurve *pcurve1,ParamCurve *pcurve2,Point& par_val,
00240 double& dist,int& jstat, double delta,double aepsge,
00241 double astart1,double astart2,double aend1,double aend2);
00242
00243
00256 void setReturnValues(const Point& par_val,ParamCurve* cv1,ParamCurve* cv2,
00257 double aepsge, int& jstat,double& par1,double& par2,
00258 double& dist,Point& ptc1,Point& ptc2);
00259
00260
00278 void newPointEval(ParamCurve *pcurve1,double par1,ParamCurve *pcurve2,
00279 double astart2,double aend2,double aepsge,
00280 double& par2,double& y,double& dist,int& jstat);
00281
00283 }
00286
00287
00289 }
00290
00291 #endif // _CLOSESTPTCURVES2D_H
00292