1 #ifndef IMAGE_FONCTIONEL_MOOS_A_GPU_H
2 #define IMAGE_FONCTIONEL_MOOS_A_GPU_H
4 #include "ImageMOOs_A_GPU.h"
5 #include "DomaineMath_GPU.h"
10 /*----------------------------------------------------------------------*\
12 \*---------------------------------------------------------------------*/
14 /*--------------------------------------*\
16 \*-------------------------------------*/
21 class CBI_GLIMAGE_CUDA ImageFonctionelMOOs_A
: public ImageMOOs_A
24 /*--------------------------------------*\
26 \*-------------------------------------*/
30 ImageFonctionelMOOs_A(unsigned int w
, unsigned int h
, gpu::DomaineMath domaineMath
);
32 virtual ~ImageFonctionelMOOs_A();
34 /*--------------------------------------*\
36 \*-------------------------------------*/
40 * fillImageGL avec le domaine courant
41 * w et h fixe, ne change pas au cours du temps !
43 virtual void fillImageGL(uchar4
* ptrDevImageGL
, int w
, int h
, const gpu::DomaineMath
& domaineNew
)=0; //ptrDevImageGL zone memoire commune OpenGL et Cuda
46 * Call each time the domaine change
47 * 1) Domaines : new domaine of the image
49 virtual void onDomaineChangePerformed(const gpu::DomaineMath
& domaineNew
);
54 virtual void paintPrimitivesAPI(Graphic2Ds
& ptrGraphic2D
);
57 * Last Domaine push in History
59 void restoreFromDomaineHistory();
62 * First Domaine of History
64 void headOfDomaineHistory();
69 virtual void print(ostream
& stream
) const;
75 * call fillImageGL with current domaine
77 virtual void fillImageGL(uchar4
* ptrDevImageGL
, int w
, int h
);
79 /*--------------------------------------*\
81 \*-------------------------------------*/
86 * Domaine currently used
88 gpu::DomaineMath
getCurrentDomaine() const;
90 /*--------------------------------------*\
92 \*-------------------------------------*/
96 void setCurrentDomaine(gpu::DomaineMath domaineNew
);
98 void setEnableDomaineOverlay(bool isEnable
);
100 /*--------------------------------------*\
102 \*-------------------------------------*/
106 inline bool isEnableDomaineOverlay()
108 return enableDomaineOverlay
;
111 /*--------------------------------------*\
113 \*-------------------------------------*/
118 gpu::DomaineMath homeDomaine
;
121 stack
<gpu::DomaineMath
> stackHistoryDomaine
;
122 bool enableDomaineOverlay
;
129 /*----------------------------------------------------------------------*\
131 \*---------------------------------------------------------------------*/