-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.h
57 lines (45 loc) · 785 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
#pragma once
#include "raylib.h"
#include <glm/glm.hpp>
using namespace glm;
struct Object {
Color color;
int specular;
};
struct Plane : public Object {
vec3 point;
vec3 normal;
};
struct Sphere : public Object {
float radius;
vec3 center;
};
enum LightSourceType {
POINT_LIGHT = 0,
DIRECTIONAL_LIGHT,
AMBIENT_LIGHT
};
struct LightSource {
LightSourceType type;
vec3 position;
vec3 direction;
float intensity;
};
struct World {
size_t planes_count;
Plane *planes;
size_t spheres_count;
Sphere *spheres;
size_t light_sources_count;
LightSource *light_sources;
};
struct Xcamera {
vec3 pos;
vec3 x_basis;
vec3 y_basis;
vec3 z_basis;
};
struct Xray {
vec3 origin;
vec3 D;
};