00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 # ifndef shape_bspline_curve_hpp
00014 # define shape_bspline_curve_hpp
00015
00016 # include <realroot/Seq.hpp>
00017 # include <shape/point.hpp>
00018 # include <shape/parametric_curve.hpp>
00019 # include <shape/sisl.h>
00020
00021 # define TMPL template<class K>
00022 # define BsplineCurve bspline_curve<K>
00023
00024 namespace mmx {
00025 namespace shape {
00026
00027 TMPL
00028 class bspline_curve : public parametric_curve<K>, public SISLCurve
00029 {
00030 public:
00031 typedef bounding_box<K> BoundingBox;
00032 typedef point<K> Point;
00033 typedef parametric_curve<K> ParametricCurve;
00034 bspline_curve(void) ;
00035 bspline_curve(const BoundingBox &) ;
00036 ~bspline_curve(void) ;
00037
00038 Point* eval(double t) ;
00039 Point* operator() (double t) ;
00040 void eval(double t, double * x, double * y) ;
00041 void eval(double t, double * x, double * y, double * z) ;
00042
00043 inline double tmin(void) { return knots()[order()] ; }
00044 inline double tmax(void) { return knots()[number()-order()] ; }
00045
00046 inline int order(void) { return ik ; }
00047 inline int number(void) { return in ; }
00048 inline int dimension(void) { return idim ; }
00049 inline double * knots(void) { return et ; }
00050 inline double * vertices(void) { return ecoef ; }
00051
00052 Seq<Point *> criticalpoints(void) ;
00053 Seq<Point *> extremalpoints(void) ;
00054 Seq<Point *> singularpoints(void) ;
00055
00056 } ;
00057
00058 TMPL BsplineCurve::bspline_curve(void) : ParametricCurve()
00059 {
00060
00061 }
00062
00063 TMPL BsplineCurve::bspline_curve(const BoundingBox & box) : ParametricCurve(box)
00064 {
00065
00066 }
00067
00068 TMPL BsplineCurve::~bspline_curve(void)
00069 {
00070
00071 }
00072
00073 TMPL Point*
00074 BsplineCurve::eval(double t) {
00075 Point* p=0 ;
00076
00077 return p ;
00078 }
00079
00080 TMPL void
00081 BsplineCurve::eval(double t, double * x, double * y) {
00082 }
00083
00084 TMPL void
00085 BsplineCurve::eval(double t, double * x, double * y, double * z) {
00086 }
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109 TMPL Point* BsplineCurve::operator() (double t) {
00110 Point* p=0 ;
00111
00112 return p ;
00113 }
00114
00115 } ;
00116 } ;
00117
00118 # undef TMPL
00119 # undef BsplineCurve
00120 # endif // shape_bspline_curve_hpp