Commit Graph

915 Commits

Author SHA1 Message Date
Christopher Lang
4c85b970a9 Add ivec2 files 2022-05-16 22:41:04 +01:00
Recep Aslantas
cf7f4231f0 now working on v0.8.6 2022-03-20 22:19:31 +03:00
geckor14
851a58cedb Remove unused variable
The most recent version of Apple Clang (13.1.6) on macOS complains r3 is an unused variable. With -Werror enabled, this breaks the build.
2022-03-18 18:42:19 +11:00
Michał Gallus
7e211e1f49 Fix bug in view_lh.h #2
Reverse order of parameters in the second crossproduct
2022-03-08 01:42:43 +01:00
Michał Gallus
7d47b7f1fd Fix a bug in glm_lookat_lh
Fix the order of arguments passed to glm_vec3_crossn to avoid the negation of X axis.
2022-03-08 01:29:35 +01:00
Recep Aslantas
2a4748d452 fix glm_pickmatrix()'s param type 2022-01-31 02:56:39 +03:00
Recep Aslantas
3a141b7cc8 extend unions for struct api 2022-01-06 18:12:46 +03:00
Recep Aslantas
5cd1a4ab44 add missing ivec types 2022-01-06 18:01:35 +03:00
Anonymous Maarten
68e3a072e8 Header containing sse3 intrinsics is pmmintrin.h 2021-12-29 08:48:55 +01:00
Maxim Kasyanenko
98c708281f Syntax errors 2021-11-08 17:52:47 -08:00
Maxim Kasyanenko
896ba0a0f9 Add dynamic/struct versions of routines 2021-11-08 17:52:31 -08:00
Maxim Kasyanenko
4603816330 Forgot return type 2021-11-08 17:09:28 -08:00
Maxim Kasyanenko
9f5cc3a745 Implement a few complex routines 2021-11-08 16:28:55 -08:00
Recep Aslantas
82d1050c63 update GLM_FLT_EPSILON to use 1e-5 instead of 1e-6 2021-10-06 21:08:55 +03:00
Recep Aslantas
0631598d08 now working on v0.8.5 2021-08-18 05:03:59 +03:00
Recep Aslantas
34e5704fe8 bump version to v0.8.4 2021-08-18 04:47:11 +03: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
4c8f7f310c Update project_zo.h 2021-08-16 14:27:20 +03:00
Recep Aslantas
9096fa6bab fix include paths 2021-08-16 14:27:12 +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
Caleb Gingles
07aee82125 Add CGLM_FORCE_DEPTH_ZERO_TO_ONE support to glm_unprojecti 2021-08-15 17:34:26 -04:00
Sundaram Ramaswamy
03b4594d9e quat_from_vecs: incorporate PR comments
* C89-style comments
* Move all variable declarations to function start
* Remove constant variables
* Remove newline for ‘else’
2021-06-15 19:11:41 +05:30
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
Sundaram Ramaswamy
aa071b2a6b Fix cross product when operand is also dest 2021-06-10 17:20:50 +05:30
Recep Aslantas
38c6188e12 Update vec3.h 2021-06-10 10:13:51 +03:00
Sundaram Ramaswamy
2e8162b133 Fix vec3_ortho 2021-06-09 23:18:32 +05:30
Sundaram Ramaswamy
32d1c96dc0 Include affine.h in quat.h; remove needless decls
* affine.h is needed for glm_translate_make
* Remove function declarations
  - glm_mat4_mulv since mat4.h is already included
  - glm_mul_rot as affine-mat.h is already include
  - glm_translate as affine.h is included with this change
2021-06-07 11:35:56 +05:30
Recep Aslantas
94381d3067 struct: fix glms_perspective_resize
since struct param is copy-by-value, result was noop
2021-05-30 13:06:49 +03:00
Recep Aslantas
0e794f8f8f struct: fix glms_persp_move_far
since struct param is copy-by-value, result was noop
2021-05-30 13:02:10 +03:00
Recep Aslantas
a2b8858e36 win: suppress warnings 2021-05-30 12:50:30 +03:00
Recep Aslantas
9d08407897 win: suppress warnings 2021-05-30 12:46:26 +03:00
Tai Chi Minh Ralph Eastwood
7f7e9f69da clipspace: add struct API implementations 2021-05-22 22:41:03 +02:00
Tai Chi Minh Ralph Eastwood
56ec058c7d style: fix documentation consistency for describing clipspace 2021-05-14 16:55:16 +02:00
Tai Chi Minh Ralph Eastwood
4d20f97275 clipspace: fix typo'd clip control define 2021-05-14 16:33:16 +02:00
Tai Chi Minh Ralph Eastwood
89e8c352ec style: fix missing whitespace for alignment
Co-authored-by: Michael <michael.guyver@gmail.com>
2021-05-14 15:44:10 +02:00
Tai Chi Minh Ralph Eastwood
eddaf464ff style: fix missing whitespace for alignment
Co-authored-by: Michael <michael.guyver@gmail.com>
2021-05-14 15:25:29 +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
michaelg
1bce62c371 Add function glm_perspective_lh_zo
This commit adds the function `glm_perspective_lh_zo`, modelled on the
implementation of glm_perspective, but amended to provide a left-hand
coordinate system expected by DirectX, Metal and Vulkan (per the GLM
project's `glm/detail/setup.hpp`). It uses a clip-space of zero-to-one.

The function is tested against a longhand version of the algorithm it
seeks to implement as well as against the output of the GLM project's
`glm::perspectiveLH_ZO` function. This commit adds a new subdirectory
`test/glm_cmp` which contains a basic CMake file and `main.cpp`. An
interested user should link or copy or clone the GLM project into this
directory. The `main` function can be used to print the reference data
used so others can verify behaviour in the future, or add new literal
reference values.
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
Recep Aslantas
607182982d Merge branch 'master' into simd-3 2021-05-07 14:08:56 +03:00
Sundaram Ramaswamy
9665be3138 Add struct API wrapper 2021-05-07 13:49:44 +05:30
Recep Aslantas
5c22ca3abb arrm, neon: use negate instruction instead of xor in glm_inv_tr_neon() 2021-05-07 01:52:12 +03:00
Recep Aslantas
7f9585ca72 arrm, neon: impove hadd performance 2021-05-07 01:46:24 +03:00
Recep Aslantas
d0ab3aaa2e arm, neon: util macros 2021-05-07 01:46:03 +03:00
Sundaram Ramaswamy
8ce45b4303 Add call and struct interfaces 2021-05-07 00:35:20 +05:30
Sundaram Ramaswamy
f19ff5d064 Use scale for both cases 2021-05-06 23:47:03 +05:30