X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F00_Rippling_warmup%2F03_math%2FRippling0Math.h;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F00_Rippling_warmup%2F03_math%2FRippling0Math.h;h=67b4387370c92541712383b0c5ce1b3fc008abe2;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/00_Rippling_warmup/03_math/Rippling0Math.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/00_Rippling_warmup/03_math/Rippling0Math.h new file mode 100755 index 0000000..67b4387 --- /dev/null +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/00_Rippling_warmup/03_math/Rippling0Math.h @@ -0,0 +1,79 @@ +#ifndef RIPPLING_0_MATH_H_ +#define RIPPLING_0_MATH_H_ + +#include +#include "MathTools.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class Rippling0Math + { + + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + public: + + __device__ + Rippling0Math(int w, int h) + { + // TODO + } + + __device__ + Rippling0Math(const Rippling0Math& source) + { + // TODO + } + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + public: + + /** + * x=pixelI + * y=pixelJ + */ + __device__ + void color(int i, int j, float t, uchar4* ptrColor) + { + // Debug (a mettre en commentaire) + { + unsigned char levelGris = 128; //in [0.255] (debug image) + ptrColor->x = levelGris; + ptrColor->y = levelGris; + ptrColor->z = levelGris; + } + + // Vrai problem + { + // TODO + } + + //color.w = 255; // opaque + } + + private: + + /*--------------------------------------*\ + |* Attributs *| + \*-------------------------------------*/ + + private: + + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/