aboutsummaryrefslogtreecommitdiff
path: root/vendor/libftm/src/mat4/ftm_mat4init_eye.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-12 14:14:06 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-12 14:14:06 +0200
commit7b214503608550dc2853b9e01526723f8c65baf3 (patch)
treeddbc37eb2627b43eb33774bd2bf205336cd1a9e6 /vendor/libftm/src/mat4/ftm_mat4init_eye.c
parentd07d87964f13d3c1e6ad8c2f6d7db21101f1ef34 (diff)
downloadscop-7b214503608550dc2853b9e01526723f8c65baf3.tar.gz
scop-7b214503608550dc2853b9e01526723f8c65baf3.tar.bz2
scop-7b214503608550dc2853b9e01526723f8c65baf3.zip
Added mat4 in libftm, can rotate, scale and translate vector
Diffstat (limited to 'vendor/libftm/src/mat4/ftm_mat4init_eye.c')
-rw-r--r--vendor/libftm/src/mat4/ftm_mat4init_eye.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/libftm/src/mat4/ftm_mat4init_eye.c b/vendor/libftm/src/mat4/ftm_mat4init_eye.c
new file mode 100644
index 0000000..d32f075
--- /dev/null
+++ b/vendor/libftm/src/mat4/ftm_mat4init_eye.c
@@ -0,0 +1,23 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ftm_mat4init_eye.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/05/12 11:10:44 by charles #+# #+# */
+/* Updated: 2020/05/12 12:17:21 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libftm_mat4.h"
+
+t_ftmmat4 *ftm_mat4init_eye(t_ftmmat4 *mat4, float x)
+{
+ ftm_mat4init_fill(mat4, 0.0);
+ ftm_mat4set(mat4, 0, 0, x);
+ ftm_mat4set(mat4, 1, 1, x);
+ ftm_mat4set(mat4, 2, 2, x);
+ ftm_mat4set(mat4, 3, 3, x);
+ return (mat4);
+}