Files
CPU-Raytracer/structs.h
T
admin 91bb170b23 NON WORKING
absoluter clutter beim versuch quads zu implementieren. refactor absolut noetig
2026-07-30 22:16:18 +02:00

50 lines
847 B
C

#pragma once
struct vec3 {
double x, y, z;
};
typedef struct vec3 vec3;
struct triangle {
vec3 a, b, c;
vec3 normal;
}; typedef struct triangle triangle;
struct ray {
vec3 origin;
vec3 direction;
}; typedef struct ray ray;
struct camera {
vec3 origin;
vec3 direction;
double height;
double width;
double resolutionX;
double resolutionY;
double screenDistance;
}; typedef struct camera camera;
struct rgba {
double r, g, b, a;
}; typedef struct rgba RGBA;
struct sphere {
vec3 origin;
double radius;
RGBA color;
int isLight;
}; typedef struct sphere sphere;
struct plane {
vec3 origin;
vec3 normal;
}; typedef struct plane plane;
struct quad {
vec3 origin;
vec3 v1;
vec3 v2;
vec3 normal;
RGBA color;
int isLight;
}; typedef struct quad quad;