Commit Graph

142 Commits

Author SHA1 Message Date
Recep Aslantas
8e2074c274 Merge branch 'master' into feature/glm_vec2_make 2023-07-02 22:03:40 +03:00
Recep Aslantas
b8d565c6b6 Merge branch 'master' into feature/glm_vec4_make 2023-07-02 22:02:10 +03:00
Vincent Davis Jr
5833d1bf44 vec4: add new function glm_vec4_make
Function takes in a float array. Array must be
at least of size 4 and converts it into
a 4D vector.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-07-02 13:54:10 -05:00
Vincent Davis Jr
aeeeac4c5a vec3: add new function glm_vec3_make
Function takes in a float array. Array must be
at least of size 3 and converts it into
a 3D vector.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-07-02 13:25:25 -05:00
Vincent Davis Jr
b3de85a14e vec2: add new function glm_vec2_make
Just a copy of glm_vec2, but with the
word _make suffixed at the end.

Function takes in a float array array must be
at least of size 2 and converts it into
a 2D vector.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-07-02 12:41:23 -05:00
Vincent Davis Jr
bfe5ea6ab7 quat: add new function glm_quat_make
Function takes in a 4 element float array
and converts it into a quaternion.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-06-28 22:49:49 -05:00
Recep Aslantas
31cbd41e3b Merge pull request #302 from EasyIP2023/feature/glm_mat3_make
mat3: add new function glm_mat3_make
2023-05-15 11:18:41 +03:00
Recep Aslantas
c691bc5bc0 Merge pull request #301 from EasyIP2023/feature/glm_mat2_make
mat2: add new function glm_mat2_make
2023-05-15 11:18:27 +03:00
Vincent Davis Jr
0566a040c0 mat3: add new function glm_mat3_make
Function takes in a 9 element float array
and converts it into a mat3 matrix.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-05-14 20:56:25 -05:00
Vincent Davis Jr
e6681e78c8 mat2: add new function glm_mat2_make
Function takes in a 4 element float array
and converts it into a mat2 matrix.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-05-14 20:30:36 -05:00
Vincent Davis Jr
e17f115f91 mat4: add new function glm_mat4_make
Function takes in a 16 element float array
and converts it into a mat4 matrix.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
2023-05-14 20:10:48 -05:00
duarm
a0f01c5ed1 new abs functions for vec2, ivec2, ivec3, ivec4 2022-11-18 14:28:39 -03:00
Recep Aslantas
7c62ad965b add missing call functions 2022-10-23 12:08:37 +03:00
Recep Aslantas
7c7ac8b82e add missing impl for project_z 2022-10-22 23:06:46 +03:00
Recep Aslantas
ba66459708 new project function for projecting Z
someitmes we need to project z only. this function reduces a few calculations and parameters.
2022-10-21 10:20:03 +03:00
Recep Aslantas
c0bd65027a add missing spin impl 2022-10-18 07:38:06 +03:00
Christopher Lang
1b3e2fdaec Improve ivec[2|3|4] documentation comments 2022-05-20 15:24:36 +01:00
Christopher Lang
94a1e6f6e1 Add ivec4 functions 2022-05-19 17:43:17 +01:00
Christopher Lang
7a19b8f8a3 Fix glmc_ivec3 naming 2022-05-19 16:52:10 +01:00
Christopher Lang
65409bcda1 Add ivec3 functions 2022-05-18 18:05:17 +01:00
Christopher Lang
a85744430a Add ivec2 functions 2022-05-17 22:25:10 +01:00
Christopher Lang
d582146d9a Add ivec3 and ivec4 files 2022-05-17 16:04:47 +01:00
Christopher Lang
4c85b970a9 Add ivec2 files 2022-05-16 22:41:04 +01:00
Maxim Kasyanenko
b7178749ee Forgot to add the dynamic implementation file itself 2021-11-08 17:53:27 -08:00
Recep Aslantas
8427d02a9b pick matrix helper (aka gluPickMatrix) 2021-08-16 16:53:46 +03:00
Recep Aslantas
a2bd00df32 fix including headers, and suppress warnings 2021-08-16 15:51:52 +03:00
Recep Aslantas
29c3837672 implement project zo 2021-08-16 14:16:43 +03:00
Recep Aslantas
9ed4e41afd call version for clipspace-project 2021-08-16 01:08:11 +03:00
Sundaram Ramaswamy
b5802b99b2 Compute quaternion rotating a vector into another
Both `vec3` inputs should be of unit length; returns a unit quaternion.
2021-06-10 23:10:54 +05:30
Tai Chi Minh Ralph Eastwood
8ddb5d5740 build: fix incorrect include paths for libcglm 2021-05-14 16:58:48 +02:00
Tai Chi Minh Ralph Eastwood
7065011bf3 clipspace: add initial implementations LH, RH and NO, ZO
Add the initial implementations of the left-handed and right-handed
coordinate systems as well as clipspace depth values of [-1, 0] and
[0, 1].
2021-05-13 23:22:58 +02:00
michaelg
c013bd462c Add LH & RH_NO perspective functions
This commit adds functions `glm_perspective_lh_no` and
`glm_perspective_rh_no` to the code. Unit tests are added and this
commit follows the new pattern of adding the a new file per
coordinate-system and clip-space tuple.

