From d7bd9a3dbd3486a4b0615dc9f30a890ff6d04ec6 Mon Sep 17 00:00:00 2001 From: jvech Date: Mon, 29 Aug 2022 09:12:18 -0500 Subject: feat: 3D support added --- src/linear.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/linear.h') diff --git a/src/linear.h b/src/linear.h index 86b93d7..c5f40aa 100644 --- a/src/linear.h +++ b/src/linear.h @@ -13,17 +13,19 @@ typedef struct { float vector[3]; } vec3; -mat4 linearTranslatev(vec3 translate_vector); //TODO -mat4 linearScalev(vec3 scale_vector); //TODO +mat4 linearTranslatev(vec3 translate_vector); +mat4 linearRotatev(float degree, vec3 rotation_axis); +mat4 linearScalev(vec3 scale_vector); mat4 linearTranslate(float translate_x, float translate_y, float translate_z); mat4 linearScale(float scale_x, float scale_y, float scale_z); -mat4 linearRotate(float degree, vec3 rotation_axis); +mat4 linearRotate(float degree, float rotate_x, float rotate_y, float rotate_z); mat4 linearPerspective(float FoV, float ratio, float near, float far); mat4 linearLookAt(vec3 position, vec3 target, vec3 up); mat4 linearMat4Fill(float value); -mat4 linearMat4Identity(); +mat4 linearMat4Identity(float value); mat4 linearMat4Mul(mat4 x1, mat4 x2); +mat4 linearMat4Muln(int n, ...); mat4 linearMat4Transpose(mat4 x); mat4 linearMat4Inv(mat4 x); //TODO mat4 linearMat4Add(mat4 x1, mat4 x2); //TODO -- cgit v1.2.3-70-g09d2