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 _IMPLICITIZECURVEANDVECTORALGO_H
00034 #define _IMPLICITIZECURVEANDVECTORALGO_H
00035
00036
00037 #include "BernsteinTetrahedralPoly.h"
00038 #include "SplineCurve.h"
00039 #include "Point.h"
00040 #include "BaryCoordSystem.h"
00041
00042
00043 namespace Go {
00046
00047
00048
00071 class ImplicitizeCurveAndVectorAlgo {
00072 public:
00074 ImplicitizeCurveAndVectorAlgo() : tol_(3.0e-15) { }
00077 explicit ImplicitizeCurveAndVectorAlgo(int deg)
00078 : deg_(deg), tol_(3.0e-15) { }
00083 ImplicitizeCurveAndVectorAlgo(const SplineCurve& crv,
00084 const Point& pt, int deg)
00085 : crv_(crv), pt_(pt), deg_(deg), tol_(3.0e-15) { }
00086
00089 void useSplineCurve(const SplineCurve& crv)
00090 { crv_ = crv; }
00091
00094 void useVector(const Point& pt)
00095 { pt_ = pt; }
00096
00099 void setDegree(int deg)
00100 { deg_ = deg; }
00101
00104 void setTolerance(double tol)
00105 { tol_ = tol; }
00106
00109 int perform();
00110
00116 void getResultData(BernsteinTetrahedralPoly& implicit,
00117 BaryCoordSystem3D& bc, double& sigma_min)
00118 {
00119 implicit = implicit_;
00120 bc = bc_;
00121 sigma_min = sigma_min_;
00122 }
00123
00124 private:
00125 SplineCurve crv_;
00126 Point pt_;
00127 BernsteinTetrahedralPoly implicit_;
00128 BaryCoordSystem3D bc_;
00129 int deg_;
00130 double tol_;
00131 double sigma_min_;
00132
00133 };
00134
00135
00137 }
00138
00139
00140 #endif // _IMPLICITIZECURVEANDVECTORALGO_H
00141
00142