Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math: Fix sclerp of dual quaternions with equal rotation and add test. #122

Closed
wants to merge 1 commit into from

Conversation

Squareys
Copy link
Contributor

Hi @mosra !

For previous discussion, see #117 :) This pull request should finally close that issue.

Greetings,
Squareys

When rotation is identical, the rotation of the first dual quaternion is
returned instead, together with the linearly interpolated translation of
both (lerp of the vectors of the dual part). The additional include is
needed for `Math::lerp(Vector<3, T>, Vector<3, T>, T)`.

Signed-off-by: Squareys <Squareys@googlemail.com>
@mosra
Copy link
Owner

mosra commented Nov 24, 2015

Awesome, thanks for being so thorough. I wanted to avoid having math headers dependent on Functions.h, so I'll need to invent some other clean way to do this, then I'll merge it.

@Squareys
Copy link
Contributor Author

@mosra A clean way would be to allow this kind of quaternion tranlation lerp (or whatever you want to call it) as a function in Quaternion.h :) If you do that on master, I can adapt this branch for you.

@mosra
Copy link
Owner

mosra commented Nov 29, 2015

Did a different (uglier?) alternative. Thanks a lot for the fix!

@mosra mosra closed this Nov 29, 2015
@mosra mosra added the bug label Nov 29, 2015
@mosra mosra added this to the 2018.02 milestone Feb 15, 2018
mosra added a commit that referenced this pull request Sep 3, 2018
The fix done with #122
(0e05c72) was not tested properly (see
previous commit) and thus this code path never worked. This properly
lerps the translation part and recombines it with the rotation instead
of interpolating just a part of it.

Also I'm no longer having any "dotResult" that's done only on the
vector part of the rotation, but instead using the full
rotation quaternion dot product. I have no idea why it was done this
way. This branch was also never properly tested -- it'll be with the
introduction of "shortest path" variants in the next commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants