add a few more parameters to llGetObjectDetails(); add intger log2(uint)

This commit is contained in:
UbitUmarov
2022-08-23 17:26:09 +01:00
parent 1456f43bc3
commit d545506efc
6 changed files with 110 additions and 11 deletions

View File

@@ -203,14 +203,15 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
m_primMesher = RenderingLoader.LoadRenderer(renderers[0]);
}
viewWitdh = (int)m_scene.RegionInfo.RegionSizeX;
viewHeight = (int)m_scene.RegionInfo.RegionSizeY;
cameraPos = new Vector3(
(m_scene.RegionInfo.RegionSizeX) * 0.5f,
(m_scene.RegionInfo.RegionSizeY) * 0.5f,
viewWitdh * 0.5f,
viewHeight * 0.5f,
m_cameraHeight);
cameraDir = -Vector3.UnitZ;
viewWitdh = (int)m_scene.RegionInfo.RegionSizeX;
viewHeight = (int)m_scene.RegionInfo.RegionSizeY;
orto = true;
Bitmap tile = GenImage();
@@ -341,9 +342,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
int bitWidth;
int bitHeight;
const double log2inv = 1.4426950408889634073599246810019;
bitWidth = (int)Math.Ceiling((Math.Log(terrain.Width) * log2inv));
bitHeight = (int)Math.Ceiling((Math.Log(terrain.Height) * log2inv));
bitWidth = Util.intLog2((uint)terrain.Width);
bitHeight = Util.intLog2((uint)terrain.Height);
if (bitWidth > 8) // more than 256 is very heavy :(
bitWidth = 8;