recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C
MIT License
2.14k stars 225 forks source link

Quaternion New Features #344

Open recp opened 10 months ago

recp commented 10 months ago

https://developer.apple.com/documentation/accelerate/working_with_quaternions

We already have glm_quat_rotatev() ( which is similar to simd_act() I guess ), glm_quat_rotate() , glm_quat_rotate_at() ... but

  1. glm_quat_spline()
  2. glm_quat_bezier()
  3. glm_quat_slerp_longest()

would be nice to have.

telephone001 commented 6 months ago

thinking of implementing glm_quat_slerp_longest(versor q, versor r, float t, versor dest) by making r negative, comparing how big the angle is with q with r negative and regular r then slerping with the longer one.

telephone001 commented 5 months ago

Sorry I have been busy with some stuff and forgot to implement this. Hopefully someone else can implement this one.

recp commented 5 months ago

@telephone001 thanks, I'm also busy for a while but can implement when available

telephone001 commented 1 month ago

I'm back and ready to finish these things. I just realized that it was extremely easy to implement glm_quat_slerp_longest. But I'm also ready to implement the other two.

recp commented 1 month ago

Hi @telephone001,

Sorry for the delay,

Many thanks 🤗