feat: expose native oglGetRegionDimensions LSL function (#193)
* feat(lsl): expose OGL region XYZ dimensions * feat(lsl): expose OGL region XYZ dimensions * feat(lsl): expose OGL region XYZ dimensions * test/docs: document and guard native OGL region dimensions * test/docs: document and guard native OGL region dimensions * test/docs: document and guard native OGL region dimensions * ci: verify native OGL region dimension registration
This commit is contained in:
1 parent
6947586fed
commit
4a2fc74e24
7 files changed
+102
No files matched your search
@@ -6244,6 +6244,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the configured X, Y and Z dimensions of the current scene in metres.
|
||||
/// OpenGenesisLINK extension; independent of the OSSL permission switch.
|
||||
/// </summary>
|
||||
public LSL_Vector oglGetRegionDimensions()
|
||||
{
|
||||
RegionInfo region = World.RegionInfo;
|
||||
return new LSL_Vector((double)region.RegionSizeX,
|
||||
(double)region.RegionSizeY,
|
||||
(double)region.RegionSizeZ);
|
||||
}
|
||||
|
||||
public LSL_String llGetEnv(LSL_String name)
|
||||
{
|
||||
string sname = name;
|
||||
|
||||
@@ -205,6 +205,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_List llGetPrimitiveParams(LSL_List rules);
|
||||
LSL_Integer llGetRegionAgentCount();
|
||||
LSL_Vector llGetRegionCorner();
|
||||
// OGL extension: actual scene dimensions including configured vertical extent.
|
||||
LSL_Vector oglGetRegionDimensions();
|
||||
LSL_Integer llGetRegionFlags();
|
||||
LSL_Float llGetRegionFPS();
|
||||
LSL_String llGetRegionName();
|
||||
|
||||
@@ -933,6 +933,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llGetRegionCorner();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Vector oglGetRegionDimensions()
|
||||
{
|
||||
return m_LSL_Functions.oglGetRegionDimensions();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Integer llGetRegionFlags()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user