X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Image_GL_Cuda%2FINC%2Fgpu%2FImageFonctionelMOOs_A_GPU.h;fp=WCudaMSE%2FAPI_Bilat_Image_GL_Cuda%2FINC%2Fgpu%2FImageFonctionelMOOs_A_GPU.h;h=07c842f924dbf5ce7afa009b218489d487afbeea;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/ImageFonctionelMOOs_A_GPU.h b/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/ImageFonctionelMOOs_A_GPU.h new file mode 100755 index 0000000..07c842f --- /dev/null +++ b/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/ImageFonctionelMOOs_A_GPU.h @@ -0,0 +1,131 @@ +#ifndef IMAGE_FONCTIONEL_MOOS_A_GPU_H +#define IMAGE_FONCTIONEL_MOOS_A_GPU_H + +#include "ImageMOOs_A_GPU.h" +#include "DomaineMath_GPU.h" + +#include +using std::stack; + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +namespace gpu + { + + class CBI_GLIMAGE_CUDA ImageFonctionelMOOs_A: public ImageMOOs_A + { + + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + public: + + ImageFonctionelMOOs_A(unsigned int w, unsigned int h, gpu::DomaineMath domaineMath); + + virtual ~ImageFonctionelMOOs_A(); + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + public: + /** + * fillImageGL avec le domaine courant + * w et h fixe, ne change pas au cours du temps ! + */ + virtual void fillImageGL(uchar4* ptrDevImageGL, int w, int h, const gpu::DomaineMath& domaineNew)=0; //ptrDevImageGL zone memoire commune OpenGL et Cuda + + /** + * Call each time the domaine change + * 1) Domaines : new domaine of the image + */ + virtual void onDomaineChangePerformed(const gpu::DomaineMath& domaineNew); + + /** + * Override + */ + virtual void paintPrimitivesAPI(Graphic2Ds& ptrGraphic2D); + + /** + * Last Domaine push in History + */ + void restoreFromDomaineHistory(); + + /** + * First Domaine of History + */ + void headOfDomaineHistory(); + + /** + * Override + */ + virtual void print(ostream& stream) const; + + private: + + /** + * Override + * call fillImageGL with current domaine + */ + virtual void fillImageGL(uchar4* ptrDevImageGL, int w, int h); + + /*--------------------------------------*\ + |* Get *| + \*-------------------------------------*/ + + public: + + /** + * Domaine currently used + */ + gpu::DomaineMath getCurrentDomaine() const; + + /*--------------------------------------*\ + |* Set *| + \*-------------------------------------*/ + + public: + + void setCurrentDomaine(gpu::DomaineMath domaineNew); + + void setEnableDomaineOverlay(bool isEnable); + + /*--------------------------------------*\ + |* Is *| + \*-------------------------------------*/ + + public: + + inline bool isEnableDomaineOverlay() + { + return enableDomaineOverlay; + } + + /*--------------------------------------*\ + |* Attributs *| + \*-------------------------------------*/ + + private: + + //Input + gpu::DomaineMath homeDomaine; + + //Tools + stack stackHistoryDomaine; + bool enableDomaineOverlay; + + }; + } + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/