LlRot2Euler: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
No edit summary
m lsl code tagging
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|func_id=15|func_sleep=0.0|func_energy=10.0
|func=llRot2Euler|sort=Rot2Euler
|func=llRot2Euler|sort=Rot2Euler
|func_id=15|func_sleep=0.0|func_energy=10.0
|func_footnote
|func_footnote
|p1_type=rotation|p1_name=quat|p1_desc=Any valid rotation
|p1_type=rotation|p1_name=quat|p1_desc=Any valid rotation
Line 7: Line 7:
|return_text=that is the Euler representation (roll, pitch, yaw) of '''quat'''.
|return_text=that is the Euler representation (roll, pitch, yaw) of '''quat'''.
|spec
|spec
|caveats
|caveats=*Angles greater than PI (180 degrees) are returned as negative angles.
|constants
|constants
|examples=<pre>
|examples=
<lsl>
default
default
{
{
     state_entry()
     state_entry()
     {
     {
         rotationinput = <0.0, 1.0, 0.0, 0.0>;//not advised to make your own quaternion
         rotation input = <0.0, 1.0, 0.0, 0.0>;//not advised to make your own quaternion
         llSay(0,"The Rot2Euler of "+(string)input+" is: "+(string)llRot2Euler(input) );
         llSay(0,"The Rot2Euler of "+(string)input+" is: "+(string)llRot2Euler(input) );
     }
     }
}
}
</pre>
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||{{LSLG|llEuler2Rot}}|}}
|also_functions={{LSL DefineRow||[[llEuler2Rot]]|}}
|also_events
|also_events
|also_articles
|also_articles={{LSL DefineRow||{{Wikipedia|Euler_Angles}}|}}
|also_tests
|also_tests
|notes
|notes
|permission
|permission
|negative_index
|negative_index
|cat1=Math
|cat1=Math/3D
|cat2=Rotation
|cat2=Rotation
|cat3
|cat3=Euler
|cat4
|cat4
}}
}}

Revision as of 14:07, 30 March 2008

Summary

Function: vector llRot2Euler( rotation quat );
0.0 Forced Delay
10.0 Energy

Returns a vector that is the Euler representation (roll, pitch, yaw) of quat.

• rotation quat Any valid rotation

Caveats

  • Angles greater than PI (180 degrees) are returned as negative angles.

Examples

<lsl> default {

   state_entry()
   {
       rotation input = <0.0, 1.0, 0.0, 0.0>;//not advised to make your own quaternion
       llSay(0,"The Rot2Euler of "+(string)input+" is: "+(string)llRot2Euler(input) );
   }

}

</lsl>

See Also

Functions

•  llEuler2Rot

Articles

•  "Wikipedia logo"Euler_Angles

Deep Notes

Signature

function vector llRot2Euler( rotation quat );