Link to home
Start Free TrialLog in
Avatar of luciepaul
luciepaul

asked on

Converting Quaternion in Point3D (C#)

I am not at all an expert in game programming and entering the field for just a moment.
For biomechanical purpose i need to animate a really simple skeleton of 15 "bones".
The data to move each bone comes in two types:
- RPY angles ( Vector3D Net Framework 4.5 structure)
- quaternion ( Quaternion Net Framework 4.5 structure)
and the library I use to move the bone only handles Point3D ( I cannot enter the XNA or DirectX environment)
I have no problem in converting Vector3D in Point 3D ( an explicit conversion does exists)
But I don't know how to convert a quaternion (x,y,z,w) into a Point3D.
Thank you for the help
ASKER CERTIFIED SOLUTION
Avatar of Member_2_5069294
Member_2_5069294

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of luciepaul
luciepaul

ASKER

To satsumo
Thank you for the really valuable info. In fact, each movement of the bone is driven by a sensor i.e. one movement= one RPY and one quaternion.
So, if i am understanding well what your are writing, i guess  i will have no need to interpolate and therefore the matrix conversion process will be a solution. And the roll lack is not a problem because i have it with the RPY info.
Am I right ?
That sounds about right.  You might need to do some error checking on the sensor output, thats probably easier with quaternions anyway.  If you're going to render the motion data the usual method is converting quaternion to matrix and using the matrix to render.  Quaternions also have the advantage of taking up much less space than matrices.  If you have a lot of animation data that's very useful.