X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FTuto_Image%2Fsrc%2Fcpp%2Fcore%2F03_Event%2Fimage%2FEventImage.h;fp=WCudaMSE%2FTuto_Image%2Fsrc%2Fcpp%2Fcore%2F03_Event%2Fimage%2FEventImage.h;h=6b51c89d002a7a8662a8ce1edc1eb38cbff2d324;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/Tuto_Image/src/cpp/core/03_Event/image/EventImage.h b/WCudaMSE/Tuto_Image/src/cpp/core/03_Event/image/EventImage.h new file mode 100755 index 0000000..6b51c89 --- /dev/null +++ b/WCudaMSE/Tuto_Image/src/cpp/core/03_Event/image/EventImage.h @@ -0,0 +1,77 @@ +#ifndef EVENT_IMAGE_H_ +#define EVENT_IMAGE_H_ + +#include "ImageMOOs_A.h" +#include "MathTools.h" +#include "SimpleKeyListener.h" +#include "SimpleMouseListener.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class EventImage: public ImageMOOs_A + { + + /*--------------------------------------*\ + |* Constructeur *| + \*-------------------------------------*/ + + public: + + EventImage(unsigned int w, unsigned int h); + virtual ~EventImage(void); + + /*--------------------------------------*\ + |* Methode *| + \*-------------------------------------*/ + + protected: + + /*--------------------------------------*\ + |* Override *| + \*-------------------------------------*/ + + /** + * Override, call periodicly by the api + */ + virtual void fillImageGL(uchar4* ptrTabPixels, int w, int h); + + /** + * Override, call periodicly by the api + */ + virtual void animationStep(bool& isNeedUpdateView); + + /** + * Override, call by the api at each "draw" + */ + virtual void paintPrimitives(Graphic2Ds& graphic2D); + + private: + + void control(void); + + /*--------------------------------------*\ + |* Attribut *| + \*-------------------------------------*/ + + private: + + // Inputs + double dt; + + // Tools + double t; + SimpleKeyListener* ptrKeyListener; + SimpleMouseListener* ptrMouseListener; + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + /*----------------------------------------------------------------------*/