Commit Graph

1269 Commits

Author SHA1 Message Date
Christophe
99fe1c8f7d
Merge pull request #1142 from thp/recompose
gtx_matrix_decompose: Add glm::recompose() #1142
2023-08-18 14:55:41 +02:00
Mark Sheppard
3cb568cd37 Fix Clang 15 test build errors
Fixes for compiler errors when building the tests using Clang 15,
including:

    * Use explicit cast to silence Wimplicit-int-float-conversion
      warning for conversion of spin count in implementation of
      glm::slerp.
    * Use GLM_FORCE_MESSAGES instead of removed GLM_MESSAGES for
      messages in glm/gtx/hash.hpp, avoiding Wundef warning.
    * Encode en dash in URL for Gram-Schmit Process wikipedia page and
      replace similar en dashes in comments with regular dashes, to
      avoid Winvalid-utf8 warnings in glm/gtx/matrix_factorisation.inl.
    * Replace degree sign symbol with text "degrees" to avoid
      Winvalid-utf8 warnings in test/gtc/gtc_quaternion.cpp.
    * When using Clang, build tests with -Wno-float-equal to silence
      Wfloat-equal warning in implementation of glm::vec<L,T,Q>::equal.
    * For performance tests in test/gtx/gtx_fast_trigonometry.cpp, add
      statement explicitly casting result to void, to silence
      Wunused-but-set-variable warnings.
    * Add newline at end of test/gtx/gtx_hash.cpp to silence
      Wnewline-eof warning.
    * Rename namespace _1aga to agarose in test/gtx/gtx_pca.cpp to
      avoid Wreserved-identifier warning.
2023-03-31 17:39:53 +01:00
Thomas Perl
4afe953bff gtx_matrix_decompose: Add glm::recompose() 2023-02-26 18:33:47 +01:00
tetrisplusplus
2af53d5981 Added test_isOrthogonal for zero matrix 2023-01-23 21:05:35 +09:00
olga
97e09aa304 Fix round test
Depending on the developer environment, the output of round for o.5 or -0.5 may be different (according to the GLSL spec). So the test was too restrictive.
2023-01-13 14:08:46 +01:00
Thibault de Villèle [UM]
1c18fca789 Fix GLM_EXT_matrix_common : row to column-major
The previous patch made the incorrect assumption matrices were row-major
instead of column-major (got the two mixed up in my head).

This fixes this problem.

Also, this extends the test files to cover all matrix sizes (not types,
that would be redundant).
2022-10-26 11:17:23 +02:00
Christophe
7b9d310dbd
Merge pull request #1116 from Thibaulltt/master
GLM_EXT_matrix_common : add glm::mat<> support to glm::abs() #1116
2022-10-24 12:33:54 +02:00
Thibault de Villèle [UM]
48e1ff3fee Add glm::abs() function for the glm::mat<> class
This is added as part of the GLM_EXT_matrix_common extension, as this
function is not provided by the core GLSL specification (version 4.20).

The implementation of this glm::abs(mat<>) function mirrors the
glm::abs(vec<>) implementation. It should be functionning the same in
every way as the vec implementation.

Bonus points : AFAICT this allows to vectorize operations on compilers
that support optimization of these patterns, just like the functor1<>
struct in _vectorize.hpp for vectors.
2022-08-29 14:22:10 +02:00
Charles Huber
4b6284e39d GCC: Fix noexcept warnings on hash functions
Fix warnings on hash functions with GCC and -Wnoexcept:
* Add GLM_HAS_NOEXCEPT flag & GLM_NOEXCEPT #define to setup.hpp.
* Add GLM_NOEXCEPT to hash functions in hash.hpp.
* Add GLM_NOEXCEPT to matrix operator[] accessors.
* Add gtx_hash.cpp and a test to verify all hash overloads compile.
  Configure with -DCMAKE_CXX_FLAGS="-Werror -Wnoexcept" to test.
