Nlerp fallback problem where applying slerp to opposed quaternions
Submitted by Mathieu Joubert
Assigned to Nobody
Link to original bugzilla bug (#398)
Description
Created attachment 242
Test case
In Quaternion.h, using slerp with two quaternions which are opposed (i.e. a,b,c,d and -a,-b,-c,-d) result in an incorrect nlerp interpolation.
(a,b,c,d) and (-a,-b,-c,-d) represent the same rotation and thier scalar product is one. This results in nlerp fallback but this interpolation cannot be done without inverting scale 0 or scale 1.
I think the solution is to put the (d<0) test out of the else statement so it applies to all angles. Puting the line 706 ( "}" )in place on the line 704 solved this issue for me.
Mathieu
Attachment 242, "Test case":
main.cpp
Edited by Eigen Bugzilla