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

The struct s_exposure contains the necessary fields to calculate the a scene's lighting. Exposure is a technical term from photography that means exposition to light. More...

#include <materials.h>

Collaboration diagram for s_exposure:

Data Fields

t_color effective_color
 
t_vector lightv
 
t_vector reflectv
 
float light_dot_normal
 
float reflect_dot_eye
 
float factor
 

Detailed Description

The struct s_exposure contains the necessary fields to calculate the a scene's lighting. Exposure is a technical term from photography that means exposition to light.

Parameters
effective_colorCombines the surface colo with light's color/ intensity.
lightvFinds the direction to the light source.
reflectvFinds the direction to the light reflection.
light_dot_normalRepresents the cosine of the angle between the light vector and the normal vector. A negative number means the light is on the other side of the surface.
reflect_dot_eyeRepresents the cosine of the angle between the reflection vector and the eye vector. A negative number means the light reflects away from the eye.
factorComputes the specular contribution.