X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F01_Rippling%2Fmoo%2Fdevice%2Fmath%2FRipplingMath.h;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F01_Rippling%2Fmoo%2Fdevice%2Fmath%2FRipplingMath.h;h=74c4dfc3eff7dbd3a70b8bb5a94d336482d7f0e7;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h new file mode 100755 index 0000000..74c4dfc --- /dev/null +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/01_Rippling/moo/device/math/RipplingMath.h @@ -0,0 +1,80 @@ +#ifndef RIPPLING_MATH_H_ +#define RIPPLING_MATH_H_ + +#include + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class RipplingMath + { + + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + public: + + __device__ + RipplingMath(int w, int h) + { + // TODO + } + + __device__ + RipplingMath(const RipplingMath& source) + { + // TODO + } + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + public: + + /** + * x=pixelI + * y=pixelJ + */ + __device__ + void color(int i, int j, float t, uchar4& color) + { + // Debug (a mettre en commentaire) + { + unsigned char levelGris = 128; //in [0.255] (debug image) + color.x = levelGris; + color.y = levelGris; + color.z = levelGris; + } + + // Vrai problem + { + // TODO + } + + //color.w = 255; // opaque + } + + private: + + /*--------------------------------------*\ + |* Attributs *| + \*-------------------------------------*/ + + private: + + // Tools + + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/