2022-08-24 15:21:11 -05:00
arikanli
0f318f63af feat: add shearing matrix operation on matrix_transfom 2022-01-20 21:27:30 +08:00
SGrottel
104c1214ee Avoid fp comparison of glm::sign return value by introducing a sign comparison helper function 2021-06-05 16:43:47 +02:00
SGrottel
5dbba35275 Changed test functions to explicitly define comparison epsilons.
Updated 1aga expected computation results, based on external experiment based on precise / symbolic computation
Unified result comparison to always use `vectorEpsilonEqual` or `matrixEpsilonEqual`
2021-06-05 16:30:40 +02:00
Christophe
dc9e555b4c
Merge pull request #1071 from sgrottel/gtx-pca
Implemented 'principle component analysis' utility in gtx #1071
2021-05-15 12:50:27 +02:00
SGrottel
d71dba9603 Introduced a second, less precise comparison epsilon for the tests for now. 2021-05-11 07:44:40 +02:00
SGrottel
18d9b97aa4 Further increased comparison float epsilon, and further test batch testEigenvectors also failes.
Added debug output to `testEigenvectors` in case the error persists.
2021-05-10 23:36:17 +02:00
SGrottel
593b7cc36b Increased float comparison epsilon to pass tests. 2021-05-10 22:49:57 +02:00
SGrottel
a0ccbcc63d Added further details on the comparison issue with covariance matrices on some VMs.
Also corrected some code style guide, and changed `nullptr` to `GLM_NULLPTR` for better compatibility.
Tests are now executed in blocks of related tests, and only inbetween blocks the tests will exit.
2021-05-10 21:32:01 +02:00
SGrottel
d0d7945141 Additional debug output to investigate why test-gtx_pca fails on some VMs on Travis.
Also, reworked the `#if` about CXX11; did not seem to work correctly.
2021-05-10 19:35:57 +02:00
SGrottel
c792a0a221 Disabled tests requiring random engine when CXX11 STL is not available.
Added missed `typename` keywords, and fixed variable initialization.
2021-05-10 17:48:35 +02:00
SGrottel
0f5b544d5d Corrected errors on Xcode C++98 pure related to language extensions accidentially used. 2021-05-10 16:38:38 +02:00
SGrottel
b8adc27808 Removed lambdas and initializer list ctors to be compatible with older cpp standards. 2021-05-10 15:45:42 +02:00
SGrottel
dd40903b74 Implemented 'principle component analysis' utility in gtx, including tests 2021-05-10 13:14:29 +02:00
Gaoyang Zhang
de7c83f1b6 Update test for GLM_FORCE_QUAT_DATA_XYZW
Signed-off-by: Gaoyang Zhang <gy@blurgy.xyz>
2021-05-06 14:12:41 +08:00
Gaoyang Zhang
43b81f49fc Revert "Fix test due to change of default constructor of qua"
This reverts commit e800c41c0a.
2021-05-06 14:12:16 +08:00
Gaoyang Zhang
e800c41c0a Fix test due to change of default constructor of qua
Signed-off-by: Gaoyang Zhang <gy@blurgy.xyz>
2021-05-03 00:32:17 +08:00
Sergey Krivohatskiy
b5d4757580 compilation fix
Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
2021-03-23 15:22:16 +03:00
Sergey Krivohatskiy
e81a9c4baa compilation fixes
Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
2021-03-23 15:03:38 +03:00
Sergey Krivohatskiy
2010c883d5 formatting fix
Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
2021-03-23 14:33:11 +03:00
Sergey Krivohatskiy
2b766d5303 a few more tests for axisAngle
Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
2021-03-23 14:30:52 +03:00
Sergey Krivohatskiy
57c3be0b9f Added axisAngle tests
Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
2021-03-23 14:24:41 +03:00
nowakowsk
eabaf2338b Fixed unit tests for pre-C++11 compilers 2021-02-14 13:03:57 +01:00
nowakowsk
6437133cd2 fix: add missing transposition to adjugate for mat2 and mat4 2021-02-14 12:14:59 +01:00
christophe-lunarg
9dca1667fe Merge branch 'master' of github.com:g-truc/glm 2020-12-09 21:44:11 +01:00
christophe-lunarg
bec41ffe51 Fix AVX2 detection 2020-12-09 21:43:38 +01:00
Christophe
561fbbd94c Added *GLM_EXT_matrix_integer* with tests 2020-11-30 18:10:55 +01:00
Christophe
8693d06297 Fix glm::acsch tests 2020-11-26 11:14:54 +01:00
Christophe
c31b5aecaa fix reciprocal test 2020-11-24 12:19:30 +01:00
Christophe
da542d6354 fix reciprocal test 2020-11-24 12:12:33 +01:00
Christophe
2a8664fe50 Added and to *GLM_EXT_scalar_common* and *GLM_EXT_vector_common* 2020-11-23 17:02:32 +01:00
Christophe
2593c9c8b3 Added GLM_EXT_scalar_reciprocal and GLM_EXT_vector_reciprocal with tests 2020-11-23 15:33:36 +01:00
EZForever
2bb0fb3999 Add test case for glm::angle() sign bug introduced by #946 2020-10-28 17:26:53 +08:00
Christophe Riccio
2a65978348 Merge branch 'master' of https://github.com/g-truc/glm into matrix-int 2020-03-05 18:52:28 +01:00
Christophe
efbfecab63
Merge pull request #996 from Bargor/quaternion-slerp-multiple-spins
Quaternion slerp overload which interpolates with extra spins #996
2020-03-05 18:51:49 +01:00
Kontny Karol
31d01b525e Quaternion slerp overload which interpolates with extra spins
Signed-off-by: Karol Kontny <barolek@gmail.com>
2020-02-28 00:01:52 +01:00
Will Usher
a331771ea8 Merge remote-tracking branch 'upstream/master' 2020-02-16 14:07:18 -08:00
Christophe Riccio
a4bf8867c2 Added clamp, repeat, mirrorClamp and mirrorRepeat function to GLM_EXT_scalar_commond and GLM_EXT_vector_commond extensions with tests 2020-02-11 12:53:12 +01:00
Christophe Riccio
9e7a486c0e Added matrix integer extensions and tests 2020-02-10 19:06:30 +01:00
Christophe Riccio
684817db46 Clean up integer precision 2020-02-08 16:21:22 +01:00
Christophe Riccio
6bd53cc9e5 Added files for EXT packing extensions 2020-02-07 15:20:42 +01:00
Christophe Riccio
8e58cdbbf8 - Added GLM_EXT_vector_intX_sized and GLM_EXT_vector_uintX_sized extensions 2020-02-04 17:11:07 +01:00
Will Usher
d773b4453a Merge remote-tracking branch 'upstream/master' 2020-01-05 17:48:47 -07:00
Christophe Riccio
028b303a65 Fixed CXX tests 2020-01-05 21:14:53 +01:00
Christophe Riccio
79b5197e5d Fixed CXX tests 2020-01-05 21:12:11 +01:00
Christophe Riccio
a68949eba4 Fixed force cxx version tests 2020-01-05 21:09:37 +01:00
Christophe Riccio
2d8ccef1af Tentative fix of GLM_FORCE_QUAT_DATA_WXYZ on Clang with tests 2020-01-05 21:07:42 +01:00
Christophe Riccio
3ee3659adb Added force defines tests 2020-01-05 20:57:20 +01:00
Christophe Riccio
85e491b30c Tentative fix of GLM_FORCE_QUAT_DATA_WXYZ on Clang with tests 2020-01-05 20:41:51 +01:00
Christophe Riccio
436579b37e Fixed Wimplicit-int-float-conversion warnings with clang 10+ #986 2020-01-05 15:13:20 +01:00
Will Usher
6f26ac3ada Merge remote-tracking branch 'upstream/master' 2020-01-01 13:06:33 -08:00
Khem Raj
d2b9bbb911 Fix Wimplicit-int-float-conversion warnings with clang 10+
This is a new warning in clang which will be available in clang 10
onwards

