projects
/
GPU.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Missing parameters file.
[GPU.git]
/
WCudaMSE
/
Student_Cuda_Image
/
src
/
cpp
/
core
/
04_RayTracing
/
moo
/
device
/
Sphere.h
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
(file)
--- 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:
class Sphere
{
public:
- /*__host__
- Sphere(float3 centre, float r, float hue) :
- centre(centre),
- hueInitial(hue)
- {
- this->setR(r);
- }*/
-
__host__
__device__
Sphere()
{
}
__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)
{
__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
*/
__device__
float brightness(float dz) const
@@
-105,9
+90,7
@@
class Sphere
private:
float r; // Rayon.
float3 centre; // Position.
private:
float r; // Rayon.
float3 centre; // Position.
-
float rCarre; // Précalul de r².
float rCarre; // Précalul de r².
-
float T; // Utilisé pour l'animation.
};
#endif
float T; // Utilisé pour l'animation.
};
#endif