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

Tuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordinate system, i.e, the thumb of your left hand points to x in the right direction, the fingers point to y and curling the fingers towards the palm point to z. More...

#include <tuples.h>

Data Fields

double x
 
double y
 
double z
 
double w
 

Detailed Description

Tuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordinate system, i.e, the thumb of your left hand points to x in the right direction, the fingers point to y and curling the fingers towards the palm point to z.

Parameters
xRepresents the value of the x-axis coordinate.
yRepresents the value of the y-axis coordinate.
zRepresents the value of the z-axis coordinate.
wDistinguishes the t_tuple between a vector or a point. If w = 0, then the tuple is a vector. Otherwise, if w = 1, the tuple is a point.