shape_doc 0.1
|
00001 /***************************************************************************** 00002 * M a t h e m a g i x 00003 ***************************************************************************** 00004 * BsplineSurface 00005 * 2008-03-28 00006 * Julien Wintz 00007 ***************************************************************************** 00008 * Copyright (C) 2006 INRIA Sophia-Antipolis 00009 ***************************************************************************** 00010 * Comments : 00011 ****************************************************************************/ 00012 00013 # ifndef shape_surface_bspline_hpp 00014 # define shape_surface_bspline_hpp 00015 00016 # include <shape/point.hpp> 00017 # include <shape/surface_parametric.hpp> 00018 00019 //# include <sisl/sisl.hpp> 00020 00021 namespace mmx { 00022 namespace shape { 00023 00024 TMPL class surface_bspline : public surface_parametric<K> //, public SISLSurf 00025 { 00026 public: 00027 typedef point<K> Point; 00028 typedef bounding_box<K> BoundingBox; 00029 00030 surface_bspline(void) ; 00031 surface_bspline(const BoundingBox & box) ; 00032 ~surface_bspline(void) ; 00033 00034 int ik1; /* Order of surface in first parameter 00035 direction. */ 00036 int ik2; /* Order of surface in second parameter 00037 direction. */ 00038 int in1; /* Number of vertices in first parameter 00039 direction. */ 00040 int in2; /* Number of vertices in second parameter 00041 direction. */ 00042 double *et1; /* pointer to knotvector in first parameter 00043 direction. */ 00044 double *et2; /* pointer to knotvector in second parameter 00045 direction. */ 00046 double *ecoef; /* pointer to array of vertices of surface. */ 00047 double *rcoef; /* pointer to the array of scaled vertices 00048 if surface is rational. */ 00049 int idim; /* Dimension of the space in which the surface 00050 lies. */ 00051 00052 Point eval(double u, double v) ; 00053 void eval(double u, double v, double * x, double * y) ; 00054 void eval(double u, double v, double * x, double * y, double * z) ; 00055 00056 inline double umin(void) { return knotsU()[orderU()] ; } 00057 inline double umax(void) { return knotsU()[numberU()-orderU()] ; } 00058 inline double vmin(void) { return knotsV()[orderV()] ; } 00059 inline double vmax(void) { return knotsV()[numberV()-orderV()] ; } 00060 00061 inline int orderU(void) { return ik1 ; } 00062 inline int orderV(void) { return ik2 ; } 00063 inline int numberU(void) { return in1 ; } 00064 inline int numberV(void) { return in2 ; } 00065 inline int dimension(void) { return idim ; } 00066 00067 inline double * knotsU(void) { return et1 ; } 00068 inline double * knotsV(void) { return et2 ; } 00069 inline double * vertices(void) { return ecoef ; } 00070 00071 Seq<Point *> criticalpoints(void) ; 00072 Seq<Point *> extremalpoints(void) ; 00073 Seq<Point *> singularpoints(void) ; 00074 00075 Point operator() (double u, double v) ; 00076 } ; 00077 00078 } ; // namespace shape 00079 } ; // namespace mmx 00080 //==================================================================== 00081 # undef TMPL 00082 # endif // shape_surface_bspline_hpp