Thank you kindly, MCortez for a patch that:

With some support from HomerH, this patch adds support for Wind 
Model plugins via the mono.Addin framework.
* Adds console & OSSL access to Wind Parameters
* Adds plug-in support for custom wind models
* Provides two example Wind Model plug-ins
Documentation for the wind module is temporarily located at http://code.google.com/p/flotsam/wiki/CoreWindModule [^] 
-- will move this documentation to http://opensimulator.org [^] 
after the patch has been committed.
This commit is contained in:
Charles Krinke
2009-03-31 02:33:19 +00:00
parent 54ccca1e2c
commit 54a27f9f5c
11 changed files with 833 additions and 118 deletions

View File

@@ -268,7 +268,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
//
// OpenSim functions
//
public int osTerrainSetHeight(int x, int y, double val)
{
CheckThreatLevel(ThreatLevel.High, "osTerrainSetHeight");
@@ -920,6 +919,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
public string osWindActiveModelPluginName()
{
CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName");
m_host.AddScriptLPS(1);
IWindModule module = World.RequestModuleInterface<IWindModule>();
if (module != null)
{
return module.WindActiveModelPluginName;
}
return String.Empty;
}
public void osWindParamSet(string plugin, string param, float value)
{
CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamSet");
m_host.AddScriptLPS(1);
IWindModule module = World.RequestModuleInterface<IWindModule>();
if (module != null)
{
try
{
module.WindParamSet(plugin, param, value);
}
catch (Exception) { }
}
}
public float osWindParamGet(string plugin, string param)
{
CheckThreatLevel(ThreatLevel.VeryLow, "osWindParamGet");
m_host.AddScriptLPS(1);
IWindModule module = World.RequestModuleInterface<IWindModule>();
if (module != null)
{
return module.WindParamGet(plugin, param);
}
return 0.0f;
}
public double osList2Double(LSL_Types.list src, int index)

View File

@@ -104,6 +104,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
double osSunGetParam(string param);
void osSunSetParam(string param, double value);
// Wind Module Functions
string osWindActiveModelPluginName();
void osWindParamSet(string plugin, string param, float value);
float osWindParamGet(string plugin, string param);
string osGetScriptEngineName();
string osGetSimulatorVersion();

View File

@@ -87,6 +87,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_OSSL_Functions.osSunSetParam(param, value);
}
public string osWindActiveModelPluginName()
{
return m_OSSL_Functions.osWindActiveModelPluginName();
}
void osWindParamSet(string plugin, string param, float value)
{
m_OSSL_Functions.osWindParamSet(plugin, param, value);
}
float osWindParamGet(string plugin, string param)
{
return m_OSSL_Functions.osWindParamGet(plugin, param);
}
public double osList2Double(LSL_Types.list src, int index)
{