Myra Loveless
The Wandering Glitch
Join date: 3 Oct 2004
Posts: 89
|
10-10-2004 01:55
Does anyone know the formula for converting a Euler coordinate to the Quaternion angle for a given euler 2d rotational coordinate? For instance... I want to be able to rotate my object on the psi axis (aka "the z axis"  a given number of degrees. So I need an algorythm that'll convert the euler psi coordinate into it's Quaternion assuming that 0 is not rotated. I think maybe my thoughts are a little too jumbled to explain what I'm asking in words so here's exactly how I'm trying to make it work. float EulerToQuaternion(r) { Algorythm to convert a euler coordinate into its Quaternion return(Quaternion) } float QuaternionDegreeToEuler(r) Algorythm to convert a Quaternion into a euler coordinate return euler } Essentially, I already know how to convert from a rotation to a euler vector, but I don't know how to convert a given euler axis to a degree and I can't find any straight forward math examples anywhere on the net.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
10-10-2004 04:21
you haven't looked on the wiki yet. what you are looking for is llEuler2Rot. to get it back you can use llRot2Euler. For future reference try Rotations, Quaternions, Rotation Conversion Functions Examples
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|