Create scene data structure

This commit is contained in:
2025-09-23 15:36:08 +01:00
parent a6b52d5f75
commit 61f9ec7642
4 changed files with 34 additions and 20 deletions

View File

@@ -2,8 +2,7 @@
#define CAMERA_H
#include "img.h"
#include "obj.h"
#include "vec3.h"
#include "scene.h"
#include <stdint.h>
@@ -19,7 +18,6 @@ camera_t camera_init(
uint32_t img_height, unsigned samples_per_pixel);
void camera_render(
const camera_t *camera, const obj_t *scene, unsigned scene_count,
img_t *img_out);
const camera_t *camera, const scene_t *scene, img_t *img_out);
#endif

12
include/scene.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef SCENE_H
#define SCENE_H
#include "obj.h"
typedef struct {
vec3_t sky_colour;
obj_t *objs;
unsigned obj_count;
} scene_t;
#endif