. Makefile.am updated
. removed test/glm_cmp project stub
. unit tests include naive implementations to as well as magic number
  ref-data generated by the corresponding GLM functions.

No tests run yet on Windows or Mac.
2021-05-13 23:18:05 +02:00
michaelg
b3a18b8a15 Add glm_perspective_rh_zo function + tests
This commit adds the RH/ZO perspective function. It does so in the new
file `cam_rh_zo.h` and further refactors the LH variant into new file
`cam_lh_zo.h`. This creates some churn in the tests and configuration
files as new test files were added as well, and all these changes found
their way into the build files.

Tests passing on Linux.
2021-05-13 23:18:05 +02:00
Recep Aslantas
a242d83805 style: rename nearVal, farVal to nearZ and farZ 2021-05-08 22:42:44 +03:00
Sundaram Ramaswamy
8ce45b4303 Add call and struct interfaces 2021-05-07 00:35:20 +05:30
Serhii Mumriak
2e5257bcc1 Updated 160 PR according review comments. 2020-09-07 17:09:37 -07:00
Recep Aslantas
b133c2e3e3 2d: add rotate2d and its friends 2020-07-31 15:11:00 +03:00
Recep Aslantas
0127d30fa8 2d: add scale2d and its friends 2020-07-31 13:49:33 +03:00
Recep Aslantas
bb751d32ca 2d: add translate2d and its friends 2020-07-31 11:40:52 +03:00
Recep Aslantas
099522ada3 fix LICENSE alignments 2020-05-02 22:32:57 +03:00
Recep Aslantas
fefc3dc32d io: print has been maden optional to DEBUG or to CGLM_DEFINE_PRINTS 2020-04-30 23:38:27 +03:00
Uwila
339adab783 Align variables in ray code 2020-04-03 17:56:53 +02:00
Uwila
c67f7a14a1 Add ray-triangle intersection check 2020-04-02 14:28:28 +02:00
Recep Aslantas
43ae3b332a add tests for vec2 and its call version 2020-02-24 10:06:19 +03:00
Recep Aslantas
8a068c3291 Merge branch 'master' into vec2_mat2 2020-02-23 13:10:36 +03:00
Recep Aslantas
2278eba93c quat: fix quat_for and quat_forp implementations 2020-02-20 23:37:35 +03:00
Recep Aslantas
2ea9308361 quat: fix glmc_quat_normalize() 2019-09-25 07:41:29 +03:00
Recep Aslantas
dcf5b5c1c4 vec: fix min/max for compiled vec3 2019-09-24 17:01:56 +03:00
Recep Aslantas
7b25cbb9cb vec: fix min/max for compiled vec3 2019-09-22 23:25:33 +03:00
Recep Aslantas
79087a9813 mat4: add zero for call 2019-09-18 23:33:10 +03:00