miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
rays.h
Go to the documentation of this file.
1 /* ************************************************************************** */
2 /* */
3 /* ::: :::::::: */
4 /* rays.h :+: :+: :+: */
5 /* +:+ +:+ +:+ */
6 /* By: yde-goes <yde-goes@student.42sp.org.br> +#+ +:+ +#+ */
7 /* +#+#+#+#+#+ +#+ */
8 /* Created: 2023/04/06 10:17:15 by mdias-ma #+# #+# */
9 /* Updated: 2023/06/16 13:40:17 by yde-goes ### ########.fr */
10 /* */
11 /* ************************************************************************** */
12 
14 #ifndef RAYS_H
15 # define RAYS_H
16 
17 # include "matrices.h"
18 
27 typedef struct s_ray
28 {
29  t_point origin;
30  t_vector direction;
32 
33 /* ************************************************************************** */
34 /* RAYS.C */
35 /* ************************************************************************** */
36 
47 t_ray new_ray(t_point origin, t_vector direction);
48 
61 t_point position(t_ray ray, float distance);
62 
74 t_ray transform(t_ray ray, t_matrix matrix);
75 
76 #endif
t_ray transform(t_ray ray, t_matrix matrix)
The function transform() multiplies a given ray by a given matrix, which results in an unnormalized r...
Definition: rays.c:27
struct s_ray t_ray
The struct of type t_ray represents a ray, which is the foundation for ray casting....
t_point position(t_ray ray, float distance)
The function position() finds the position of a given ray and a given time or distance....
Definition: rays.c:22
t_ray new_ray(t_point origin, t_vector direction)
The function new_ray() creates and queries a ray with the given origin and direction passed as parame...
Definition: rays.c:15
The struct t_matrix stores a matrix up to 4x4 and size of 16. A matrix is a grid of numbers that can ...
Definition: matrices.h:34
The struct of type t_ray represents a ray, which is the foundation for ray casting....
Definition: rays.h:28
Tuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordin...
Definition: tuples.h:33