[ODE] Angle rotation
Alexander Bussman
buxman at telia.com
Fri Jun 11 21:35:06 MST 2004
Hi!
(This might be off topic, but I hope it's ok)
I have recently started a simple project using ODE, but I have a problem:
I need to get the current angle of a object's rotation.
What I do now to rotate a object (that is rotating a object manually):
dQuaternion q;
dGeomGetQuaternion(obj->GetGeom(), q);
dQFromAxisAndAngle(q, ax, ay, az, angle);
obj->SetQuaternion(q);
(obj is a object of my ode object class)
angle is a variable that I call the rotate function with (also ax, ay and az).
So what I want is to do something like this:
dQuaternion q;
dGeomGetQuaternion(obj->GetGeom(), q);
dReal newAngle = obj->GetAngle()+angle; // <---- something like that
dQFromAxisAndAngle(q, ax, ay, az, newAngle);
obj->SetQuaternion(q);
Anyone who could give me a hint on how I could solve my problem?
// Alexander Bussman
More information about the ODE
mailing list