v0.9.3
版本发布时间: 2024-03-26 22:18:26
recp/cglm最新发布版本:v0.9.4(2024-04-01 23:10:19)
🎓 ray, struct and ci
Now we have some missing functionalities:
📌 ray sphere intersection, reflect, refract, face forward 📌 additional CI via GitHub Actions ( many thanks to @waywardmonkeys ) 📌 struct API for ivec2, ivec3, and ivec4 ( many thanks to @tarhses ) 📌 struct API improvements ( many thanks to @duarm, @waywardmonkeys ) 📌 add new functions for ivec2 and ivec3 ( many thanks to @vitassuper )
-
glm_ray_sphere(origin, dir, s, &t1, &t2)) -> bool
ray sphere intersection -
glm_ray_at(orig, dir, t, &point)
point by parameter -
glm_vec3_faceforward(N, I, Nref, dest)
-
glm_vec[2|3|4]_reflect(I, N, &dest)
reflect -
glm_vec[2|3|4]_refract(I, N, eta, &dest)
refract
glm_ray_sphere()
:
- t1 > 0, t2 > 0: ray intersects the sphere at t1 and t2 both ahead of the origin
- t1 < 0, t2 > 0: ray starts inside the sphere, exits at t2
- t1 < 0, t2 < 0: no intersection ahead of the ray
- the caller can check if the intersection points (t1 and t2) fall within a specific range (for example, tmin < t1, t2 < tmax) to determine if the intersections are within a desired segment of the ray
and many others improvements and bug fixes, thanks to those who help to make the library more robust and better than before.
🛠️ Bugfixes and Improvements:
- https://github.com/recp/cglm/pull/378: win32, simd: ensure we are on msvc when checking MSVC specific headers
- win32, tests: fix drand48() error on mingw
- https://github.com/recp/cglm/pull/379: simd: min / max helpers
- docs: update read the docs package versions
- https://github.com/recp/cglm/pull/381: add new functions for ivec2 and ivec3 ( dot, norm, norm2, div, divs, mod... ) ( thanks to @vitassuper )
- https://github.com/recp/cglm/pull/383: implement struct API for ivec2, ivec3, and ivec4 ( thanks to @tarhses )
- https://github.com/recp/cglm/pull/384: docs, fix typos ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/386: add additional CI via GitHub Actions ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/388: ci: Remove appveyor ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/387: suppress warnings ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/389: aabb2d: fix struct api ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/390: doc improvements ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/391: ci: Add ARM64 UWP for WindowsStore ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/392: aabb2d_zero, aabb2d_diagonal and aabb2d_size ( thanks to @duarm )
- https://github.com/recp/cglm/pull/395: use NDEBUG to check DEBUG mode, update cmake to respect DEBUG
- suppress warnings: C4244: 'function': conversion from 'int' to 'float'
- test: fix ivec2 and ivec3 comparison and suppress warnings
- https://github.com/recp/cglm/pull/398: allow passing const float* to make functions ( thanks to @waywardmonkeys )
- https://github.com/recp/cglm/pull/397: clarify some rotation rules, update docs to explain rotate() a bit more
-
https://github.com/recp/cglm/pull/399: some missing ray functions (
glm_ray_sphere
,glm_ray_at
,glm_vec3_faceforward
,glm_vec[2|3|4]_reflect
,glm_vec[2|3|4]_refract
- normalize: norm == 0.0f to norm < FLT_EPSILON, improving handling of very small vectors to prevent instability and overflow
- build: add missing files
- fix some doc typos & warnings
Known or Possible Issues for Next Versions:
❤️ Sponsorship: Consider become a sponsor for cglm
Supporting cross platform, multiple OS-es and multiple CPUs requires multiple hardwares to test on it which requires extra financial cost. Also sparing time is another big issue while working at somewhere fulltime... Your company can become a sponsor to help:
https://github.com/sponsors/recp https://opencollective.com/cglm#backer https://patreon.com/recp