Fixes
error: implicit conversion from 'const int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion]
2019-12-27 18:44:52 -08:00
Christophe Riccio
a4b4db24bd Fixed test target 2019-11-02 16:34:18 +01:00
Christophe Riccio
919e72f5dd Fixed equal ULP variation when using negative sign #965 2019-11-02 12:46:15 +01:00
Christophe Riccio
11089f6d7e Move CMake tests configuration in the test directory CMakeLists.txt 2019-11-02 11:57:42 +01:00
Christophe
46670b794b
Merge pull request #963 from kiroma/master
Re-add the glm interface library in cmake #963
2019-11-02 11:27:28 +01:00
Will Usher
15158e8aa9 Add a CMake Package config 2019-11-01 16:40:45 -06:00
tnixeu
49d89a0009 uses all variables in test 2019-10-26 14:58:56 +02:00
Krzysztof Kurek
11b88192e8
Actually fix the tests 2019-10-17 16:41:13 +02:00
Stefan Maass
e7d51a3838 bugfix intersection ray/plane, added related tests 2019-09-14 23:38:44 +02:00
Sebastian Buchwald
7b06a984af Let test return the number of errors 2019-09-11 19:12:39 +02:00
Christophe Riccio
61b2a73e21 Fixed missing std:: namespace #898 2019-09-07 13:41:08 +02:00
Liam
2c3bdccb01
Merge branch 'master' into lMaxNorm-proposal 2019-08-25 09:03:13 +01:00
Christophe
163f0d162d Tentative fix build 2019-08-08 11:09:59 +02:00
Christophe
29987a3100 Fixed prevPowerOfTwo build 2019-08-08 10:51:19 +02:00
Christophe
a87784c125 Fixed C++98 build 2019-08-07 14:25:12 +02:00
Liam Adams
a78024d2bf Add testing of lMaxNorm. 2019-07-20 08:02:09 +01:00
Liam Adams
8f7d378116 Add testing of lxNorm. 2019-07-20 07:36:02 +01:00
Christophe
947527d3ac Fixed string_cast, broken after fixing #916 2019-07-12 23:11:27 +02:00
Christophe
69622b2954 Fixed perf test results 2019-07-12 22:59:18 +02:00
Christophe
4074dfcf07 Added findNSB functions and tests 2019-07-12 21:50:30 +02:00
Christophe
3a65b7a628 Completed EXT_*_integer extensions 2019-07-12 18:46:08 +02:00
Christophe
3288df2f89 Added EXT_vector_integer test 2019-07-12 15:44:17 +02:00
Christophe Riccio
9c831a1a76 Added performance tests 2019-05-03 18:24:49 +02:00
Christophe Riccio
a91fb705db Added EXT_vector_integer extension 2019-04-26 19:01:12 +02:00
Christophe Riccio
07c6d56b5f Added initial work for integer vector and scalar functions 2019-04-26 18:32:06 +02:00
Christophe Riccio
13d2cea73f Added 2019-04-04 14:01:05 +02:00
Christophe Riccio
229b762c31 Added Visual C++ 2019 detection 2019-04-04 12:24:02 +02:00
Khem Raj
1150952697 glm: Remove redundant double semi-colons
Make clang happy
/glm/gtc/../ext/../detail/../simd/common.h:106:45: error: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Werror,-Wextra-semi-stmt]
|         glm_vec4 const or0 = _mm_or_ps(and0, and1);;
|                                                    ^
| 1 error generated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-03-01 11:13:28 -08:00
Christophe Riccio
6492c8593f - Added mix implementation for matrices in EXT_matrix_common #842 2019-03-01 12:33:09 +01:00
Christophe Riccio
daf14f0f74 Added bitfieldRotate tests #862 2019-03-01 11:33:32 +01:00
Christophe Riccio
ef9d65e0c6 Added GLM_FORCE_INTRINSICS define 2019-01-11 12:58:31 +01:00
Florian Penzkofer
d0ae3f966e Fix bitfieldInsert according to GLSL spec
"bitfieldInsert inserts the bits least significant bits of insert into base at offset offset..."
2018-10-04 17:23:44 -05:00
Christophe Riccio
abff0a39ac Fixed build 2018-10-01 11:23:26 +02:00
Christophe Riccio
3d26f49775 Added GLM_FORCE_ALIGNED_GENTYPES to enable aligned types and SIMD instruction are not enabled. This disable constexpr #816 2018-09-30 21:52:09 +02:00
Christophe Riccio
81d626daf6 Added test for #764 2018-09-27 21:22:07 +02:00
Christophe Riccio
76683aa287 Added vector ulp functions 2018-09-26 18:27:55 +02:00
Christophe Riccio
32573c86ec Fixed double tests 2018-09-26 15:08:04 +02:00
Christophe Riccio
e259e2789d Fixed double tests 2018-09-26 14:52:55 +02:00
Christophe Riccio
84d5e96144 Clean up dead files 2018-09-26 12:51:51 +02:00
Christophe Riccio
21d0092f6a Fixed simplex noise build with double #734 2018-09-26 12:51:31 +02:00
Christophe Riccio
59cae7b5cb Added constant time ULP distance between float #121 2018-09-26 12:09:06 +02:00