s'occuper des intersections

This commit is contained in:
H3XploR
2025-02-15 20:02:43 +01:00
parent d6a8c5cf31
commit 0bd320f204
10 changed files with 199 additions and 13 deletions
+25
View File
@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parsing_light.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/15 19:39:08 by yantoine #+# #+# */
/* Updated: 2025/02/15 19:44:19 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
#include "minRT.h"
t_scene parsing_light(const char *line, t_scene scene)
{
const char **tokens = get_tokens_secure(scene, scene.numLights, MAX_LIGHTS, 4);
scene.token_if_exit = tokens;
scene.lights[scene.numLights].pos = parse_vector(tokens[1], scene);
scene.lights[scene.numLights].brightness = ft_atof(tokens[2], scene);
scene.lights[scene.numLights].color = parse_color(tokens[3], scene);
ft_free_array(tokens);
scene.numLights++;
return (scene);
}