-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstruct.h
157 lines (141 loc) · 2.21 KB
/
struct.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*
** struct.h for struct in /home/nicolas/Modules/gfx_raytracer1
**
** Made by menett_a
** Login <[email protected]>
**
** Started on Sun Feb 28 16:39:55 2016 menett_a
** Last update Sun Mar 13 21:40:51 2016 menett_a
*/
#ifndef STRUCT_H_
# define STRUCT_H_
typedef struct s_sphe
{
int pos_x;
int pos_y;
int pos_z;
int radius;
int color;
} t_sphe;
typedef struct s_cone
{
int pos_x;
int pos_y;
int pos_z;
int angle;
int color;
} t_cone;
typedef struct s_plan
{
int pos_x;
int pos_y;
int pos_z;
int x;
int y;
int z;
int color;
} t_plan;
typedef struct s_cyli
{
int pos_y;
int pos_z;
int radius;
int color;
} t_cyli;
typedef struct s_light
{
int pos_x;
int pos_y;
int pos_z;
int brt;
} t_light;
typedef struct s_view
{
int angle;
t_bunny_position screen_info[2];
} t_view;
typedef struct s_info
{
int nb_sphere;
int nb_light;
int nb_cone;
int nb_plan;
int nb_cyli;
t_view screen_info;
t_sphe *sphe;
t_cone *cone;
t_plan *plan;
t_cyli *cyli;
t_light *light;
} t_info;
typedef struct s_delta
{
double a;
double b;
double c;
double delta;
} t_delta;
typedef struct s_norm
{
double n_x;
double n_y;
double n_z;
double res;
double _res;
double __res;
} t_norm;
typedef struct s_ray
{
double vec_x;
double vec_y;
double vec_z;
double light_x;
double light_y;
double light_z;
int i;
int j;
} t_ray;
typedef struct s_pall
{
t_color color[6];
} t_pall;
typedef struct s_collision
{
t_bunny_position pos;
double x;
double _x;
double pos_x;
double pos_y;
double pos_z;
double dist;
int color;
t_color _color;
int is_collision;
} t_collision;
typedef struct s_move
{
int move_x;
int move_y;
int move_z;
int _move_x;
int _move_y;
int _move_z;
int angle;
int _angle;
} t_move;
typedef struct s_loop
{
t_bunny_window *win;
t_bunny_pixelarray *pix;
int pos_x;
int pos_y;
int pos_z;
t_norm norm;
t_move move;
t_info info;
t_ray ray;
t_pall pall;
t_delta delta;
t_collision collision;
} t_loop;
#endif /* !STRUCT_H_ */