Software Archive
Read-only legacy content
17061 Discussions

HandModule: Obtaining a middle quaternion between joints

jarikus
Beginner
796 Views

I need show the phalange of thumb finger.

I have rotation value (Quaternion) for joints see attached picture. But my graphics 3D engine (Ogre3D) allow set the graphics object only by position of center and rotation.

Center position of phalange I getting so:

thumbPhalanget->setPosition( (JointA.x+JointB.x)/2, (JointA.y+JointB.y)/2, (JointA.z+JointB.z)/2 );

Question: But how to get the rotation in center of phalange? In other words, how get quaternion for center phalange if I have quaternions of joints?

thumbPhalanget->setRotation( ? );

Thanks

0 Kudos
4 Replies
jarikus
Beginner
796 Views

Qualification: The Havok Physics engine allow set objects position in same maner by set position central point and set rotation. Therefore this question is actual non only for Ogre3D engine.

0 Kudos
jarikus
Beginner
796 Views

I found the solution, but I not test it yet. http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors

This solution uses coordinates of joint for getting the quaternion.

0 Kudos
Xusheng_L_Intel
Employee
796 Views

The rotation value of "thumb joint B" is the rotation of the bone between "thumb joint A" and "thumb joint B". Please let me know if you still have issue. Thanks!

0 Kudos
jarikus
Beginner
796 Views

> David Lu (Intel)  

Thanks, you are right. I did not understand it, because I was confused with convert the RealSense world coordinate to Ogre3D world coordinate. For now I start understanding ;)

0 Kudos
Reply