Difference between revisions of "LlGetTextureRot"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LSL_Function/face|side|}}
{{LSL_Function
{{LSL_Function
|inject-2={{LSL_Function/face|face|return=0.0}}
{{LSL_Function/angle|angle}}
|func_id=180|func_sleep=0.0|func_energy=10.0
|func_id=180|func_sleep=0.0|func_energy=10.0
|func=llGetTextureRot
|func=llGetTextureRot
|return_type=float|p1_type=integer|p1_name=side
|return_type=float|p1_type=integer|p1_name=face
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=that is the texture rotation of '''side'''
|return_text=that is the texture rotation, expressed as an {{LSLP|angle}}, on {{LSLP|face}}
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples=<pre>
|examples=<source lang="lsl2">//Tells the owner the texture rotation on all sides
//Tells the owner the texture rotation on 6 sides
default
default
{
{
     state_entry()
     state_entry()
     {
     {
         integer i;
         integer i = 0;
         for( i = 1; i < 7; i++ )
         integer max = llGetNumberOfSides();
         llSay(0,"Side " + (string)i + " texture offset is: " + (string)llGetTextureRot(i));
        while(i < max)
         {
            llSay(0,"Face "+(string)i+" texture rotation is " + (string)llGetTextureRot(i));
            ++i;
        }
     }
     }
}
}</source>
</pre>
|helpers
|helpers
|also_functions
|also_functions={{LSL DefineRow||[[llRotateTexture]]|}}
{{LSL DefineRow||[[llGetNumberOfSides]]|}}
|also_tests
|also_tests
|also_events
|also_events
Line 29: Line 33:
|notes
|notes
|cat1=Texture
|cat1=Texture
|cat2
|cat2=Face
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 03:02, 22 January 2015

Summary

Function: float llGetTextureRot( integer face );

Returns a float that is the texture rotation, expressed as an angle, on face

• integer face face number or ALL_SIDES

If face is ALL_SIDES then the function works on all sides.

Caveats

  • If face indicates a face that does not exist the return is 0.0
All Issues ~ Search JIRA for related Bugs

Examples

//Tells the owner the texture rotation on all sides
default
{
    state_entry()
    {
        integer i = 0;
        integer max = llGetNumberOfSides();
        while(i < max)
        {
            llSay(0,"Face "+(string)i+" texture rotation is " + (string)llGetTextureRot(i));
            ++i;
        }
    }
}

See Also

Functions

•  llRotateTexture
•  llGetNumberOfSides

Deep Notes

Search JIRA for related Issues

Signature

function float llGetTextureRot( integer face );