Correction de probl?me de compilation li? a RayTracing.
[GPU.git] / WCudaMSE / Student_Cuda_Image / src / cpp / core / 03_Newton / moo / host / Newton.cu
index a468b05..eaa92ea 100755 (executable)
@@ -7,14 +7,14 @@ using namespace std;
 #include "Device.h"\r
 #include "NewtonDevice.h"\r
 \r
-Newton::Newton(int w, int h)\r
-    : variateurN(IntervalI(5, 1000), 1),\r
-      variateurEpsilon(IntervalF(0.01, 10), 0.01),\r
-      w(w), h(h),\r
-      dg(8, 8, 1),\r
-      db(32, 32, 1),\r
-      ptrDomaineMathInit(new DomaineMath(-2, -2, 2, 2)),\r
-      title("Fractal Newton")\r
+Newton::Newton(int w, int h) :\r
+    variateurEpsilon(IntervalF(0.01, 1), 0.001),\r
+    w(w),\r
+    h(h),\r
+    dg(8, 8, 1),\r
+    db(32, 32, 1),\r
+    ptrDomaineMathInit(new DomaineMath(-2, -2, 2, 2)),\r
+    title("Fractal Newton")\r
     {\r
     Device::assertDim(dg, db);\r
     }\r
@@ -26,14 +26,13 @@ Newton::~Newton()
 \r
 void Newton::runGPU(uchar4* ptrDevPixels, const DomaineMath& domaineMath)\r
     {\r
-    newton<<<dg,db>>>(ptrDevPixels, this->w, this->h, domaineMath, this->t, this->epsilon);\r
+    newton<<<dg,db>>>(ptrDevPixels, this->w, this->h, domaineMath, 100, this->epsilon);\r
 \r
     HANDLE_ERROR(cudaDeviceSynchronize()); // Pour flusher les 'printf' (pour le DEBUG).\r
     }\r
 \r
 void Newton::animationStep()\r
     {\r
-    this->t = this->variateurN.varierAndGet();\r
     this->epsilon = this->variateurEpsilon.varierAndGet();\r
     }\r
 \r
@@ -54,7 +53,12 @@ DomaineMath* Newton::getDomaineMathInit()
 \r
 float Newton::getT()\r
     {\r
-    return this->t;\r
+    return this->epsilon;\r
+    }\r
+\r
+string Newton::getTName()\r
+    {\r
+    return "epsilon : ";\r
     }\r
 \r
 string Newton::getTitle()\r