JOML - quatf.addScaledVector(vec3, float)

Hello all. It’s been awhile.

I started using JOML and finally decided to start the dreaded task converting my physics engine to use JOML.
Right now I’m looking for the JOML equivalent of quatf.addScaledVector(vec3, float), but I cannot find it. Is it just not there?

Also, what does the ‘fma’ in vec3.fma(float, vec3) stand for? It took me forever to find the function when I needed it!

FMA stands for Fused Multiply Add if I remember this right. I have never used it myself, but think I read this somewhere. Correct me if I’m wrong.

Assuming quatf to be a quaternion in floats, how will you add a vector to it? I think quaternions are only used for rotations and not translations or scalings.

Typically in physics engines you have a vec3 for angular velocity. This gets scaled by the step delta and added to the rotation quatf.

What you’re looking for is an FMA which also converts your vector from Euler angles to a quaternion and then rotates the quaternion in the direction of that quaternion based on the value you pass in…? Doesn’t sound that difficult to work around.

Well working around is easy. I was just wondering if it’s already in JOML and I missed it.

Have a look at: Quaternionf.integrate()
Also see GitHub issue #57.
It should be exactly what you were looking for.