favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

btQuaternion slerp not correctly while using quat(-x,-y,-z,-w) #583

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. btQuaternion slerp(t) from quatSrc(0, -0.55, 0, 0.835) to quatDst(0, -0.72, 
0, 0.694) , it's correct.
2. btQuaternion slerp(t) from quatSrc(0, -0.55, 0, 0.835) to quatDst2(0, 0.72, 
0, -0.694), it's wrong result.
3. try to use same slerp in class vmQuat, it always works OK.

What is the expected output? What do you see instead?
quatDst2 is same as quatDst, but use negative all value. the slerp result is 
wrong.

What version of the product are you using? On what operating system?
any version of LinearMath

Please provide any additional information below.

Original issue reported on code.google.com by macbearc...@gmail.com on 2 Jan 2012 at 2:52

GoogleCodeExporter commented 9 years ago
I've attached a patch that fixes this bug. The problem was that the dot product 
of the quaternions also needed to be negated and not just the elements of the 
second quaternion.

Original comment by joshua.d...@gmail.com on 6 Jan 2012 at 3:14

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report and fix, I'll have a look at it.

We should add some unit test for the slerp (the function doesn't seem to be 
used in the Bullet library).

Original comment by erwin.coumans on 23 Jan 2012 at 10:47

GoogleCodeExporter commented 9 years ago
I applied the patch to the trunk:
http://code.google.com/p/bullet/source/detail?r=2502

Original comment by erwin.coumans on 29 Feb 2012 at 4:51