github recp/cglm v0.9.3
v0.9.3: ray update and many improvements

latest release: v0.9.4
one month ago

🎓 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:

  • #378: win32, simd: ensure we are on msvc when checking MSVC specific headers
  • win32, tests: fix drand48() error on mingw
  • #379: simd: min / max helpers
  • docs: update read the docs package versions
  • #381: add new functions for ivec2 and ivec3 ( dot, norm, norm2, div, divs, mod... ) ( thanks to @vitassuper )
  • #383: implement struct API for ivec2, ivec3, and ivec4 ( thanks to @tarhses )
  • #384: docs, fix typos ( thanks to @waywardmonkeys )
  • #386: add additional CI via GitHub Actions ( thanks to @waywardmonkeys )
  • #388: ci: Remove appveyor ( thanks to @waywardmonkeys )
  • #387: suppress warnings ( thanks to @waywardmonkeys )
  • #389: aabb2d: fix struct api ( thanks to @waywardmonkeys )
  • #390: doc improvements ( thanks to @waywardmonkeys )
  • #391: ci: Add ARM64 UWP for WindowsStore ( thanks to @waywardmonkeys )
  • #392: aabb2d_zero, aabb2d_diagonal and aabb2d_size ( thanks to @duarm )
  • #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
  • #398: allow passing const float* to make functions ( thanks to @waywardmonkeys )
  • #397: clarify some rotation rules, update docs to explain rotate() a bit more
  • #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

Don't miss a new cglm release

NewReleases is sending notifications on new releases.