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 _PAR2FUNCINTERSECTOR_H
00034 #define _PAR2FUNCINTERSECTOR_H
00035
00036
00037 #include "IntersectorFuncConst.h"
00038 #include "IntersectionPoint.h"
00039
00040
00041 namespace Go {
00044
00045
00046
00049
00050 class Par2FuncIntersector : public IntersectorFuncConst {
00051 public:
00052
00053
00054
00055
00056
00057
00073 Par2FuncIntersector(boost::shared_ptr<ParamFunctionInt> func,
00074 boost::shared_ptr<ParamFunctionInt> C,
00075 boost::shared_ptr<GeoTol> epsge,
00076 Intersector *prev = 0,
00077 int eliminated_parameter = -1,
00078 double eliminated_value = 0);
00079
00081 virtual ~Par2FuncIntersector();
00082
00083
00084
00085
00088 virtual int numParams() const
00089 { return 2; }
00090
00091 protected:
00092
00093
00094 virtual boost::shared_ptr<Intersector>
00095 lowerOrderIntersector(boost::shared_ptr<ParamFunctionInt> obj1,
00096 boost::shared_ptr<ParamFunctionInt> obj2,
00097 Intersector* prev = 0,
00098 int eliminated_parameter = -1,
00099 double eliminated_value = 0);
00100
00101 virtual int checkCoincidence();
00102
00103 virtual void microCase();
00104
00105 virtual int updateIntersections();
00106
00107 virtual int repairIntersections()
00108 { return 0; }
00109
00110 bool
00111 isConnected(std::vector<boost::shared_ptr<IntersectionPoint> > bd_ints,
00112 int nmbbd);
00113
00114 bool isConnected(std::vector<std::
00115 pair<boost::shared_ptr<IntersectionPoint>,
00116 IntPtClassification> >& bd_ints,
00117 int nmb_nottouch);
00118
00119 bool connectDirected(std::vector<std::
00120 pair<boost::shared_ptr<IntersectionPoint>,
00121 IntPtClassification> >& bd_ints,
00122 int nmbbd);
00123
00124 bool canConnect(boost::shared_ptr<IntersectionPoint> pt1,
00125 boost::shared_ptr<IntersectionPoint> pt2);
00126
00127 virtual int doSubdivide();
00128
00129 private:
00130
00131 int getSubdivisionParameter(int dir, double& par);
00132
00133
00134 int sortParameterDirections(int perm[]);
00135
00136 int checkSubdivParam(int dir, double par, double ta, double tb,
00137 std::vector<boost::
00138 shared_ptr<IntersectionPoint> >& int_pts);
00139
00140 int checkIsoCurve(int pdir, bool first, double par,
00141 std::vector<boost::
00142 shared_ptr<IntersectionPoint> > int_pts);
00143
00144 bool getSubdivAtSing(int dir, double ta, double tb, double& par);
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 void writeDebugConnect(std::vector<std::
00159 pair<boost::shared_ptr<IntersectionPoint>,
00160 IntPtClassification> >& bd_ints);
00161
00162 };
00163
00164
00166 }
00167
00168
00169 #endif // _PAR2FUNCINTERSECTOR_H
00170
00171