Use t_object (t_element) for lights and cameras
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 6 Dec 2024 11:42:30 +0000 (12:42 +0100)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 6 Dec 2024 11:42:30 +0000 (12:42 +0100)
commit8ff330c0ae56540897e776454a00c893dd47468e
tree2984fed8d92e61af1feebf34391e7db0a57902cb
parent1b77584675385177fba0aafdb3c68e93fd076e06
Use t_object (t_element) for lights and cameras

This is because manipulation (translation and rotation) has to be
implemented not just for objects but for lights and cameras also.
It would be better to create a separate union from t_object, but I
cannot think of a way that would not be quite difficult to use.

The typedef t_element can be used for generic element, whereas t_object
should be used for objects (things casting shadow) only.

The vectors for lights and cameras was also changed to vectors of
t_element so that it is easy to pass it as a t_element pointer to change
it in place.
inc/miniRT.h
src/main.c
src/parsing.c
src/scene.c