00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 # ifndef shape_cell_hpp
00013 # define shape_cell_hpp
00014
00015 # include <shape/vertex.hpp>
00016 # include <shape/edge.hpp>
00017 # include <shape/bounding_box.hpp>
00018 # include <realroot/Seq.hpp>
00019 # include <shape/graph.hpp>
00020
00021 # define TMPL template<class C, class V>
00022 # define TMPL1 template<class K>
00023 # define SELF cell<C,V>
00024
00025 namespace mmx { namespace shape {
00026
00027
00028
00029
00030 TMPL class topology;
00031 TMPL class cell;
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 struct cell_def {};
00046 template<> struct use<cell_def>
00047 : public use<bounding_box_def>
00048 {
00049 typedef cell<double,default_env> Cell;
00050 typedef topology<double,default_env> Topology;
00051 };
00052
00053 template<class C, class V=default_env>
00054 class cell: public bounding_box<C,V>
00055 {
00056 public:
00057 typedef typename use<point_def,C,V>::Point Point;
00058 typedef bounding_box<C,V> BoundingBox;
00059
00060
00061
00062
00063 cell(void) {} ;
00064 cell(double xmin, double xmax): BoundingBox(xmin,xmax) {};
00065 cell(double xmin, double xmax, double ymin, double ymax): BoundingBox(xmin,xmax,ymin,ymax) {} ;
00066 cell(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax): BoundingBox(xmin,xmax,ymin,ymax,zmin,zmax) {} ;
00067 cell(const BoundingBox& bx): BoundingBox(bx) {} ;
00068
00069 virtual ~cell(void) {} ;
00070
00071 BoundingBox boundingBox() const { return (BoundingBox)*this; }
00072
00073 virtual bool is_regular(void) = 0 ;
00074 virtual bool is_active (void) = 0 ;
00075
00076 };
00077
00078
00079 } ;
00080 } ;
00081
00082 # undef TMPL
00083 # undef TMPL1
00084 # undef SELF
00085 # endif // shape_cell_hpp