Ray tracing (pas termine).
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 04_RayTracing / moo / host / RayTracing.h
diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/host/RayTracing.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/host/RayTracing.h
new file mode 100644 (file)
index 0000000..80729b8
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef RAY_TRACING_H
+#define RAY_TRACING_H
+
+#include "cudaTools.h"
+#include "Animable_I.h"
+#include "MathTools.h"
+#include "Sphere.h"
+
+class RayTracing : public Animable_I
+    {
+    public:
+        RayTracing(int w, int h);
+        ~RayTracing();
+
+        void runGPU(uchar4* ptrDevPixels) /*override*/;
+        void animationStep() /*override*/;
+
+        int getW() /*override*/;
+        int getH() /*override*/;
+
+        float getT() /*override*/;
+
+        string getTitle(void) /*override*/;
+
+    private:
+        Sphere* createSpheres(int n);
+
+        float t;
+
+        const int w;
+        const int h;
+
+        const dim3 dg;
+        const dim3 db;
+
+        const string title;
+    };
+
+#endif