Avatar of 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
C#Game Programming

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes