Refactor
code ist jetzt schner aber ich habe durch einen pointer fehler in raytrace.c (nearestObject = ¤tObject //zeigt immer auf die selbne adresse) ein art negativ bild erzeugt
This commit is contained in:
@@ -32,7 +32,6 @@ struct sphere {
|
||||
vec3 origin;
|
||||
double radius;
|
||||
RGBA color;
|
||||
int isLight;
|
||||
}; typedef struct sphere sphere;
|
||||
|
||||
struct plane {
|
||||
@@ -46,5 +45,10 @@ struct quad {
|
||||
vec3 v2;
|
||||
vec3 normal;
|
||||
RGBA color;
|
||||
int isLight;
|
||||
}; typedef struct quad quad;
|
||||
}; typedef struct quad quad;
|
||||
|
||||
struct object {
|
||||
int objectType; // 0 = sphere, 1 = Quad
|
||||
void *objectPointer;
|
||||
bool isLight;
|
||||
}; typedef struct object object;
|
||||
Reference in New Issue
Block a user