light.c
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   light.c                                            :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: salee2 <salee2@student.42seoul.kr>         +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2023/05/24 20:22:11 by salee2            #+#    #+#             */
 9  /*   Updated: 2023/05/24 20:22:13 by salee2           ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #include "include/minirt.h"
14  
15  t_light	*light_point(t_point3 origin, t_color3 color, double bright_ratio)
16  {
17  	t_light *this;
18  
19  	this = (t_light*) malloc(sizeof(t_light));
20  	if (this == NULL)
21  		return (NULL);
22  	this->origin = origin;
23  	this->color = color;
24  	this->bright_ratio = bright_ratio;
25  	return (this);
26  }