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

The structure of type t_camera contains the necessary information for camera configuration, rendering and transformation. More...

#include <camera.h>

Collaboration diagram for s_camera:

Data Fields

float hsize
 
float vsize
 
float field_of_view
 
float half_width
 
float half_height
 
float pixel_size
 
t_matrix transform
 
t_matrix inverse
 
t_matrix transpose
 

Detailed Description

The structure of type t_camera contains the necessary information for camera configuration, rendering and transformation.

ABOUT THE HEADER CAMERA.H

This header contains all functions regarding camera implementation.

Parameters
hsizeStores the horizontal size (in pixels).
vsizeStores the vertical size (in pixels).
field_of_viewThis field stores angle that describes how much the camera can see. When the field of view is small, the view will be "zoomed in", magnifying a smaller area of the scene.
half_widthStores the camera's half hsize value.
half_heightStores the camera's half vsize value.
pixel_sizeStores the camera's pixel size calculated from half_width and hsize values.
transformStores the transformation matrix for the camera.
inverseStores the inverse matrix for the camera.
transposeStores the transpose matrix for the camera.