I've tried and tried and failed at creating a function that takes an Irrlicht Vector3D(used for rotation) and returns a ODE Quaternion and back again.
can some1 with a bit more knowledge at maths then I do this for me, yes I have searched google, and the examples i did find i tried and didn't succeed.
Thanks.
Quaternion to Vector3D
-
- Posts: 17
- Joined: Mon Feb 12, 2007 11:48 pm
- Location: New Zealand
did you search quaternion.h? ![Wink ;)](./images/smilies/icon_wink.gif)
It has a constructor which takes euler angles:
edit:
back again would be this:
![Wink ;)](./images/smilies/icon_wink.gif)
It has a constructor which takes euler angles:
Code: Select all
quaternion q(x,y,z);
back again would be this:
Code: Select all
vector3df v;
q.toEuler(v);
-
- Posts: 17
- Joined: Mon Feb 12, 2007 11:48 pm
- Location: New Zealand