X-Git-Url: http://git.euphorik.ch/?p=GPU.git;a=blobdiff_plain;f=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FSphere.h;fp=WCudaMSE%2FStudent_Cuda_Image%2Fsrc%2Fcpp%2Fcore%2F04_RayTracing%2Fmoo%2Fdevice%2FSphere.h;h=a4c49e913227148908bcc18ee24a2c79e10ead1c;hp=3c8df6e6a83ba8d490a33c8a05fef23a8c39922a;hb=1c4b2276e7157acde9a3014b68d5d1667a7d6a44;hpb=f8259dce248a4411c3bc64cecb9fc268c4fd81d6 diff --git a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/Sphere.h b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/Sphere.h index 3c8df6e..a4c49e9 100644 --- a/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/Sphere.h +++ b/WCudaMSE/Student_Cuda_Image/src/cpp/core/04_RayTracing/moo/device/Sphere.h @@ -7,28 +7,12 @@ class Sphere { public: - /*__host__ - Sphere(float3 centre, float r, float hue) : - centre(centre), - hueInitial(hue) - { - this->setR(r); - }*/ - __host__ __device__ Sphere() { } - /*Sphere(const Sphere& other) : - r(other.r), - centre(other.centre), - rCarre(other.rCarre), - T(other.T) - { - }*/ - __host__ void setCentre(const float3& centre) { @@ -85,7 +69,8 @@ class Sphere } /** - * Renvoie la le B de HSB compris entre 0 et 1. + * Renvoie la le B de HSB compris entre 0 et 1 dépendant du paramètre 'dz' + * lui même compris entre 0 et le rayon 'r'. */ __device__ float brightness(float dz) const @@ -105,9 +90,7 @@ class Sphere private: float r; // Rayon. float3 centre; // Position. - float rCarre; // Précalul de r². - float T; // Utilisé pour l'animation. }; #endif