Sign in to follow this  

Quaternion rotations. a special problem.

Recommended Posts

Hello all! Since two weeks i'm going crazy with quaternions. I try to build a simple 3D hierarchic-bone character. (without d3d,openGL) The gizmo should be as fast as possible, without heavy matrix calculations. I first used euler angles so I meet Mr.Gimbal. The hierarchical structure works. Also with quaternions (multiplications). But my last problem is to rotate the bone target vectors via bone quaternion. the code does follows: 1. - convert the current Bone-Angles(x,y,z) to quaternion. 2. - recursive function calls, to calculate the child-bone-quaternions (multiply the quaternions).works. 3. - rotate the Target R3Vektor(x,y,z) to the bone-angle-quaternion (how to? with opengl glue lib it seems to be easy...) for example: shoulder-bone: O--------O <-target vector initial position target-R3Vector: x=100, y=0, z=0 if I move the bone: Angle (xrot=90, yrot=45, zrot=0) I got the following bone-quaternion: Real : 0.65328145 x : 0.65328145 y : 0.27059805 z : -0.27059805 the last step is to rotate the target "shoulder-bone" via quaternion. I don't know mutch about quats. If theres a better and easier way to calcualate the bones let my know. hopefully someone could help me. !!?!? The first Euler-Version: [Edited by - hybridized on July 22, 2006 8:17:47 AM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this