From 25a49ac4de056f43d6c5803fcd34804fcea96ae2 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Wed, 30 Apr 2008 23:11:07 +0000
Subject: * Spring cleaned a bunch of '//TODO: unused' marked functions.
---
.../Agent/AssetDownload/AssetDownloadModule.cs | 114 ---------------------
.../DynamicTexture/DynamicTextureModule.cs | 6 --
.../World/Terrain/PaintBrushes/FlattenSphere.cs | 33 ------
OpenSim/Region/Environment/Scenes/Scene.cs | 22 ----
.../Engines/CSharp/Examples/ExportRegionToLSL.cs | 19 ----
5 files changed, 194 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
index 33e917a..c0b7380 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
@@ -178,120 +178,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
}
}
-// TODO: unused
-// private void RunAssetQueue()
-// {
-// while (true)
-// {
-// try
-// {
-// ProcessAssetQueue();
-// Thread.Sleep(500);
-// }
-// catch (Exception)
-// {
-// // m_log.Error("[ASSET CACHE]: " + e.ToString());
-// }
-// }
-// }
-
-// TODO: unused
-// ///
-// /// Process the asset queue which sends packets directly back to the client.
-// ///
-// private void ProcessAssetQueue()
-// {
-// //should move the asset downloading to a module, like has been done with texture downloading
-// if (AssetRequests.Count == 0)
-// {
-// //no requests waiting
-// return;
-// }
-// // if less than 5, do all of them
-// int num = Math.Min(5, AssetRequests.Count);
-
-// AssetRequest req;
-// for (int i = 0; i < num; i++)
-// {
-// req = (AssetRequest)AssetRequests[i];
-// //Console.WriteLine("sending asset " + req.RequestAssetID);
-// TransferInfoPacket Transfer = new TransferInfoPacket();
-// Transfer.TransferInfo.ChannelType = 2;
-// Transfer.TransferInfo.Status = 0;
-// Transfer.TransferInfo.TargetType = 0;
-// if (req.AssetRequestSource == 2)
-// {
-// Transfer.TransferInfo.Params = new byte[20];
-// Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
-// int assType = (int)req.AssetInf.Type;
-// Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
-// }
-// else if (req.AssetRequestSource == 3)
-// {
-// Transfer.TransferInfo.Params = req.Params;
-// // Transfer.TransferInfo.Params = new byte[100];
-// //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
-// //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16);
-// }
-// Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
-// Transfer.TransferInfo.TransferID = req.TransferRequestID;
-// req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset);
-
-// if (req.NumPackets == 1)
-// {
-// TransferPacketPacket TransferPacket = new TransferPacketPacket();
-// TransferPacket.TransferData.Packet = 0;
-// TransferPacket.TransferData.ChannelType = 2;
-// TransferPacket.TransferData.TransferID = req.TransferRequestID;
-// TransferPacket.TransferData.Data = req.AssetInf.Data;
-// TransferPacket.TransferData.Status = 1;
-// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
-// }
-// else
-// {
-// int processedLength = 0;
-// // libsecondlife hardcodes 1500 as the maximum data chunk size
-// int maxChunkSize = 1250;
-// int packetNumber = 0;
-
-// while (processedLength < req.AssetInf.Data.Length)
-// {
-// TransferPacketPacket TransferPacket = new TransferPacketPacket();
-// TransferPacket.TransferData.Packet = packetNumber;
-// TransferPacket.TransferData.ChannelType = 2;
-// TransferPacket.TransferData.TransferID = req.TransferRequestID;
-
-// int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize);
-// byte[] chunk = new byte[chunkSize];
-// Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length);
-
-// TransferPacket.TransferData.Data = chunk;
-
-// // 0 indicates more packets to come, 1 indicates last packet
-// if (req.AssetInf.Data.Length - processedLength > maxChunkSize)
-// {
-// TransferPacket.TransferData.Status = 0;
-// }
-// else
-// {
-// TransferPacket.TransferData.Status = 1;
-// }
-
-// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
-
-// processedLength += chunkSize;
-// packetNumber++;
-// }
-// }
-// }
-
-// //remove requests that have been completed
-// for (int i = 0; i < num; i++)
-// {
-// AssetRequests.RemoveAt(0);
-// }
-// }
-
///
/// Calculate the number of packets required to send the asset to the client.
///
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 735a3cf..68ca5e9 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -239,12 +239,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
part.ScheduleFullUpdate();
}
-// TODO: unused
-// private byte[] BlendTextures(byte[] frontImage, byte[] backImage)
-// {
-// return BlendTextures(frontImage, backImage, false, 0);
-// }
-
private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
{
Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage));
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
index 6a5a166..d4f3b9f 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/PaintBrushes/FlattenSphere.cs
@@ -31,39 +31,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
public class FlattenSphere : ITerrainPaintableEffect
{
-// TODO: unused
-// private double GetBilinearInterpolate(double x, double y, ITerrainChannel map)
-// {
-// int w = map.Width;
-// int h = map.Height;
-
-// if (x > w - 2.0)
-// x = w - 2.0;
-// if (y > h - 2.0)
-// y = h - 2.0;
-// if (x < 0.0)
-// x = 0.0;
-// if (y < 0.0)
-// y = 0.0;
-
-// int stepSize = 1;
-// double h00 = map[(int)x, (int)y];
-// double h10 = map[(int)x + stepSize, (int)y];
-// double h01 = map[(int)x, (int)y + stepSize];
-// double h11 = map[(int)x + stepSize, (int)y + stepSize];
-// double h1 = h00;
-// double h2 = h10;
-// double h3 = h01;
-// double h4 = h11;
-// double a00 = h1;
-// double a10 = h2 - h1;
-// double a01 = h3 - h1;
-// double a11 = h1 - h2 - h3 + h4;
-// double partialx = x - (int)x;
-// double partialz = y - (int)y;
-// double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz);
-// return hi;
-// }
#region ITerrainPaintableEffect Members
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 4a80b8d..2ce6314 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -794,28 +794,6 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- //Updates the time in the viewer.
-// TODO: unused
-// private void UpdateInWorldTime()
-// {
-// m_timeUpdateCount++;
-// if (m_timeUpdateCount > 600)
-// {
-// List avatars = GetAvatars();
-// foreach (ScenePresence avatar in avatars)
-// {
-// avatar.ControllingClient.SendViewerTime(m_timePhase);
-// }
-
-// m_timeUpdateCount = 0;
-// m_timePhase++;
-// if (m_timePhase > 94)
-// {
-// m_timePhase = 0;
-// }
-// }
-// }
-
private void SendSimStatsPackets(SimStatsPacket pack)
{
List StatSendAgents = GetScenePresences();
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
index 00a7df3..1b0b6b7 100644
--- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
+++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
@@ -71,24 +71,5 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
System.Console.WriteLine(sequence);
}*/
}
-
-// TODO: unused
-// private string processPrimitiveToString(SceneObjectPart prim)
-// {
-// /*string desc = prim.Description;
-// string name = prim.Name;
-// LLVector3 pos = prim.Pos;
-// LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w);
-// LLVector3 scale = prim.Scale;
-// LLVector3 rootPos = prim.WorldPos;
-
-// string setPrimParams = String.Empty;
-
-// setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n";
-
-// return setPrimParams;
-// */
-// return System.String.Empty;
-// }
}
}
--
cgit v1.1