Quaternion to Vector3D

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ShadowDust
Posts: 17
Joined: Mon Feb 12, 2007 11:48 pm
Location: New Zealand

Quaternion to Vector3D

Post by ShadowDust »

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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

did you search quaternion.h? ;)
It has a constructor which takes euler angles:

Code: Select all

quaternion q(x,y,z);
edit:

back again would be this:

Code: Select all

vector3df v;
q.toEuler(v);
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
ShadowDust
Posts: 17
Joined: Mon Feb 12, 2007 11:48 pm
Location: New Zealand

Post by ShadowDust »

yes, this would be nice, but I'm using Irrlicht.Net, Sorry if i forgot to tell you... perhaps i posted in the wrong forum?
Post Reply