OsGetPhysicsEngineType

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
m (Added permissions, and delay information)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|threat_level=High
 
|threat_level=High
 +
|permissions=true
 +
|delay=0
 
|function_syntax=string osGetPhysicsEngineType()
 
|function_syntax=string osGetPhysicsEngineType()
 
|ossl_example=<source lang = "lsl">
 
|ossl_example=<source lang = "lsl">
Line 36: Line 38:
 
}}
 
}}
 
Notes:
 
Notes:
This function does not throw an exception if the threat level is not high enough. If 'os' functions are enabled, this function will return an empty string if the threat level is not met. This allows vehicle scripts to always check this and not worry about exceptions.
+
This function does not throw an exception if the threat level is not high enough. If 'os' functions are enabled this function will return an empty string if the threat level is not met. This allows vehicle scripts to always check this and not worry about exceptions.
  
 
The value returned is the name of the physics engine specified in the OpenSim.ini file ("physics = XXX"). It is usually either "OpenDynamicsEngine" or "BulletSim".
 
The value returned is the name of the physics engine specified in the OpenSim.ini file ("physics = XXX"). It is usually either "OpenDynamicsEngine" or "BulletSim".

Revision as of 13:03, 13 December 2016

string osGetPhysicsEngineType()
This function returns a string containing the name of the Physics Engine.
Threat Level High
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
// ----------------------------------------------------------------
// Example / Sample Script to show function use.
//
// Script Title:    osGetPhysicsEngineType.lsl
// Script Author:   
// Threat Level:    High
// Script Source:   http://opensimulator.org/wiki/OsGetPhysicsEngineType
//
// Notes: See Script Source reference for more detailed information
// This sample is full opensource and available to use as you see fit and desire.
// Threat Levels only apply to OSSL & AA Functions
// See http://opensimulator.org/wiki/Threat_level
// ================================================================
// Inworld Script Line:    string osGetPhysicsEngineType();
//
// Example of osGetPhysicsEngineType()
//
default
{
    state_entry() // display @ start
    {
        llSay(0, "Touch me to get the physics engine type using osGetPhysicsEngineType");
    }
    touch_end(integer num) // Tell toucher our version
    {
        llInstantMessage(llDetectedKey(0), "Physics engine type: "+osGetPhysicsEngineType());
    }
}


Notes: This function does not throw an exception if the threat level is not high enough. If 'os' functions are enabled this function will return an empty string if the threat level is not met. This allows vehicle scripts to always check this and not worry about exceptions.

The value returned is the name of the physics engine specified in the OpenSim.ini file ("physics = XXX"). It is usually either "OpenDynamicsEngine" or "BulletSim".

Personal tools
General
About This Wiki