in my app, the user can enter 3 angles in degrees (float AngleX, AngleY, AngleZ) in text controls to set the rotation of a PositionAttitudeTransform. the entered values are then processed like this:

float qx = (AngleX*PI)/180.0f;
float qy = (AngleY*PI)/180.0f;
float qz = (AngleX*PI)/180.0f;

MeshTransform->setAttitude( Quat(qx, Vec3(1.0f, 0.0f, 0.0f), qy, Vec3(0.0f, 0.0f, 1.0f), -qz, Vec3(0.0f, 1.0f, 0.0f)) );

the user can alternativly simply rotate the PositionAttitudeTransform with the mouse. so i need to get the updated rotation values to update my text controls. my question is now, how can i extract these values back from the transform (in degrees)? yeah i suck at maths :D
thanks in advance!
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to