aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/src/mat4/ftm_mat4init_frustum_sym.c
blob: 276376546ec892ef649a78d8dcf2d9d25247540a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ftm_mat4init_frustum_sym.c                         :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: charles <charles.cabergs@gmail.com>        +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/05/12 15:47:45 by charles           #+#    #+#             */
/*   Updated: 2020/05/12 17:21:06 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libftm_mat4.h"

t_ftmmat4	*ftm_mat4init_frustum_sym(t_ftmmat4 *mat4, t_ftmfrustum_sym *frustum)
{
	t_ftmfrustum	f;

	f.right = frustum->width / 2;
	f.left = -f.right;
	f.top = frustum->height / 2;
	f.bottom = -f.top;
	f.near = frustum->near;
	f.far = frustum->far;
	return (ftm_mat4init_frustum(mat4, &f));
}