Difference between revisions of "LlEuler2Rot"

From Second Life Wiki
Jump to navigation Jump to search
m
(Added order of rotation in Euler vector)
Line 5: Line 5:
|func_desc
|func_desc
|return_text=representation of Euler Angles '''v'''.
|return_text=representation of Euler Angles '''v'''.
|spec
|spec=The Euler angle vector is converted to a rotation by doing the rotations around the 3 axes in Z, Y, X order. So llRot2Euler(<1.0, 2.0, 3.0> * DEG_TO_RAD) generates a rotation by taking the zero rotation, a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis.
|caveats
|caveats
|constants
|constants

Revision as of 15:11, 24 December 2007

Summary

Function: rotation llEuler2Rot( vector v );

Returns a rotation representation of Euler Angles v.

• vector v

Specification

The Euler angle vector is converted to a rotation by doing the rotations around the 3 axes in Z, Y, X order. So llRot2Euler(<1.0, 2.0, 3.0> * DEG_TO_RAD) generates a rotation by taking the zero rotation, a vector pointing along the X axis, first rotating it 3 degrees around the global Z axis, then rotating the resulting vector 2 degrees around the global Y axis, and finally rotating that 1 degree around the global X axis.

Examples

default
{
    state_entry()
    {
        vector input = <73.0, -63.0, 20.0> * DEG_TO_RAD;//not advised to make your own quaternion
        rotation rot = llEuler2Rot(input);
        llSay(0,"The Euler2Rot of "+(string)input+" is: "+(string)rot );
    }
}

See Also

Functions

•  llRot2Euler

Articles

•  "Wikipedia logo"Euler_Angles

Deep Notes

Search JIRA for related Issues

Signature

function rotation llEuler2Rot( vector v );