Difference between revisions of "LlGetTextureOffset"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 5: Line 5:
|func_footnote
|func_footnote
|func_desc
|func_desc
|return_text=that is the texture offset of '''face''' in the x and y components
|return_text=that is the texture offset of '''face''' in the x and y components. Note that texture is usually referred to with "u" and "v"; u is the x value, v is the y value. The z value is ignored.
|spec
|spec
|caveats
|caveats
Line 24: Line 24:
     }
     }
}</lsl>
}</lsl>
<lsl>
vector offsetVec = llGetTextureOffset(0);
float u = offsetVec.x;
float v = offsetVec.y;
// z is not used.
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llOffsetTexture]]|}}
|also_functions={{LSL DefineRow||[[llOffsetTexture]]|}}

Revision as of 07:33, 8 March 2008

Summary

Function: vector llGetTextureOffset( integer face );
0.0 Forced Delay
10.0 Energy

Returns a vector that is the texture offset of face in the x and y components. Note that texture is usually referred to with "u" and "v"; u is the x value, v is the y value. The z value is ignored.

• integer face face number or ALL_SIDES

If face is ALL_SIDES then the function as if on face zero.

Caveats

  • If face indicates a face that does not exist the return is <0.0, 0.0, 0.0>

Examples

<lsl>//Tells the owner the texture offset on all sides default {

   state_entry()
   {
       integer i = 0;
       integer max = llGetNumberOfSides();
       while(i < max)
       {
           llSay(0,"Face "+(string)i+" texture offset is " + (string)llGetTextureOffset(i));
           ++i;
       }
   }

}</lsl> <lsl> vector offsetVec = llGetTextureOffset(0); float u = offsetVec.x; float v = offsetVec.y; // z is not used.

</lsl>

See Also

Functions

•  llOffsetTexture
•  llGetNumberOfSides

Deep Notes

Signature

function vector llGetTextureOffset( integer face );