<commit_before>/*
** rtv1.h for rtv1 in /home/lautel_m/rendu/MUL_2013_rtv1
** 
** Made by <NAME>
** Login   <<EMAIL>>
** 
** Started on  Mon Feb 24 11:26:26 2014 <NAME>
** Last update Sun Jun  1 20:28:57 2014 <NAME>
*/

# ifndef	_RTV1_H_
#define		_RTV1_H_

#include	<math.h>
#include	<mlx.h>
#include	<stdlib.h>
#include	<signal.h>
#include	<unistd.h>
#include	<sys/types.h>
#include	<sys/stat.h>
#include	<fcntl.h>
#include	<pthread.h>

typedef	struct	s_color
{
  int		r;
  int		v;
  int		b;
}		t_color;

typedef	struct	s_dot
{
  int		x;
  int		y;
}		t_dot;

typedef	struct	s_win
{
  int       	winx;
  int       	winy;
}		t_win;

typedef	struct	s_img
{
  void		*mlx_ptr;
  void		*win_ptr;
  void		*img_ptr;
  int       	imgx;
  int		imgy;
  char		*data;
}		t_img;

typedef	struct	s_sbe
{
  int		sizeline;
  int		bpp;
  int		endian;
}		t_sbe;

typedef	struct	s_eye
{
  int		xeye;
  int		yeye;
  int		zeye;
  double	Vx;
  double	Vy;
  double	Vz;
}		t_eye;

typedef	struct			s_obj
{
  struct	s_color		*color;
  struct	s_eye		*eye;
  struct	s_obj		*next;
  struct	s_obj		*prev;
  double			k;
  double			R;
  int				type;
}				t_obj;

typedef	struct		s_rtv1
{
  struct	s_img	*img;
  struct	s_win	*win;
  struct       	s_eye	*eye;
  struct	s_sbe	*sbe;
  struct	s_obj	*start;
  struct	s_obj	*end;
  int			lenght;
  pthread_mutex_t	mutex_lock;
}			t_rtv1;

typedef	struct	s_regionrtv1
{
  t_rtv1	*rtv1;
  int		y_start;
  int		y_limit;
}		t_regionrtv1;

void	start_rt(t_rtv1 *);
void	rt_initialisation(t_rtv1 *);
void	init_conf(t_rtv1 *, int, char **);
t_eye	*init_eyes(t_rtv1 *, int, int);
void	addrota(char *, int, t_obj *);
void	addcolo(char *, int, t_obj *);
void	addcoor(char *, int, t_obj *);
void	addtype(char *, int, t_obj *);
void	set_obj(t_rtv1 *, int);
void	addrayo(char *, int, t_obj *);
void	showlist(t_rtv1 *);
t_rtv1	*addlast(t_rtv1 *);
int	my_strcmp2(char *, char *, int);
int	my_strcmp(char *, char *);
int	my_strlen(char *);
void	my_putchar(char);
void	my_putstr(char *);
int	my_getnbr(char *);
char	*read_line(int);
int	aff_pixel(int, t_rtv1 *, int, int);
t_dot	get_dot(int, int);
t_color	get_color(int, int, int);
void	put_pixel_to_img(char *, t_dot, t_color, int);
int	calc_k(t_rtv1 *);
int	calcul_pixel(t_rtv1 *, int, int);
void	image_fill(t_rtv1 *);
int	gere_key(int, t_rtv1 *);
void	inter_plan(t_eye *, t_obj *);
void	inter_sphere(t_eye *, t_obj *);
void	inter_cone(t_eye *, t_obj *);
void	inter_cyl(t_eye *, t_obj *);


#endif	/* _RTV1_H_ */<commit_msg>petit indentation .h pr le plaisir des yeux<commit_after>/*
** rtv1.h for rtv1 in /home/lautel_m/rendu/MUL_2013_rtv1
** 
** Made by <NAME>
** Login   <<EMAIL>>
** 
** Started on  Mon Feb 24 11:26:26 2014 <NAME>
** Last update Tue Jun  3 15:41:36 2014 <NAME>
*/

#ifndef			RTV1_H_
# define		RTV1_H_

# include		<math.h>
# include		<mlx.h>
# include		<stdlib.h>
# include		<signal.h>
# include		<unistd.h>
# include		<sys/types.h>
# include		<sys/stat.h>
# include		<fcntl.h>
# include		<pthread.h>

typedef	struct		s_color
{
  int			r;
  int			v;
  int			b;
}			t_color;

typedef	struct		s_dot
{
  int			x;
  int			y;
}			t_dot;

typedef	struct		s_win
{
  int			winx;
  int			winy;
}			t_win;

typedef	struct		s_img
{
  void			*mlx_ptr;
  void			*win_ptr;
  void			*img_ptr;
  int			imgx;
  int			imgy;
  char			*data;
}			t_img;

typedef	struct		s_sbe
{
  int			sizeline;
  int			bpp;
  int			endian;
}			t_sbe;

typedef	struct		s_eye
{
  int			xeye;
  int			yeye;
  int			zeye;
  double		Vx;
  double		Vy;
  double		Vz;
}			t_eye;

typedef	struct	       	s_obj
{
  t_color		*color;
  t_eye			*eye;
  struct	s_obj  	*next;
  struct	s_obj  	*prev;
  double       		k;
  double       		R;
  int	       		type;
}	       		t_obj;

typedef	struct		s_rtv1
{
  t_img			*img;
  t_win			*win;
  t_eye			*eye;
  t_sbe			*sbe;
  t_obj			*start;
  t_obj			*end;
  int			lenght;
  pthread_mutex_t	mutex_lock;
}			t_rtv1;

typedef	struct		s_regionrtv1
{
  t_rtv1		*rtv1;
  int			y_start;
  int			y_limit;
}			t_regionrtv1;

void			start_rt(t_rtv1 *);
void			rt_initialisation(t_rtv1 *);
void			init_conf(t_rtv1 *, int, char **);
t_eye			*init_eyes(t_rtv1 *, int, int);
void			addrota(char *, int, t_obj *);
void			addcolo(char *, int, t_obj *);
void			addcoor(char *, int, t_obj *);
void			addtype(char *, int, t_obj *);
void			set_obj(t_rtv1 *, int);
void			addrayo(char *, int, t_obj *);
void			showlist(t_rtv1 *);
t_rtv1			*addlast(t_rtv1 *);
int			my_strcmp2(char *, char *, int);
int			my_strcmp(char *, char *);
int			my_strlen(char *);
void			my_putchar(char);
void			my_putstr(char *);
int			my_getnbr(char *);
char			*read_line(int);
int			aff_pixel(int, t_rtv1 *, int, int);
t_dot			get_dot(int, int);
t_color			get_color(int, int, int);
void			put_pixel_to_img(char *, t_dot, t_color, int);
int			calc_k(t_rtv1 *);
int			calcul_pixel(t_rtv1 *, int, int);
void			image_fill(t_rtv1 *);
int			gere_key(int, t_rtv1 *);
void			inter_plan(t_eye *, t_obj *);
void			inter_sphere(t_eye *, t_obj *);
void			inter_cone(t_eye *, t_obj *);
void			inter_cyl(t_eye *, t_obj *);
void			screenshot(t_rtv1 *);

#endif			/* !RTV1_H_ */
{'fraction_non_alphanumeric': 0.13372664700098327, 'fraction_numerical': 0.02104228121927237, 'mean_word_length': 3.1756978653530377, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2094421', 'n_tokens_mistral': 2769, 'n_tokens_neox': 2543, 'n_words': 547}