miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
lights.h
Go to the documentation of this file.
1 /* ************************************************************************** */
2 /* */
3 /* ::: :::::::: */
4 /* lights.h :+: :+: :+: */
5 /* +:+ +:+ +:+ */
6 /* By: yde-goes <yde-goes@student.42sp.org.br> +#+ +:+ +#+ */
7 /* +#+#+#+#+#+ +#+ */
8 /* Created: 2023/04/11 11:06:23 by yde-goes #+# #+# */
9 /* Updated: 2023/06/16 13:39:59 by yde-goes ### ########.fr */
10 /* */
11 /* ************************************************************************** */
12 
14 #ifndef LIGHTS_H
15 # define LIGHTS_H
16 
17 # include "tuples.h"
18 # include "helpers.h"
19 # include "libft.h"
20 
43 typedef struct s_light
44 {
45  t_point position;
46  t_color intensity;
47  t_bool in_shadow;
49 
61 typedef struct s_sight
62 {
63  t_vector eyev;
64  t_vector normalv;
66 
67 /* ************************************************************************** */
68 /* LIGHTS.C */
69 /* ************************************************************************** */
70 
84 
85 #endif
struct s_light t_light
The struct s_light represents a light's source. This source has a position in space and an intensity ...
t_light point_light(t_point position, t_color intensity)
The function point_light() instances a light's source of type t_light with a given position in space ...
Definition: lights.c:15
struct s_sight t_sight
The struct s_sight represents the human eye looking forwards.
t_point position(t_ray ray, float distance)
The function position() finds the position of a given ray and a given time or distance....
Definition: rays.c:22
The struct s_color stores the color values of ray tracing. It contains a field for red,...
Definition: tuples.h:63
The struct s_light represents a light's source. This source has a position in space and an intensity ...
Definition: lights.h:44
The struct s_sight represents the human eye looking forwards.
Definition: lights.h:62
Tuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordin...
Definition: tuples.h:33