aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs51
1 files changed, 0 insertions, 51 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index e76a37b..384f716 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -546,19 +546,6 @@ namespace OpenSim.Framework
546 } 546 }
547 547
548 /// <summary> 548 /// <summary>
549 /// Determines whether a point is inside a bounding box.
550 /// </summary>
551 /// <param name='v'></param>
552 /// <param name='min'></param>
553 /// <param name='max'></param>
554 /// <returns></returns>
555 public static bool IsInsideBox(Vector3 v, Vector3 min, Vector3 max)
556 {
557 return v.X >= min.X & v.Y >= min.Y && v.Z >= min.Z
558 && v.X <= max.X && v.Y <= max.Y && v.Z <= max.Z;
559 }
560
561 /// <summary>
562 /// Are the co-ordinates of the new region visible from the old region? 549 /// Are the co-ordinates of the new region visible from the old region?
563 /// </summary> 550 /// </summary>
564 /// <param name="oldx">Old region x-coord</param> 551 /// <param name="oldx">Old region x-coord</param>
@@ -875,12 +862,6 @@ namespace OpenSim.Framework
875 return Math.Min(Math.Max(x, min), max); 862 return Math.Min(Math.Max(x, min), max);
876 } 863 }
877 864
878 public static Vector3 Clip(Vector3 vec, float min, float max)
879 {
880 return new Vector3(Clip(vec.X, min, max), Clip(vec.Y, min, max),
881 Clip(vec.Z, min, max));
882 }
883
884 /// <summary> 865 /// <summary>
885 /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens. 866 /// Convert an UUID to a raw uuid string. Right now this is a string without hyphens.
886 /// </summary> 867 /// </summary>
@@ -1032,38 +1013,6 @@ namespace OpenSim.Framework
1032 } 1013 }
1033 } 1014 }
1034 1015
1035 /// <summary>
1036 /// Copy data from one stream to another, leaving the read position of both streams at the beginning.
1037 /// </summary>
1038 /// <param name='inputStream'>
1039 /// Input stream. Must be seekable.
1040 /// </param>
1041 /// <exception cref='ArgumentException'>
1042 /// Thrown if the input stream is not seekable.
1043 /// </exception>
1044 public static Stream Copy(Stream inputStream)
1045 {
1046 if (!inputStream.CanSeek)
1047 throw new ArgumentException("Util.Copy(Stream inputStream) must receive an inputStream that can seek");
1048
1049 const int readSize = 256;
1050 byte[] buffer = new byte[readSize];
1051 MemoryStream ms = new MemoryStream();
1052
1053 int count = inputStream.Read(buffer, 0, readSize);
1054
1055 while (count > 0)
1056 {
1057 ms.Write(buffer, 0, count);
1058 count = inputStream.Read(buffer, 0, readSize);
1059 }
1060
1061 ms.Position = 0;
1062 inputStream.Position = 0;
1063
1064 return ms;
1065 }
1066
1067 public static XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args) 1016 public static XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args)
1068 { 1017 {
1069 return SendXmlRpcCommand(url, methodName, args); 1018 return SendXmlRpcCommand(url, methodName, args);