miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
s_world Struct Reference

This struct contains everything related to the building of a ray tracing's world. The world has objects (or shapes), point lights and an ambient color. Together, these elements makes the scene rendering possible. More...

#include <world.h>

Collaboration diagram for s_world:

Data Fields

t_hitxs
 
int object_count
 
t_shapeobjects
 
int light_count
 
t_lightlights
 
t_color ambient
 

Detailed Description

This struct contains everything related to the building of a ray tracing's world. The world has objects (or shapes), point lights and an ambient color. Together, these elements makes the scene rendering possible.

Parameters
xsA struct of type t_hit that stores intersections' values, if any.
object_countStores the information about how many shapes there are in the world.
objectsA list of objects (or shapes) that exist in the world. They can be a cone, a sphere, a plane or a cylinder.
light_countStores the information about how many point lights there are in the world.
lightsA list of point lights that exist in the world.
ambientRepresents the ambient color in the world.