X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Graph2D%2FINC%2Fmodel%2FDomaine.h;fp=WCudaMSE%2FAPI_Bilat_Graph2D%2FINC%2Fmodel%2FDomaine.h;h=fe7cf331a5a9655592ff677c37bb5dfa7ac72ead;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Graph2D/INC/model/Domaine.h b/WCudaMSE/API_Bilat_Graph2D/INC/model/Domaine.h new file mode 100755 index 0000000..fe7cf33 --- /dev/null +++ b/WCudaMSE/API_Bilat_Graph2D/INC/model/Domaine.h @@ -0,0 +1,68 @@ +#ifndef DOMAINE_H_ +#define DOMAINE_H_ + +#include "Point.h" +#include "Interval.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class CBI_GRAPH Domaine + { + public: + Domaine(double x1, double y1, double x2, double y2); + Domaine(Point p1, Point p2); + Domaine(Interval intervalX, Interval intervalY); + + void setIntervalX(Interval interval); + void setIntervalY(Interval interval); + + inline Interval getIntervalX() const + { + return intervalX; + } + + inline Interval getIntervalY() const + { + return intervalY; + } + + inline double getX1() const + { + return intervalX.getMin(); + } + + inline double getX2() const + { + return intervalX.getMax(); + } + + inline double getY1() const + { + return intervalY.getMin(); + } + + inline double getY2() const + { + return intervalY.getMax(); + } + + Point gravity() const; + + Domaine combine(Domaine domaine) const; + + private: + Interval intervalX; + Interval intervalY; + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/