Add ObjectList struct
This commit is contained in:
parent
dc558c016b
commit
b4cc32a196
2 changed files with 13 additions and 0 deletions
|
@ -8,9 +8,18 @@
|
|||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "object.h"
|
||||
#include "scene.h"
|
||||
|
||||
|
||||
struct _ObjectList
|
||||
{
|
||||
Object *object;
|
||||
ObjectList *next;
|
||||
};
|
||||
|
||||
|
||||
Color _scene_trace(Scene *scene, const Ray ray, const int depth);
|
||||
|
||||
|
||||
|
|
|
@ -12,12 +12,16 @@
|
|||
#include "basics.h"
|
||||
#include "camera.h"
|
||||
|
||||
typedef struct _ObjectList ObjectList;
|
||||
|
||||
|
||||
typedef struct _Scene
|
||||
{
|
||||
int height, width; /* Pixel dimensions. */
|
||||
Camera *camera;
|
||||
|
||||
ObjectList *objects;
|
||||
|
||||
int is_rendered;
|
||||
Color *pixels;
|
||||
} Scene;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue