Example #1
0
t_matrix	ft_rotate_matrix_z(float rot)
{
	t_matrix	m;

	m.x = ft_make_vector(cosf(rot), -sinf(rot), 0.0f);
	m.y = ft_make_vector(sinf(rot), cosf(rot), 0.0f);
	m.z = ft_make_vector(0.0f, 0.0f, 1.0f);
	return (m);
}
Example #2
0
t_matrix	ft_make_matrix_y(float rad)
{
	t_matrix	m;

	m.x = ft_make_vector(cosf(rad), 0.0f, sinf(rad));
	m.y = ft_make_vector(0.0f, 1.0f, 0.0f);
	m.z = ft_make_vector(-sinf(rad), 0.0f, cosf(rad));
	return (m);
}