Skip to content

Fix/norm#41

Merged
RafaelyRezende merged 8 commits intodevelopmentfrom
fix/norm
Mar 10, 2026
Merged

Fix/norm#41
RafaelyRezende merged 8 commits intodevelopmentfrom
fix/norm

Conversation

@JulioSouza09
Copy link
Collaborator

Fixed norm and refactored lots of code

JulioSouza09 and others added 7 commits March 6, 2026 18:22
- Add parser_string_utils.c with skip_to_next function
- Add object_transform_utils.c with align_up_vector function
- Add shape_utils.c with get_shape_id function
- Add cylinder_utils.c with check_caps function
- Add canvas_utils.c utilities

These new files address norminette violations by extracting functions
from files that exceeded the 5-function limit per file.
- Add align_up_vector prototype to matrix.h
- Add check_caps prototype to ray.h

These prototypes support the extracted utility functions
for norminette compliance.
- Add parser_string_utils.c to PARSE_SRCS
- Add object_transform_utils.c to MATRIX_SRCS
- Add shape_utils.c and cylinder_utils.c to RAY_SRCS

These updates ensure new utility files are properly compiled
and linked into the project.
- Remove extracted functions from parse_objects.c (align_up_vector)
- Remove extracted functions from parser_utils.c (skip_to_next)
- Remove extracted functions from cylinder.c (check_caps)
- Remove extracted functions from shape.c (get_shape_id)
- Refactor cylinder.c to fix TOO_MANY_VARS and TOO_MANY_LINES
  by adding helper functions calc_cylinder_quadratic and
  add_valid_intersection
- Update includes to reference extracted functions

All files now pass norminette checks except for INVALID_HEADER
which is excluded from fixes as requested.
Split oversized source files to satisfy function-count and line limits.

Reduce argument and variable pressure in scene/shading APIs using compact data structs where needed.

Add dedicated files for matrix ops, lighting, camera/ray rendering, refraction helpers, and vector operations while preserving behavior.

Update call sites, headers, and Makefile source lists to keep builds consistent after file splits.
Align reflection test with current render signature by initializing canvas.mlx and using render() as void.

Update parsing tests to current scene/world structure, camera fields, fixture paths, and object expectations.

Resolve EPSILON macro clash in parsing_test and keep parser runtime assertions passing (53/53).
Copy link
Contributor

@RafaelyRezende RafaelyRezende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@RafaelyRezende RafaelyRezende merged commit c7ae3a8 into development Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants