-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.h
58 lines (49 loc) · 884 Bytes
/
types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef TYPES_H
#define TYPES_H
#define B_NUM_RAYMARCH_THREADS 8
#define B_WINDOW_WIDTH 900
#define B_WINDOW_HEIGHT 504
#define B_INTERNAL_HEIGHT 64
#define B_INTERNAL_WIDTH 114
#include "vect.h"
#include "main.h"
enum solid_op {
B_ADD
};
struct ray
{
struct vec *pos;
struct vec *dir;
};
struct camera
{
struct vec *x;
struct vec *y;
struct vec *z;
struct vec *pos;
struct vec *light;
//struct vec *rot;
int dims;
};
struct pixel_info
{
int flags; /* 0 - no collide */
struct colour col;
int iterations;
double travel_dist;
double scene_dist;
};
struct solid {
enum solid_op op;
struct vec pos;
double rotation;
double scale;
double (*dist)(struct vec *);
};
struct object
{
struct solid sol;
struct colour base_col;
struct colour (*col)(struct ray *, struct object *o);
};
#endif