mirror of
https://github.com/opensim/opensim.git
synced 2026-07-20 22:55:38 +08:00
add LSL llLinear2sRGB and llsRGB2Linear
This commit is contained in:
@@ -18281,6 +18281,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return src;
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_Vector llLinear2sRGB(LSL_Vector src)
|
||||
{
|
||||
return new LSL_Vector(Util.LinearTosRGB((float)src.x), Util.LinearTosRGB((float)src.y), Util.LinearTosRGB((float)src.z));
|
||||
}
|
||||
|
||||
public LSL_Vector llsRGB2Linear(LSL_Vector src)
|
||||
{
|
||||
return new LSL_Vector(Util.sRGBtoLinear((float)src.x), Util.sRGBtoLinear((float)src.y), Util.sRGBtoLinear((float)src.z));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class NotecardCache
|
||||
|
||||
@@ -495,5 +495,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void llLinkPlaySound(LSL_Integer linknumber, string sound, double volume);
|
||||
void llLinkSetSoundQueueing(int linknumber, int queue);
|
||||
void llLinkSetSoundRadius(int linknumber, double radius);
|
||||
|
||||
LSL_Vector llLinear2sRGB(LSL_Vector src);
|
||||
LSL_Vector llsRGB2Linear(LSL_Vector src);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2682,5 +2682,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
m_LSL_Functions.llLinkSetSoundRadius(linknumber, radius);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Vector llLinear2sRGB(LSL_Vector src)
|
||||
{
|
||||
return m_LSL_Functions.llLinear2sRGB(src);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Vector llsRGB2Linear(LSL_Vector src)
|
||||
{
|
||||
return m_LSL_Functions.llsRGB2Linear(src);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user