00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 # ifndef algebraic_surface_axl_hpp
00013 # define algebraic_surface_axl_hpp
00014
00015 # include <shape/algebraic_surface.hpp>
00016 # include <shape/bcell3d_algebraic_surface.hpp>
00017 # include <shape/mesher3d.hpp>
00018
00019 # define TMPL template<class C, class V>
00020 # define Viewer viewer<axel,V>
00021 # define AlgebraicSurface algebraic_surface<C,V>
00022 # define Cell3dAlgebraicSurface bcell3d_algebraic_surface<C,V>
00023
00024
00025 namespace mmx {
00026 namespace shape {
00027
00028 template<class C,class V>
00029 struct use<graphic_def,AlgebraicSurface,V> {
00030 typedef mesher3d<double,default_env,Cell3dAlgebraicSurface> Mesher;
00031 typedef typename Mesher::Output Output;
00032 };
00033
00034 template<class C, class V, class BBOX>
00035 typename use<graphic_def,AlgebraicSurface,V>::Output*
00036 as_graphic(const AlgebraicSurface& s, const BBOX& bx,
00037 double e_sm=0.05, double e_pr = 0.025) {
00038
00039
00040 typedef typename use<graphic_def,AlgebraicSurface,V>::Mesher Mesher;
00041
00042 Cell3dAlgebraicSurface* c= new Cell3dAlgebraicSurface(s,bx);
00043
00044 Mesher* msh = new Mesher;
00045 msh->set_smoothness(e_sm);
00046 msh->set_precision(e_pr);
00047 msh->set_input(c);
00048 msh->run();
00049
00050 return msh->get_output();
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 }
00062
00063
00064 }
00065 }
00066
00067 # undef TMPL
00068 # undef AlgebraicSurface
00069 # undef Cell3dAlgebraicSurface
00070 # undef Viewer
00071 #endif //shape_algebraic_curve