From: Lukas Jiriste Date: Mon, 13 Jan 2025 18:56:41 +0000 (+0100) Subject: Fix some of Norm non-compliant formatting X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=f96ebe0799c3b60b40a7cb9eaf2f71a259b2c40d;p=42%2FminiRT.git Fix some of Norm non-compliant formatting --- diff --git a/inc/miniRT.h b/inc/miniRT.h index 1d05bef..34bccb0 100644 --- a/inc/miniRT.h +++ b/inc/miniRT.h @@ -1,18 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* miniRT.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ljiriste +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/13 19:51:09 by ljiriste #+# #+# */ +/* Updated: 2025/01/13 19:54:00 by ljiriste ### ########.fr */ +/* */ +/* ************************************************************************** */ + #ifndef MINIRT_H # define MINIRT_H # include "vec3.h" # include "libft.h" -typedef t_vec3 t_color; +typedef t_vec3 t_color; -typedef struct s_color_sRGB +typedef struct s_color_srgb { unsigned char a; unsigned char r; unsigned char g; unsigned char b; -} t_color_sRGB; +} t_color_srgb; typedef struct s_pair { @@ -84,12 +96,12 @@ typedef struct s_object // The t_object should be used for scene objects only while the t_element can be // anything in the scene (except for ambient light). -typedef t_object t_element; +typedef t_object t_element; typedef struct s_ambient_light { t_color color; - double brightness; + double brightness; } t_ambient_light; typedef struct s_scene @@ -135,16 +147,18 @@ typedef struct s_obstruction double distance; } t_obstruction; -t_color trace_ray(const t_ray *ray, t_scene *scene); -t_color color_sRGB_to_lin(t_color_sRGB sRGB); +t_color trace_ray(const t_ray *ray, t_scene *scene); +t_color color_srgb_to_lin(t_color_srgb srgb); -t_obstruction find_nearest_obstruction(const t_ray *ray, t_vec *objects, const t_object *ignored); +t_obstruction find_nearest_obstruction( + const t_ray *ray, t_vec *objects, const t_object *ignored); -int parse_args(int argc, char **argv, t_session *s); +int parse_args(int argc, char **argv, t_session *s); -int rotate(t_element *element, t_vec3 rot_axis, double angle); -void translate(t_element *element, t_vec3 direction, double distance); -void change_radius(t_element *element, double change); -void change_height(t_element *element, double change); +int rotate(t_element *element, t_vec3 rot_axis, double angle); +void translate( + t_element *element, t_vec3 direction, double distance); +void change_radius(t_element *element, double change); +void change_height(t_element *element, double change); #endif // MINIRT_H diff --git a/inc/parsing_info.h b/inc/parsing_info.h index 32497fd..a641bcd 100644 --- a/inc/parsing_info.h +++ b/inc/parsing_info.h @@ -6,286 +6,286 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/28 12:31:54 by ljiriste #+# #+# */ -/* Updated: 2024/11/28 16:28:12 by ljiriste ### ########.fr */ +/* Updated: 2025/01/13 19:51:01 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef PARSING_INFO_H # define PARSING_INFO_H -static char g_grammar[628] = { - 0x73, 0x63, 0x65, 0x6e, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x27, 0x27, 0x0a, - 0x73, 0x63, 0x65, 0x6e, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x73, 0x63, 0x65, - 0x6e, 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x61, 0x6d, - 0x62, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x0a, - 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x63, - 0x61, 0x6d, 0x65, 0x72, 0x61, 0x0a, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x73, 0x70, - 0x68, 0x65, 0x72, 0x65, 0x0a, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x20, 0x2d, 0x3e, 0x20, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x0a, 0x65, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x63, 0x79, 0x6c, - 0x69, 0x6e, 0x64, 0x65, 0x72, 0x0a, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, - 0x74, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x41, - 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x20, 0x72, - 0x67, 0x62, 0x0a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x20, 0x2d, 0x3e, - 0x20, 0x43, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, - 0x65, 0x73, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x0a, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x4c, 0x20, 0x63, - 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x0a, 0x6c, 0x69, 0x67, - 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x4c, 0x20, 0x63, 0x6f, 0x6f, 0x72, - 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x74, 0x79, 0x20, 0x72, 0x67, 0x62, 0x0a, 0x73, 0x70, - 0x68, 0x65, 0x72, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x53, 0x50, 0x20, 0x63, - 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x64, - 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x72, 0x67, 0x62, 0x0a, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x50, 0x4c, 0x20, - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, - 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x72, 0x67, 0x62, 0x0a, 0x63, - 0x79, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x2d, 0x3e, 0x20, 0x43, - 0x59, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, - 0x73, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x64, 0x69, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x20, 0x72, 0x67, 0x62, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x74, 0x79, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, - 0x72, 0x67, 0x62, 0x20, 0x2d, 0x3e, 0x20, 0x49, 0x4e, 0x54, 0x20, 0x43, - 0x4f, 0x4d, 0x4d, 0x41, 0x20, 0x49, 0x4e, 0x54, 0x20, 0x43, 0x4f, 0x4d, - 0x4d, 0x41, 0x20, 0x49, 0x4e, 0x54, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, - 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x2d, 0x3e, 0x20, 0x76, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x0a, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, - 0x2d, 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x43, 0x4f, 0x4d, - 0x4d, 0x41, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x43, 0x4f, 0x4d, - 0x4d, 0x41, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x2d, - 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, 0x64, 0x69, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, - 0x74, 0x0a, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, - 0x2d, 0x3e, 0x20, 0x49, 0x4e, 0x54, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, - 0x20, 0x2d, 0x3e, 0x20, 0x49, 0x4e, 0x54, 0x20, 0x44, 0x4f, 0x54, 0x20, - 0x49, 0x4e, 0x54, 0x0a +static char g_grammar[628] = { + 0x73, 0x63, 0x65, 0x6e, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x27, 0x27, 0x0a, + 0x73, 0x63, 0x65, 0x6e, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x73, 0x63, 0x65, + 0x6e, 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x61, 0x6d, + 0x62, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x0a, + 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x63, + 0x61, 0x6d, 0x65, 0x72, 0x61, 0x0a, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x73, 0x70, + 0x68, 0x65, 0x72, 0x65, 0x0a, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x20, 0x2d, 0x3e, 0x20, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x0a, 0x65, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x63, 0x79, 0x6c, + 0x69, 0x6e, 0x64, 0x65, 0x72, 0x0a, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x41, + 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x20, 0x72, + 0x67, 0x62, 0x0a, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x20, 0x2d, 0x3e, + 0x20, 0x43, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, + 0x65, 0x73, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x0a, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x4c, 0x20, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x0a, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, 0x4c, 0x20, 0x63, 0x6f, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x74, 0x79, 0x20, 0x72, 0x67, 0x62, 0x0a, 0x73, 0x70, + 0x68, 0x65, 0x72, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x53, 0x50, 0x20, 0x63, + 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x64, + 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x72, 0x67, 0x62, 0x0a, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x20, 0x2d, 0x3e, 0x20, 0x50, 0x4c, 0x20, + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x72, 0x67, 0x62, 0x0a, 0x63, + 0x79, 0x6c, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x2d, 0x3e, 0x20, 0x43, + 0x59, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, + 0x73, 0x20, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x64, 0x69, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x20, 0x72, 0x67, 0x62, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x74, 0x79, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, + 0x72, 0x67, 0x62, 0x20, 0x2d, 0x3e, 0x20, 0x49, 0x4e, 0x54, 0x20, 0x43, + 0x4f, 0x4d, 0x4d, 0x41, 0x20, 0x49, 0x4e, 0x54, 0x20, 0x43, 0x4f, 0x4d, + 0x4d, 0x41, 0x20, 0x49, 0x4e, 0x54, 0x0a, 0x63, 0x6f, 0x6f, 0x72, 0x64, + 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x2d, 0x3e, 0x20, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x0a, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, + 0x2d, 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x43, 0x4f, 0x4d, + 0x4d, 0x41, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x43, 0x4f, 0x4d, + 0x4d, 0x41, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x2d, + 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, 0x64, 0x69, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x20, 0x2d, 0x3e, 0x20, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x0a, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2d, 0x3e, 0x20, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, + 0x2d, 0x3e, 0x20, 0x49, 0x4e, 0x54, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x20, 0x2d, 0x3e, 0x20, 0x49, 0x4e, 0x54, 0x20, 0x44, 0x4f, 0x54, 0x20, + 0x49, 0x4e, 0x54, 0x0a }; -static char g_parsing_table[2586] = { - 0x53, 0x74, 0x61, 0x74, 0x65, 0x3b, 0x44, 0x4f, 0x54, 0x3b, 0x43, 0x4f, - 0x4d, 0x4d, 0x41, 0x3b, 0x49, 0x4e, 0x54, 0x3b, 0x43, 0x59, 0x3b, 0x50, - 0x4c, 0x3b, 0x53, 0x50, 0x3b, 0x4c, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x24, - 0x3b, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x3b, 0x65, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x3b, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, - 0x69, 0x67, 0x68, 0x74, 0x3b, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x3b, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x73, 0x70, 0x68, 0x65, 0x72, 0x65, - 0x3b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x3b, 0x63, 0x79, 0x6c, 0x69, 0x6e, - 0x64, 0x65, 0x72, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, - 0x79, 0x3b, 0x72, 0x67, 0x62, 0x3b, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, - 0x6e, 0x61, 0x74, 0x65, 0x73, 0x3b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x3b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x76, 0x69, - 0x65, 0x77, 0x3b, 0x64, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3b, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x66, 0x6c, 0x6f, 0x61, 0x74, -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- 0x72, 0x35, 0x3b, 0x72, 0x35, 0x3b, 0x72, 0x35, 0x3b, 0x72, 0x35, 0x3b, - 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, - 0x3b, 0x3b, 0x3b, 0x0a, 0x36, 0x30, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x36, - 0x3b, 0x72, 0x36, 0x3b, 0x72, 0x36, 0x3b, 0x72, 0x36, 0x3b, 0x72, 0x36, - 0x3b, 0x72, 0x36, 0x3b, 0x72, 0x36, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, - 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x0a, 0x36, - 0x31, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, - 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, - 0x37, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, - 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x0a +static char g_parsing_table[2586] = { + 0x53, 0x74, 0x61, 0x74, 0x65, 0x3b, 0x44, 0x4f, 0x54, 0x3b, 0x43, 0x4f, + 0x4d, 0x4d, 0x41, 0x3b, 0x49, 0x4e, 0x54, 0x3b, 0x43, 0x59, 0x3b, 0x50, + 0x4c, 0x3b, 0x53, 0x50, 0x3b, 0x4c, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x24, + 0x3b, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x3b, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x3b, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x3b, 0x63, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x3b, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x73, 0x70, 0x68, 0x65, 0x72, 0x65, + 0x3b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x3b, 0x63, 0x79, 0x6c, 0x69, 0x6e, + 0x64, 0x65, 0x72, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, + 0x79, 0x3b, 0x72, 0x67, 0x62, 0x3b, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x74, 0x65, 0x73, 0x3b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x3b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x76, 0x69, + 0x65, 0x77, 0x3b, 0x64, 0x69, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x3b, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x0a, 0x30, 0x3b, 0x3b, 0x3b, 0x3b, 0x72, 0x30, 0x3b, 0x72, 0x30, 0x3b, + 0x72, 0x30, 0x3b, 0x72, 0x30, 0x3b, 0x72, 0x30, 0x3b, 0x72, 0x30, 0x3b, + 0x72, 0x30, 0x3b, 0x31, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, + 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x0a, 0x31, 0x3b, 0x3b, 0x3b, + 0x3b, 0x73, 0x32, 0x3b, 0x73, 0x32, 0x37, 0x3b, 0x73, 0x33, 0x31, 0x3b, + 0x73, 0x33, 0x35, 0x3b, 0x73, 0x34, 0x33, 0x3b, 0x73, 0x35, 0x31, 0x3b, + 0x61, 0x63, 0x63, 0x3b, 0x3b, 0x35, 0x35, 0x3b, 0x35, 0x36, 0x3b, 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 0x37, 0x3b, 0x72, + 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, 0x37, 0x3b, 0x72, + 0x37, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, + 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x0a }; #endif // PARSING_INFO_H diff --git a/inc/vec3.h b/inc/vec3.h index 28aeaf8..3899455 100644 --- a/inc/vec3.h +++ b/inc/vec3.h @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* vec3.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ljiriste +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/13 19:49:47 by ljiriste #+# #+# */ +/* Updated: 2025/01/13 19:50:03 by ljiriste ### ########.fr */ +/* */ +/* ************************************************************************** */ + #ifndef VEC3_H # define VEC3_H diff --git a/src/main.c b/src/main.c index 48321d6..1f39390 100644 --- a/src/main.c +++ b/src/main.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* main.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ljiriste +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/13 17:16:00 by ljiriste #+# #+# */ +/* Updated: 2025/01/13 19:43:24 by ljiriste ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "vec3.h" #include "miniRT.h" #include @@ -12,28 +24,28 @@ void *get_pixel(t_img *img, int x, int y) return (img->addr + y * img->bpl + x * img->bpp / CHAR_BIT); } -double channel_sRGB_to_lin(unsigned char sRGB_channel) +double channel_srgb_to_lin(unsigned char srgb_channel) { double normalized; - normalized = sRGB_channel / 255.; + normalized = srgb_channel / 255.; if (normalized < 0.04045) return (normalized / 12.92); else return (pow((normalized + 0.055) / 1.055, 2.4)); } -t_color color_sRGB_to_lin(t_color_sRGB sRGB) +t_color color_srgb_to_lin(t_color_srgb srgb) { t_color res; - res.x = channel_sRGB_to_lin(sRGB.r); - res.y = channel_sRGB_to_lin(sRGB.g); - res.z = channel_sRGB_to_lin(sRGB.b); + res.x = channel_srgb_to_lin(srgb.r); + res.y = channel_srgb_to_lin(srgb.g); + res.z = channel_srgb_to_lin(srgb.b); return (res); } -unsigned char channel_lin_to_sRGB(double lin_channel) +unsigned char channel_lin_to_srgb(double lin_channel) { if (lin_channel < 0) lin_channel = 0; @@ -42,40 +54,40 @@ unsigned char channel_lin_to_sRGB(double lin_channel) if (lin_channel < 0.0031308) return (255 * lin_channel * 12.92); else - return (255 * (1.055 * pow(lin_channel, 1/2.4) - 0.055)); + return (255 * (1.055 * pow(lin_channel, 1 / 2.4) - 0.055)); } -t_color_sRGB color_lin_to_sRGB(t_color c) +t_color_srgb color_lin_to_srgb(t_color c) { - t_color_sRGB res; + t_color_srgb res; res.a = 255; - res.r = channel_lin_to_sRGB(c.x); - res.g = channel_lin_to_sRGB(c.y); - res.b = channel_lin_to_sRGB(c.z); + res.r = channel_lin_to_srgb(c.x); + res.g = channel_lin_to_srgb(c.y); + res.b = channel_lin_to_srgb(c.z); return (res); } void ft_putpx_img(t_img *img, int x, int y, t_color c) { - char *px_addr; - t_color_sRGB sRGB_c; + char *px_addr; + t_color_srgb srgb_c; - sRGB_c = color_lin_to_sRGB(c); + srgb_c = color_lin_to_srgb(c); px_addr = get_pixel(img, x, y); if (img->endian) { - px_addr[0] = sRGB_c.a; - px_addr[1] = sRGB_c.r; - px_addr[2] = sRGB_c.g; - px_addr[3] = sRGB_c.b; + px_addr[0] = srgb_c.a; + px_addr[1] = srgb_c.r; + px_addr[2] = srgb_c.g; + px_addr[3] = srgb_c.b; } else { - px_addr[3] = sRGB_c.a; - px_addr[2] = sRGB_c.r; - px_addr[1] = sRGB_c.g; - px_addr[0] = sRGB_c.b; + px_addr[3] = srgb_c.a; + px_addr[2] = srgb_c.r; + px_addr[1] = srgb_c.g; + px_addr[0] = srgb_c.b; } return ; } @@ -87,11 +99,13 @@ t_ray get_camera_ray(int x, int y, const t_session *s) const float y_max = s->img.height; const t_camera *camera; - camera = &(((t_element *)ft_vec_caccess(&s->scene.cameras, s->scene.current_camera_ind))->object.camera); + camera = &(((t_element *) + ft_vec_caccess(&s->scene.cameras, s->scene.current_camera_ind)) + ->object.camera); res.start = camera->position; res.direction = camera->orientation; - res.direction = - vec_add( + res.direction + = vec_add( res.direction, vec_real_mul( vec_add( @@ -135,13 +149,13 @@ int close_win(t_session *s) return (0); } -static const double TRANSLATION_STEP = 0.1; -static const double ROTATION_STEP = 0.1; -static const double RESIZE_STEP = 0.1; +static const double g_translation_step = 0.1; +static const double g_rotation_step = 0.1; +static const double g_resize_step = 0.1; -static const t_vec3 X_VEC = {.x = 1, .y = 0, .z = 0}; -static const t_vec3 Y_VEC = {.x = 0, .y = 1, .z = 0}; -static const t_vec3 Z_VEC = {.x = 0, .y = 0, .z = 1}; +static const t_vec3 g_x_vec = {.x = 1, .y = 0, .z = 0}; +static const t_vec3 g_y_vec = {.x = 0, .y = 1, .z = 0}; +static const t_vec3 g_z_vec = {.x = 0, .y = 0, .z = 1}; int handle_key_press(int keycode, t_session *s) { @@ -155,7 +169,9 @@ int handle_key_press(int keycode, t_session *s) element = s->scene.current_element; else element = ft_vec_access(&s->scene.cameras, s->scene.current_camera_ind); - camera = &(((t_element *)ft_vec_access(&s->scene.cameras, s->scene.current_camera_ind))->object.camera); + camera = &(((t_element *) + ft_vec_access(&s->scene.cameras, s->scene.current_camera_ind)) + ->object.camera); if (s->scene.relative_directions) { forwards = camera->orientation; @@ -164,9 +180,9 @@ int handle_key_press(int keycode, t_session *s) } else { - forwards = X_VEC; - upwards = Z_VEC; - sidewards = Y_VEC; + forwards = g_x_vec; + upwards = g_z_vec; + sidewards = g_y_vec; } if (keycode == XK_Escape) { @@ -176,56 +192,65 @@ int handle_key_press(int keycode, t_session *s) close_win(s); } else if (keycode == XK_Up) - translate(element, forwards, TRANSLATION_STEP); + translate(element, forwards, g_translation_step); else if (keycode == XK_Down) - translate(element, forwards, -TRANSLATION_STEP); + translate(element, forwards, -g_translation_step); else if (keycode == XK_Left) - translate(element, sidewards, -TRANSLATION_STEP); + translate(element, sidewards, -g_translation_step); else if (keycode == XK_Right) - translate(element, sidewards, TRANSLATION_STEP); + translate(element, sidewards, g_translation_step); else if (keycode == XK_space) - translate(element, upwards, TRANSLATION_STEP); + translate(element, upwards, g_translation_step); else if (keycode == XK_Shift_L) - translate(element, upwards, -TRANSLATION_STEP); + translate(element, upwards, -g_translation_step); else if (keycode == XK_w) - rotate(element, sidewards, ROTATION_STEP); + rotate(element, sidewards, g_rotation_step); else if (keycode == XK_s) - rotate(element, sidewards, -ROTATION_STEP); + rotate(element, sidewards, -g_rotation_step); else if (keycode == XK_a) - rotate(element, upwards, -ROTATION_STEP); + rotate(element, upwards, -g_rotation_step); else if (keycode == XK_d) - rotate(element, upwards, ROTATION_STEP); + rotate(element, upwards, g_rotation_step); else if (keycode == XK_e) - rotate(element, forwards, -ROTATION_STEP); + rotate(element, forwards, -g_rotation_step); else if (keycode == XK_q) - rotate(element, forwards, ROTATION_STEP); + rotate(element, forwards, g_rotation_step); else if (keycode == XK_r) - change_radius(element, RESIZE_STEP); + change_radius(element, g_resize_step); else if (keycode == XK_t) - change_radius(element, -RESIZE_STEP); + change_radius(element, -g_resize_step); else if (keycode == XK_f) - change_height(element, RESIZE_STEP); + change_height(element, g_resize_step); else if (keycode == XK_g) - change_height(element, -RESIZE_STEP); + change_height(element, -g_resize_step); else if (keycode == XK_o) s->scene.relative_directions = !s->scene.relative_directions; else if (keycode == XK_l && s->scene.lights.size > 0) { if (s->scene.current_element && s->scene.current_element->type == LIGHT) - s->scene.current_light_ind = (s->scene.current_light_ind + 1) % s->scene.lights.size; - s->scene.current_element = ft_vec_access(&s->scene.lights, s->scene.current_light_ind); + s->scene.current_light_ind + = (s->scene.current_light_ind + 1) % s->scene.lights.size; + s->scene.current_element + = ft_vec_access(&s->scene.lights, s->scene.current_light_ind); } else if (keycode == XK_k && s->scene.lights.size > 0) { if (s->scene.current_element && s->scene.current_element->type == LIGHT) - s->scene.current_light_ind = (s->scene.current_light_ind + s->scene.lights.size - 1) % s->scene.lights.size; - s->scene.current_element = ft_vec_access(&s->scene.lights, s->scene.current_light_ind); + s->scene.current_light_ind + = (s->scene.current_light_ind + s->scene.lights.size - 1) + % s->scene.lights.size; + s->scene.current_element + = ft_vec_access(&s->scene.lights, s->scene.current_light_ind); } else if (keycode == XK_c) - s->scene.current_camera_ind = (s->scene.current_camera_ind + 1) % s->scene.cameras.size; + s->scene.current_camera_ind + = (s->scene.current_camera_ind + 1) % s->scene.cameras.size; else if (keycode == XK_x) - s->scene.current_camera_ind = (s->scene.current_camera_ind + s->scene.cameras.size - 1) % s->scene.cameras.size; - if (keycode != XK_Escape && keycode != XK_o && keycode != XK_l && keycode != XK_k) + s->scene.current_camera_ind + = (s->scene.current_camera_ind + s->scene.cameras.size - 1) + % s->scene.cameras.size; + if (keycode != XK_Escape && keycode != XK_o + && keycode != XK_l && keycode != XK_k) draw(s); return (0); } @@ -237,7 +262,8 @@ int handle_mouse_press(int button, int x, int y, t_session *s) if (button == Button1) { ray = get_camera_ray(x, y, s); - s->scene.current_element = find_nearest_obstruction(&ray, &s->scene.objects, NULL).object; + s->scene.current_element + = find_nearest_obstruction(&ray, &s->scene.objects, NULL).object; } else if (button == Button3) s->scene.current_element = NULL; diff --git a/src/manipulation.c b/src/manipulation.c index 98283c6..8922744 100644 --- a/src/manipulation.c +++ b/src/manipulation.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/06 09:48:43 by ljiriste #+# #+# */ -/* Updated: 2025/01/08 14:08:08 by ljiriste ### ########.fr */ +/* Updated: 2025/01/13 18:09:09 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -47,7 +47,7 @@ int rotate(t_element *element, t_vec3 rot_axis, double angle) void translate(t_element *element, t_vec3 direction, double distance) { const t_vec3 change = vec_real_mul(vec_normalize(direction), distance); - t_vec3 *element_center; + t_vec3 *element_center; element_center = NULL; if (element->type == SPHERE) diff --git a/src/parsing.c b/src/parsing.c index 70645f3..6b957c0 100644 --- a/src/parsing.c +++ b/src/parsing.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/28 12:34:20 by ljiriste #+# #+# */ -/* Updated: 2025/01/10 15:36:56 by ljiriste ### ########.fr */ +/* Updated: 2025/01/13 19:54:25 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -161,10 +161,10 @@ double node_to_double(const t_parse_tree_node *double_node) return (sign * (whole + decimal)); } -t_color node_to_linear_RGB(const t_parse_tree_node *rgb_node) +t_color node_to_linear_rgb(const t_parse_tree_node *rgb_node) { const t_parse_tree_node *int_node; - t_color_sRGB color; + t_color_srgb color; int_node = ft_cget_node_child(rgb_node, 0); color.r = node_to_int(int_node); @@ -172,7 +172,7 @@ t_color node_to_linear_RGB(const t_parse_tree_node *rgb_node) color.g = node_to_int(int_node); int_node = ft_cget_node_child(rgb_node, 4); color.b = node_to_int(int_node); - return (color_sRGB_to_lin(color)); + return (color_srgb_to_lin(color)); } t_vec3 node_to_vec3(const t_parse_tree_node *vec3_node) @@ -198,7 +198,7 @@ void set_ambient_light( intensity_node = ft_cget_node_child(ambient_node, 1); rgb_node = ft_cget_node_child(ambient_node, 2); ambient->brightness = node_to_double(ft_cget_node_child(intensity_node, 0)); - ambient->color = node_to_linear_RGB(rgb_node); + ambient->color = node_to_linear_rgb(rgb_node); return ; } @@ -209,11 +209,12 @@ int add_light(const t_parse_tree_node *light_node, t_vec *lights) element.type = LIGHT; light = &element.object.light; - light->brightness = node_to_double(ft_cget_node_child(ft_cget_node_child(light_node, 2), 0)); + light->brightness = node_to_double( + ft_cget_node_child(ft_cget_node_child(light_node, 2), 0)); light->position = node_to_vec3(ft_cget_node_child( ft_cget_node_child(light_node, 1), 0)); if (light_node->children.size == 4) - light->color = node_to_linear_RGB(ft_cget_node_child(light_node, 3)); + light->color = node_to_linear_rgb(ft_cget_node_child(light_node, 3)); else light->color = (t_color){.x = 1, .y = 1, .z = 1}; return (ft_vec_append(lights, &element) != success); @@ -231,12 +232,15 @@ int add_camera(const t_parse_tree_node *camera_node, t_vec *cameras) camera->orientation = node_to_vec3(ft_cget_node_child(camera_node, 2)); camera->orientation = vec_normalize(camera->orientation); camera->up_direction = (t_vec3){.x = 0, .y = 0, .z = 1}; - camera->up_direction = vec_vec_mul(camera->orientation, camera->up_direction); + camera->up_direction = vec_vec_mul( + camera->orientation, camera->up_direction); if (vec_norm(camera->up_direction) < 1e-3) camera->up_direction = (t_vec3){.x = 0, .y = 1, .z = 0}; - camera->up_direction = vec_vec_mul(camera->up_direction, camera->orientation); + camera->up_direction = vec_vec_mul( + camera->up_direction, camera->orientation); camera->up_direction = vec_normalize(camera->up_direction); - camera->field_of_view = node_to_double(ft_cget_node_child(ft_cget_node_child(camera_node, 3), 0)) * M_PI / 180; + camera->field_of_view = node_to_double(ft_cget_node_child( + ft_cget_node_child(camera_node, 3), 0)) * M_PI / 180; return (ft_vec_append(cameras, &element) != success); } @@ -247,9 +251,10 @@ int add_plane(const t_parse_tree_node *plane_node, t_vec *objects) object.type = PLANE; plane = &object.object.plane; - plane->point = node_to_vec3(ft_cget_node_child(ft_cget_node_child(plane_node, 1), 0)); + plane->point = node_to_vec3( + ft_cget_node_child(ft_cget_node_child(plane_node, 1), 0)); plane->normal = node_to_vec3(ft_cget_node_child(plane_node, 2)); - plane->color = node_to_linear_RGB(ft_cget_node_child(plane_node, 3)); + plane->color = node_to_linear_rgb(ft_cget_node_child(plane_node, 3)); plane->normal = vec_normalize(plane->normal); return (ft_vec_append(objects, &object) != success); } @@ -261,9 +266,11 @@ int add_sphere(const t_parse_tree_node *sphere_node, t_vec *objects) object.type = SPHERE; sphere = &object.object.sphere; - sphere->center = node_to_vec3(ft_cget_node_child(ft_cget_node_child(sphere_node, 1), 0)); - sphere->radius = node_to_double(ft_cget_node_child(ft_cget_node_child(sphere_node, 2), 0)) / 2; - sphere->color = node_to_linear_RGB(ft_cget_node_child(sphere_node, 3)); + sphere->center = node_to_vec3( + ft_cget_node_child(ft_cget_node_child(sphere_node, 1), 0)); + sphere->radius = node_to_double( + ft_cget_node_child(ft_cget_node_child(sphere_node, 2), 0)) / 2; + sphere->color = node_to_linear_rgb(ft_cget_node_child(sphere_node, 3)); return (ft_vec_append(objects, &object) != success); } @@ -274,13 +281,17 @@ int add_cylinder(const t_parse_tree_node *cylinder_node, t_vec *objects) object.type = CYLINDER; cylinder = &object.object.cylinder; - cylinder->center = node_to_vec3(ft_cget_node_child(ft_cget_node_child(cylinder_node, 1), 0)); + cylinder->center = node_to_vec3( + ft_cget_node_child(ft_cget_node_child(cylinder_node, 1), 0)); cylinder->rot_axis = node_to_vec3(ft_cget_node_child(cylinder_node, 2)); cylinder->rot_axis = vec_normalize(cylinder->rot_axis); - cylinder->color = node_to_linear_RGB(ft_cget_node_child(cylinder_node, 5)); - cylinder->radius = node_to_double(ft_cget_node_child(ft_cget_node_child(cylinder_node, 3), 0)) / 2; - cylinder->height = node_to_double(ft_cget_node_child(ft_cget_node_child(cylinder_node, 4), 0)); - object.object.sphere.color = node_to_linear_RGB(ft_cget_node_child(cylinder_node, 5)); + cylinder->color = node_to_linear_rgb(ft_cget_node_child(cylinder_node, 5)); + cylinder->radius = node_to_double( + ft_cget_node_child(ft_cget_node_child(cylinder_node, 3), 0)) / 2; + cylinder->height = node_to_double( + ft_cget_node_child(ft_cget_node_child(cylinder_node, 4), 0)); + object.object.sphere.color + = node_to_linear_rgb(ft_cget_node_child(cylinder_node, 5)); return (ft_vec_append(objects, &object) != success); } @@ -293,31 +304,21 @@ int add_element_to_scene(const t_parse_tree_node *element, t_scene *scene) type = specific_element->token.type; if (!ft_strcmp(type, "ambient_light")) set_ambient_light(specific_element, &scene->ambient_light); - else if (!ft_strcmp(type, "light")) - { - if (add_light(specific_element, &scene->lights)) - return (1); - } - else if (!ft_strcmp(type, "camera")) - { - if (add_camera(specific_element, &scene->cameras)) - return (1); - } - else if (!ft_strcmp(type, "sphere")) - { - if (add_sphere(specific_element, &scene->objects)) - return (1); - } - else if (!ft_strcmp(type, "plane")) - { - if (add_plane(specific_element, &scene->objects)) - return (1); - } - else if (!ft_strcmp(type, "cylinder")) - { - if (add_cylinder(specific_element, &scene->objects)) - return (1); - } + else if (!ft_strcmp(type, "light") + && add_light(specific_element, &scene->lights)) + return (1); + else if (!ft_strcmp(type, "camera") + && add_camera(specific_element, &scene->cameras)) + return (1); + else if (!ft_strcmp(type, "sphere") + && add_sphere(specific_element, &scene->objects)) + return (1); + else if (!ft_strcmp(type, "plane") + && add_plane(specific_element, &scene->objects)) + return (1); + else if (!ft_strcmp(type, "cylinder") + && add_cylinder(specific_element, &scene->objects)) + return (1); return (0); } @@ -345,16 +346,13 @@ int parse_rt_file(const char *filename, t_scene *scene) if (!tokenize(filename, &tokens)) { if (ft_parsing_table_init(&parsing_table) == success - && ft_parsing_table_load_str(&parsing_table, g_parsing_table, g_grammar) - == success) + && ft_parsing_table_load_str + (&parsing_table, g_parsing_table, g_grammar) == success) { parse_tree = ft_parse(&tokens, &parsing_table); - if (parse_tree && !parse_tree_to_scene(parse_tree, scene)) - if (scene->cameras.size > 0) - { - scene->current_camera_ind = 0; - res = 0; - } + if (parse_tree && !parse_tree_to_scene(parse_tree, scene) + && scene->cameras.size > 0) + res = 0; ft_parse_tree_free(parse_tree); } ft_parsing_table_free(&parsing_table); @@ -389,6 +387,7 @@ int parse_args(int argc, char **argv, t_session *s) s->scene.current_element = NULL; s->scene.relative_directions = 1; s->scene.current_light_ind = 0; + s->scene.current_camera_ind = 0; got_file = 0; if (argc % 2 == 0) return (1); diff --git a/src/scene.c b/src/scene.c index 6f5c8c7..15f6988 100644 --- a/src/scene.c +++ b/src/scene.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* scene.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ljiriste +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/13 19:41:36 by ljiriste #+# #+# */ +/* Updated: 2025/01/13 19:43:04 by ljiriste ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "vec3.h" #include "miniRT.h" #include "libft.h" @@ -11,9 +23,9 @@ # error "This platform does not support NAN macro!" #endif // NAN -static const t_color DEFAULT_COLOR = {0, 0, 0}; +static const t_color g_default_color = {0, 0, 0}; -static const double SELF_OBSTRUCTION_MULTIPLIER = 1e-8; +static const double g_self_obstruction_multiplier = 1e-8; static int is_bounded(const t_object *object) { @@ -47,7 +59,7 @@ double dist_point_from_line(const t_ray *ray, t_vec3 point) double dist_point_from_plane(const t_plane *plane, t_vec3 point) { return (fabs(vec_scalar_mul(plane->normal, - vec_diff(point, plane->point)))); + vec_diff(point, plane->point)))); } int is_behind_ray(const t_ray *ray, t_vec3 point) @@ -66,10 +78,11 @@ t_sphere get_circumsphere(const t_object *object) } else if (object->type == CYLINDER) { - circumsphere.radius = get_cylinder_circumsphere_radius(&object->object.cylinder); + circumsphere.radius + = get_cylinder_circumsphere_radius(&object->object.cylinder); circumsphere.center = object->object.cylinder.center; } - else if(object->type == PLANE) + else if (object->type == PLANE) { circumsphere.radius = INFINITY; circumsphere.center = object->object.plane.point; @@ -83,7 +96,9 @@ int intersects_circumsphere(const t_ray *ray, const t_object *object) double distance; circumsphere = get_circumsphere(object); - if (is_behind_ray(ray, vec_add(circumsphere.center, vec_real_mul(ray->direction, circumsphere.radius)))) + if (is_behind_ray(ray, vec_add( + circumsphere.center, + vec_real_mul(ray->direction, circumsphere.radius)))) return (0); distance = dist_point_from_line(ray, circumsphere.center); return (distance < circumsphere.radius); @@ -97,10 +112,11 @@ double get_intersection_arg_plane(const t_ray *ray, const t_plane *plane) ft_vec_init(&res, sizeof(double)); start = vec_diff(plane->point, ray->start); return (vec_scalar_mul(plane->normal, start) - / vec_scalar_mul(plane->normal, ray->direction)); + / vec_scalar_mul(plane->normal, ray->direction)); } -t_vec get_intersection_arg_nonbounded(const t_ray *ray, const t_object *object) +t_vec get_intersection_arg_nonbounded( + const t_ray *ray, const t_object *object) { t_vec res; double tmp; @@ -119,20 +135,24 @@ t_vec3 ray_point(const t_ray *ray, double arg) return (vec_add(ray->start, vec_real_mul(ray->direction, arg))); } -t_vec get_intersection_arg_cylinder_base - (const t_ray *ray, const t_cylinder *cylinder) +t_vec get_intersection_arg_cylinder_base( + const t_ray *ray, const t_cylinder *cylinder) { t_vec res; double arg; t_plane base; ft_vec_init(&res, sizeof(double)); - base.point = vec_add(cylinder->center, vec_real_mul(cylinder->rot_axis, cylinder->height / 2)); + base.point = vec_add( + cylinder->center, + vec_real_mul(cylinder->rot_axis, cylinder->height / 2)); base.normal = cylinder->rot_axis; arg = get_intersection_arg_plane(ray, &base); if (vec_norm(vec_diff(base.point, ray_point(ray, arg))) <= cylinder->radius) ft_vec_append(&res, &arg); - base.point = vec_diff(cylinder->center, vec_real_mul(cylinder->rot_axis, cylinder->height / 2)); + base.point = vec_diff( + cylinder->center, + vec_real_mul(cylinder->rot_axis, cylinder->height / 2)); arg = get_intersection_arg_plane(ray, &base); if (vec_norm(vec_diff(base.point, ray_point(ray, arg))) <= cylinder->radius) ft_vec_append(&res, &arg); @@ -157,8 +177,8 @@ t_pair solve_quadratic(double a, double b, double c) return (res); } -t_vec get_intersection_arg_cylinder_around - (const t_ray *ray, const t_cylinder *cylinder) +t_vec get_intersection_arg_cylinder_around( + const t_ray *ray, const t_cylinder *cylinder) { t_vec res; t_pair args; @@ -172,16 +192,20 @@ t_vec get_intersection_arg_cylinder_around args = solve_quadratic(vec_scalar_mul(v, v), 2 * vec_scalar_mul(v, u), vec_scalar_mul(u, u) - cylinder->radius * cylinder->radius); intersect = ray_point(ray, args.first); - if (fabs(vec_scalar_mul(cylinder->rot_axis, vec_diff(intersect, cylinder->center))) < cylinder->height / 2) + if (fabs(vec_scalar_mul( + cylinder->rot_axis, vec_diff(intersect, cylinder->center))) + < cylinder->height / 2) ft_vec_append(&res, &args.first); intersect = ray_point(ray, args.second); - if (fabs(vec_scalar_mul(cylinder->rot_axis, vec_diff(intersect, cylinder->center))) < cylinder->height / 2) + if (fabs(vec_scalar_mul( + cylinder->rot_axis, vec_diff(intersect, cylinder->center))) + < cylinder->height / 2) ft_vec_append(&res, &args.second); return (res); } -t_vec get_intersection_arg_cylinder - (const t_ray *ray, const t_cylinder *cylinder) +t_vec get_intersection_arg_cylinder( + const t_ray *ray, const t_cylinder *cylinder) { size_t i; t_vec res; @@ -191,7 +215,7 @@ t_vec get_intersection_arg_cylinder res = get_intersection_arg_cylinder_base(ray, cylinder); res2 = get_intersection_arg_cylinder_around(ray, cylinder); i = 0; - while (i start, sphere->center); intersection_args = solve_quadratic( - vec_scalar_mul(ray->direction, ray->direction), - 2 * vec_scalar_mul(ray->direction, start), - vec_scalar_mul(start, start) - sphere->radius * sphere->radius); + vec_scalar_mul(ray->direction, ray->direction), + 2 * vec_scalar_mul(ray->direction, start), + vec_scalar_mul(start, start) - sphere->radius * sphere->radius); if (!isnan(intersection_args.first)) ft_vec_append(&res, &intersection_args.first); if (!isnan(intersection_args.second)) @@ -268,7 +292,7 @@ double get_intersection_arg_min(const t_ray *ray, const t_object *object) double get_self_obstruction_limit(const t_object *object) { - return (get_circumsphere(object).radius * SELF_OBSTRUCTION_MULTIPLIER); + return (get_circumsphere(object).radius * g_self_obstruction_multiplier); } t_obstruction find_nearest_obstruction(const t_ray *ray, t_vec *objects, @@ -311,8 +335,8 @@ t_obstruction find_nearest_obstruction(const t_ray *ray, t_vec *objects, t_color get_ambient_color(const t_object *object, const t_ambient_light *amb) { return (vec_real_mul( - vec_elwise_mul(amb->color, object->object.plane.color), - amb->brightness)); + vec_elwise_mul(amb->color, object->object.plane.color), + amb->brightness)); } t_vec3 get_cylinder_normal(t_vec3 point, const t_cylinder *cylinder) @@ -352,7 +376,8 @@ t_vec3 get_object_normal(const t_object *object, t_vec3 point) return ((t_vec3){.x = 0, .y = 0, .z = 0}); } -t_color get_light_contribution(t_ray normal, const t_object *object, const t_light *light, t_scene *scene) +t_color get_light_contribution(t_ray normal, const t_object *object, + const t_light *light, t_scene *scene) { t_ray new_ray; t_obstruction obstruction; @@ -372,8 +397,8 @@ t_color get_light_contribution(t_ray normal, const t_object *object, const t_lig || distance < obstruction.distance ||obstruction.distance < 0)) return (vec_real_mul( - vec_elwise_mul(light->color, object->object.plane.color), - light->brightness * angle_multiplier / distance / distance)); + vec_elwise_mul(light->color, object->object.plane.color), + light->brightness * angle_multiplier / distance / distance)); else return ((t_color){.x = 0, .y = 0, .z = 0}); } @@ -387,15 +412,20 @@ t_color get_object_color(const t_ray *ray, const t_object *object, size_t i; result = (t_color){.x = 0, .y = 0, .z = 0}; - normal_at_intersect.start = ray_point(ray, get_intersection_arg_min(ray, object)); - normal_at_intersect.direction = get_object_normal(object, normal_at_intersect.start); + normal_at_intersect.start + = ray_point(ray, get_intersection_arg_min(ray, object)); + normal_at_intersect.direction + = get_object_normal(object, normal_at_intersect.start); if (vec_scalar_mul(normal_at_intersect.direction, ray->direction) > 0) - normal_at_intersect.direction = vec_real_mul(normal_at_intersect.direction, -1); + normal_at_intersect.direction + = vec_real_mul(normal_at_intersect.direction, -1); i = 0; while (i < scene->lights.size) { - light = &((const t_element *)ft_vec_caccess(&scene->lights, i))->object.light; - if (vec_scalar_mul(normal_at_intersect.direction, vec_diff(light->position, normal_at_intersect.start)) > 0) + light = &((const t_element *) + ft_vec_caccess(&scene->lights, i))->object.light; + if (vec_scalar_mul(normal_at_intersect.direction, + vec_diff(light->position, normal_at_intersect.start)) > 0) result = vec_add(result, get_light_contribution( normal_at_intersect, object, light, scene)); @@ -413,5 +443,5 @@ t_color trace_ray(const t_ray *ray, t_scene *scene) if (object_found) return (get_object_color(ray, object_found, scene)); else - return (DEFAULT_COLOR); + return (g_default_color); } diff --git a/src/vec3.c b/src/vec3.c index 813c262..a0a54a3 100644 --- a/src/vec3.c +++ b/src/vec3.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* vec3.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: ljiriste +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/01/13 19:44:03 by ljiriste #+# #+# */ +/* Updated: 2025/01/13 19:44:28 by ljiriste ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "vec3.h" #include