-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlight.h
37 lines (32 loc) · 1.51 KB
/
light.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* light.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ajaehaer <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/01/30 13:47:41 by ajaehaer #+# #+# */
/* Updated: 2019/02/16 15:14:56 by ajaehaer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIGHT_H
# define LIGHT_H
# include "engine_render.h"
# include "worthless_geometry.h"
typedef struct s_lighting
{
t_scene *scene;
t_intersection intersection;
t_vector view_direction;
t_vector normal;
t_vector point;
double specular_exponent;
double light_distance;
} t_lighting;
void process_point_light(t_lighting lighting, t_lightsource light,
double *diffuse, double *specular);
void process_parallel_light(t_lighting lighting,
t_lightsource light, double *diffuse, double *specular);
void process_directional_light(t_lighting lighting,
t_lightsource light, double *diffuse, double *specular);
#endif