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 _GOBLENDINGCURVE_
00034 #define _GOBLENDINGCURVE_
00035
00036 #include "EvalCurve.h"
00037 #include "SplineCurve.h"
00038 #include <vector>
00039 #include <boost/smart_ptr.hpp>
00040
00041
00042 namespace Go
00043 {
00046
00047
00052
00053 class CrossTangentOffset : public EvalCurve
00054 {
00055 public:
00056
00070 CrossTangentOffset(boost::shared_ptr<SplineCurve>& poscurve,
00071 boost::shared_ptr<SplineCurve>& tangcv1,
00072 boost::shared_ptr<SplineCurve>& tangcv2,
00073 boost::shared_ptr<SplineCurve>& blend1,
00074 boost::shared_ptr<SplineCurve>& blend2);
00075
00076
00078 virtual ~CrossTangentOffset();
00079
00080
00081 virtual Point eval( double t) const ;
00082
00083
00084 virtual void eval( double t, int n, Point der[]) const ;
00085
00086
00087 virtual double start() const ;
00088
00089
00090 virtual double end() const ;
00091
00092
00093 virtual int dim() const ;
00094
00111 virtual bool approximationOK(double par, Point approxpos,
00112 double tol1, double tol2) const ;
00113
00114 private:
00115 const boost::shared_ptr<SplineCurve> poscurve_;
00116 std::vector<boost::shared_ptr<SplineCurve> > tangcurves_;
00117 std::vector<boost::shared_ptr<SplineCurve> > blends_;
00118 boost::shared_ptr<SplineCurve> length_;
00119
00120 void evalcrtan(double t, int n, Point der[]) const ;
00121 Point evalcrtan(double t) const ;
00122 };
00123
00125 }
00126 #endif
00127