OsSetProjectionParams

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc|
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
threat_level = High
|- valign="top"
+
|
|'''Threat Level''' || High
+
function_syntax = <source lang="lsl">
 
+
|- valign="top"
+
|'''Function Syntax''' || <source lang="lsl">
+
 
osSetProjectionParams(bool projection, key texture, double fov, double focus, double amb);
 
osSetProjectionParams(bool projection, key texture, double fov, double focus, double amb);
 
osSetProjectionParams(key prim, bool projection, key texture, double fov, double focus, double amb);
 
osSetProjectionParams(key prim, bool projection, key texture, double fov, double focus, double amb);
 
</source>
 
</source>
|- valign="top"
+
|
|'''Example(s)||This example will control the projection map in the host prim and another prim identified by it's uuid
+
ossl_example = This example will control the projection map in the host prim and another prim identified by it's uuid
  
 
<source lang="lsl">
 
<source lang="lsl">
Line 61: Line 58:
 
}
 
}
 
</source>
 
</source>
 
+
|  
|}
+
additional_info = 2 Variations possible.
2 Variations possible.
+
 
*bool = TRUE / FALSE.
 
*bool = TRUE / FALSE.
 
*double = float.
 
*double = float.
 
+
|
[[Category:OSSL Functions]]
+
}}

Revision as of 17:41, 12 June 2011

osSetProjectionParams(bool projection, key texture, double fov, double focus, double amb);
osSetProjectionParams(key prim, bool projection, key texture, double fov, double focus, double amb);
No descriptions provided
Threat Level High
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
This example will control the projection map in the host prim and another prim identified by it's uuid
integer pstate = FALSE;
 
// These variables corospond to the settings found in the
// "Features" tab of the build editor
float FOV = 1.5; // Values 0.00 - 3.00
float Focus = 15.0; // Values -20.00 - 20.00
float Ambiance = 0.4; // Values 0.00 - 1.00
key Texture = "b4c6b075-4940-4270-bb10-d293fd6f8091";
 
// UUID of other prim that we wnat to control
key Remote = "9772974a-a0f6-43ec-b1a2-da558b0b0d59";
 
default
{
    state_entry()
    {
        llSay(0, "Script running");
        llSetText((string)llGetKey(),<0.3,0.5,0.75>,1.0);
        llSetPrimitiveParams([]);
 
        // Light must be enabled in "Features"
 
        // This one controls this prim...
        osSetProjectionParams(pstate, Texture, FOV, Focus, Ambiance);
        // This one controls the remote prim...
        osSetProjectionParams(Remote, pstate, Texture, FOV, Focus, Ambiance);
 
    }
 
    touch_start(integer _det) 
    {
 
        if (pstate == TRUE) 
        {
            pstate = FALSE;
        }
        else
        {
            pstate = TRUE;
        }
 
        // Control this prim...
        osSetProjectionParams(pstate, Texture, FOV, Focus, Ambiance);
        // Control the remote prim...
        osSetProjectionParams(Remote, pstate, Texture, FOV, Focus, Ambiance);
    }
}
Notes
2 Variations possible.
  • bool = TRUE / FALSE.
  • double = float.
Personal tools
General
About This Wiki