t_hit * intersection(float t, t_shape *shape)
Creates a hit record for an intersection.
Definition: intersections.c:18
The struct s_color stores the color values of ray tracing. It contains a field for red,...
Definition: tuples.h:63
This structure of type t_comps stores some precomputed values that are useful when working intersecti...
Definition: world.h:66
The structure t_hit stores a linked list of ray-shape intersections' values.
Definition: shapes.h:134
The struct s_light represents a light's source. This source has a position in space and an intensity ...
Definition: lights.h:44
The struct of type t_ray represents a ray, which is the foundation for ray casting....
Definition: rays.h:28
The struct s_sight represents the human eye looking forwards.
Definition: lights.h:62
Tuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordin...
Definition: tuples.h:33
This struct contains everything related to the building of a ray tracing's world. The world has objec...
Definition: world.h:37
Represents a shape in a scene.
t_tuple point(double x, double y, double z)
This function is a simplification of the function tuple(). It will create a point with the given coor...
Definition: models.c:20
t_hit * intersect_world(t_world *world, t_ray ray)
Finds all intersections between a ray and all objects in the world.
Definition: world.c:15
t_bool is_shadowed(t_world *world, t_point point, int index)
Determines whether a point in a world is in shadow or not.
Definition: shadows.c:15
t_comps prepare_computations(t_hit *intersection, t_ray ray)
Precomputes information related to an intersection.
Definition: world.c:31
struct s_world t_world
This struct contains everything related to the building of a ray tracing's world. The world has objec...
t_color color_at(t_world world, t_ray ray)
Computes the color at the intersection of a given ray with a world.
Definition: world.c:73
struct s_comps t_comps
This structure of type t_comps stores some precomputed values that are useful when working intersecti...
t_color shade_hit(t_world world, t_comps comps)
Computes the color at an intersection in the given world.
Definition: world.c:50