I never took linear algebra in skool. I have no clue what a quaternion is, or why in the world you'd keep track of an object's 3-dimensional rotation using FOUR numbers? What the...?
I am looking for a simple script function that accepts a vector datatype containing three rotational values in degrees (not radians) just like in the SL object editor window, and outputs a rotation quat.
To rotate a prim to an absolute rotation of +10.0 degrees tilt/x, -10 degrees yaw/y, +5.01 degrees roll/z, I'd like to be able to do something stupid-simple like this:
vector primspin = <+10.0, -10.0, +5.01>;
rotation primrot = QuatFunctionForIdiots(primspin);
With such a function, I assume this could be done for relative rotation:
rotation primrot = llGetLocalRot();
vector primspin = <+10.0, -10.0, +5.01>;
primrot = primrot + QuatFunctionForIdiots(primspin);
Next question. Does a function like this alreafy exist? Since I don't know what Euler functions are or any of that, I'm not sure how to find this function if does exist.
