object.h
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   object.h                                           :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: gychoi <gychoi@student.42seoul.kr>         +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2023/05/25 20:04:13 by gychoi            #+#    #+#             */
 9  /*   Updated: 2023/05/28 20:13:36 by gychoi           ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #ifndef OBJECT_H
14  # define OBJECT_H
15  
16  # include "libvec.h"
17  
18  typedef int	t_object_type;
19  # define SP 0
20  
21  typedef struct s_object
22  {
23  	t_object_type	type;
24  	void			*element;
25  	void			*next;
26  	t_color3		albedo;
27  }	t_object;
28  
29  typedef struct s_sphere
30  {
31  	t_point3	center;
32  	double		radius;
33  }	t_sphere;
34  
35  t_object	*object(t_object_type type, void *element, t_color3 albedo);
36  t_sphere	*sphere(t_point3 center, double radius);
37  
38  #endif