示例#1
0
文件: mainator.c 项目: gabfou/RT
void	init(t_env *e)
{
	e->l = 0;
	e->o.pos.x = 0;
	e->o.pos.y = 0;
	e->o.pos.z = 0;
	e->o.dir.x = 0;
	e->o.dir.y = 0;
	e->o.dir.z = 1;
	superparsator(e);
	e->o = initcam(e->o);
	if (e->l == 0)
		error("pas de lumiere");
	e->mlx = mlx_init();
	e->win = mlx_new_window(e->mlx, TV, TH, "RVT1");
	e->img = mlx_new_image(e->mlx, TV, TH);
	e->addr = mlx_get_data_addr(e->img, &(e->bpp), &(e->sizel), &(e->endian));
	e->o.d = 1;
	e->o.h = 0.35;
	e->o.l = 0.5;
	e->o.vpul = vpulcalculator(e->o);
	e->c.x = 0;
	e->c.y = 0;
	e->c.z = 0;
	e->c2.x = 1;
	e->c2.y = 1;
	e->c2.z = 1;
	e->test2 = 0;
	// printf("vpulx = %f vpuly = %f vpulz = %f\n", (double)e->o.vpul.x, (double)e->o.vpul.y, (double)e->o.vpul.z);
}
示例#2
0
int camStart()
{
	int ret = 0;
	flagexit = false;
	ret = initcam();

	handle_stdin(&dev, "start");
	return ret;
}