This commit is contained in:
H3XploR
2025-02-17 22:09:31 +01:00
parent 557de2b0a7
commit e36cfb5fde
27 changed files with 912 additions and 953 deletions
+6 -4
View File
@@ -6,15 +6,17 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/15 19:49:41 by yantoine #+# #+# */
/* Updated: 2025/02/17 17:49:28 by yantoine ### ########.fr */
/* Updated: 2025/02/17 21:30:47 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
#include "miniRT.h"
t_scene parsing_plane(const char *line, t_scene scene)
t_scene parsing_plane(t_scene scene)
{
const char **tokens = get_tokens_secure(scene, scene.numPlanes, MAX_PLANES, 4);
char **tokens;
tokens = get_tokens_secure(scene, scene.numPlanes, MAX_PLANES, 4);
scene.token_if_exit = tokens;
scene.planes[scene.numPlanes].point = parse_vector(tokens[1], scene);
scene.planes[scene.numPlanes].normal = parse_vector_normalize(tokens[2], scene);
@@ -24,7 +26,7 @@ t_scene parsing_plane(const char *line, t_scene scene)
return (scene);
}
float intersectPlane(Ray ray, Plane p, t_vec3 *hitNormal)
float intersectPlane(t_ray ray, t_plane p, t_vec3 *hitNormal)
{
float denom;
float t;