Commit Graph

1111 Commits

Author SHA1 Message Date
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
01e2b74a29 Update documentation for qaut_from_vecs 2021-06-10 23:52:09 +05:30
Sundaram Ramaswamy
ee5050f43c Tests for quaternion from two vec3 2021-06-10 23:15:10 +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
Recep Aslantas
8b958e9600 Merge pull request #209 from legends2k/fix_vec3_cross
Fix cross product when an operand is also dest
2021-06-10 16:49:17 +03:00
Sundaram Ramaswamy
aa071b2a6b Fix cross product when operand is also dest 2021-06-10 17:20:50 +05:30
Recep Aslantas
479e7d4240 Merge pull request #207 from legends2k/fix_vec3_ortho
Fix vec3_ortho
2021-06-10 10:15:12 +03:00
Recep Aslantas
38c6188e12 Update vec3.h 2021-06-10 10:13:51 +03:00
Sundaram Ramaswamy
c330b47ded Remove debug printf statements 2021-06-10 10:27:28 +05:30
Sundaram Ramaswamy
2e8162b133 Fix vec3_ortho 2021-06-09 23:18:32 +05:30
Recep Aslantas
afdcae08dd Merge pull request #205 from legends2k/master
Include affine.h in quat.h; remove needless decls
2021-06-07 11:45:54 +03:00
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
4d2ba464a0 Update README.md 2021-05-30 18:11:17 +03:00
Recep Aslantas
398e47070b Update README.md 2021-05-30 18:09:17 +03:00
Recep Aslantas
619ac4ce9a Update README.md 2021-05-30 18:03:33 +03:00
Recep Aslantas
e83940f3b1 Create cglm.png 2021-05-30 17:48:29 +03:00
Recep Aslantas
e5d88f22a0 Update README.md v0.8.3 2021-05-30 15:31:06 +03:00
Recep Aslantas
8e10ab2b49 Update features.rst 2021-05-30 15:30:55 +03:00
Recep Aslantas
4ede0815d4 Update features.rst 2021-05-30 15:28:38 +03:00
Recep Aslantas
7d16e3583f Merge branch 'master' of https://github.com/recp/cglm 2021-05-30 15:23:38 +03:00
Recep Aslantas
6011baff06 Update opt.rst 2021-05-30 15:23:30 +03:00
Recep Aslantas
af92df4e84 ci: migrate cglm from tavis-ci.org to travis-ci.com 2021-05-30 15:17:33 +03:00
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
b895e424b0 docs: add docs about clipspace configuration 2021-05-30 12:53:04 +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
Recep Aslantas
8898c3b471 win: add missing files to build 2021-05-30 12:43:17 +03:00
Recep Aslantas
f0c2860179 Merge pull request #203 from bwhmather/meson-fixes
Update lists of source files in meson.build
2021-05-29 14:31:41 +03:00
Ben Mather
f142e8e16e build: rebuild list of test files in meson.build 2021-05-29 10:43:29 +01:00
Ben Mather
5ac916236c build: fix lists broken by missing commas in meson.build 2021-05-29 10:43:29 +01:00
Ben Mather
4327935b9f style: fix trailing whitespace in meson.build 2021-05-29 10:43:23 +01:00
Recep Aslantas
086b40bf6a Merge pull request #201 from hartenfels/master
Add struct clipspace files to autoconf build
2021-05-24 22:31:33 +03:00
Carsten Hartenfels
af3b356762 Add struct clipspace files to autoconf build
They weren't being installed.

Fixes #200.
2021-05-24 21:20:27 +02:00
Recep Aslantas
9ac291c673 Merge pull request #198 from raedwulf/clipspace
Clipspace implementations for left/righted-handed coordinate systems and [-1,1] and [0,1] clipspace
2021-05-23 18:59:01 +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
8ddb5d5740 build: fix incorrect include paths for libcglm 2021-05-14 16:58:48 +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
a5af9e5eac build: fix Makefile.am missing clipspace source files 2021-05-14 16:49:18 +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
403097d56c build: fix duplicate line in CMakeLists.txt 2021-05-14 15:27:28 +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
db46ea110a Updated README.md to remove ref to glm_cmp stub 2021-05-13 23:18:05 +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
7760c709da build, meson: add so version to meson build 2021-05-08 15:44:14 +03:00