refactor. ich habe den teil aus dem exampleSphere rausgezogen der generell gebraucht wird. displaySzene() nimmt eine szene an und lässt den raytracer fr jeden Pixel laufen

This commit is contained in:
any
2026-07-29 21:13:54 +02:00
parent fb44398c24
commit 1742d7d0f5
8 changed files with 90 additions and 63 deletions
+8 -7
View File
@@ -14,12 +14,6 @@ struct ray {
vec3 direction;
}; typedef struct ray ray;
struct sphere {
vec3 origin;
double radius;
double luminance;
}; typedef struct sphere sphere;
struct camera {
vec3 origin;
vec3 direction;
@@ -32,4 +26,11 @@ struct camera {
struct rgba {
double r, g, b, a;
}; typedef struct rgba RGBA;
}; typedef struct rgba RGBA;
struct sphere {
vec3 origin;
double radius;
RGBA color;
int isLight;
}; typedef struct sphere sphere;