aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs
parent* Deleted .user file (diff)
downloadopensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs')
-rw-r--r--OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs52
1 files changed, 26 insertions, 26 deletions
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs
index eb85dbe..2895c4e 100644
--- a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs
+++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs
@@ -27,26 +27,25 @@
27*/ 27*/
28 28
29using System; 29using System;
30using System.Collections.Generic;
31using System.Text; 30using System.Text;
31using Axiom.Math;
32using OpenSim.Framework.Console;
33using OpenSim.Region.Environment.LandManagement;
34using OpenSim.Region.Environment.Scenes;
32using Key = libsecondlife.LLUUID; 35using Key = libsecondlife.LLUUID;
33using Rotation = libsecondlife.LLQuaternion; 36using Rotation = libsecondlife.LLQuaternion;
34using Vector = libsecondlife.LLVector3; 37using Vector = libsecondlife.LLVector3;
35using LSLList = System.Collections.Generic.List<string>; 38using LSLList = System.Collections.Generic.List<string>;
36 39
37using OpenSim.Region.Environment.Scenes;
38using OpenSim.Region.Environment.LandManagement;
39using libsecondlife;
40
41namespace OpenSim.Region.ExtensionsScriptModule 40namespace OpenSim.Region.ExtensionsScriptModule
42{ 41{
43 /// <summary> 42 /// <summary>
44 /// A class inteded to act as an API for LSL-styled interpreted languages 43 /// A class inteded to act as an API for LSL-styled interpreted languages
45 /// </summary> 44 /// </summary>
46 /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> 45 /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks>
47 class ScriptInterpretedAPI 46 internal class ScriptInterpretedAPI
48 { 47 {
49 protected LLUUID m_object; 48 protected Key m_object;
50 protected Scene m_scene; 49 protected Scene m_scene;
51 50
52 /// <summary> 51 /// <summary>
@@ -78,7 +77,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
78 /// </summary> 77 /// </summary>
79 /// <param name="world">The scene the object is located in</param> 78 /// <param name="world">The scene the object is located in</param>
80 /// <param name="member">The specific member being 'occupied' by the script</param> 79 /// <param name="member">The specific member being 'occupied' by the script</param>
81 public ScriptInterpretedAPI(Scene world, libsecondlife.LLUUID member) 80 public ScriptInterpretedAPI(Scene world, Key member)
82 { 81 {
83 m_scene = world; 82 m_scene = world;
84 m_object = member; 83 m_object = member;
@@ -96,7 +95,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
96 95
97 public float osAcos(float val) 96 public float osAcos(float val)
98 { 97 {
99 return (float)Math.Acos(val); 98 return (float) Math.Acos(val);
100 } 99 }
101 100
102 [Obsolete("Unimplemented")] 101 [Obsolete("Unimplemented")]
@@ -105,14 +104,15 @@ namespace OpenSim.Region.ExtensionsScriptModule
105 Vector myPosition = Task.AbsolutePosition; 104 Vector myPosition = Task.AbsolutePosition;
106 Land myParcel = Scene.LandManager.getLandObject(myPosition.X, myPosition.Y); 105 Land myParcel = Scene.LandManager.getLandObject(myPosition.X, myPosition.Y);
107 106
108 OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); 107 MainLog.Instance.Warn("script",
108 "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)");
109 return; 109 return;
110 } 110 }
111 111
112 [Obsolete("Unimplemented")] 112 [Obsolete("Unimplemented")]
113 public void osAdjustSoundVolume(float volume) 113 public void osAdjustSoundVolume(float volume)
114 { 114 {
115 OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAdjustSoundVolume(float volume)"); 115 MainLog.Instance.Warn("script", "Unimplemented function called by script: osAdjustSoundVolume(float volume)");
116 return; 116 return;
117 } 117 }
118 118
@@ -125,8 +125,8 @@ namespace OpenSim.Region.ExtensionsScriptModule
125 [Obsolete("Unimplemented")] 125 [Obsolete("Unimplemented")]
126 public float osAngleBetween(Rotation a, Rotation b) 126 public float osAngleBetween(Rotation a, Rotation b)
127 { 127 {
128 Axiom.Math.Quaternion axA = new Axiom.Math.Quaternion(a.W, a.X, a.Y, a.Z); 128 Quaternion axA = new Quaternion(a.W, a.X, a.Y, a.Z);
129 Axiom.Math.Quaternion axB = new Axiom.Math.Quaternion(b.W, b.X, b.Y, b.Z); 129 Quaternion axB = new Quaternion(b.W, b.X, b.Y, b.Z);
130 130
131 return 0; 131 return 0;
132 } 132 }
@@ -145,12 +145,12 @@ namespace OpenSim.Region.ExtensionsScriptModule
145 145
146 public float osAsin(float val) 146 public float osAsin(float val)
147 { 147 {
148 return (float)Math.Asin(val); 148 return (float) Math.Asin(val);
149 } 149 }
150 150
151 public float osAtan2(float x, float y) 151 public float osAtan2(float x, float y)
152 { 152 {
153 return (float)Math.Atan2(x, y); 153 return (float) Math.Atan2(x, y);
154 } 154 }
155 155
156 [Obsolete("Unimplemented")] 156 [Obsolete("Unimplemented")]
@@ -178,10 +178,10 @@ namespace OpenSim.Region.ExtensionsScriptModule
178 178
179 public Rotation osAxes2Rot(Vector fwd, Vector left, Vector up) 179 public Rotation osAxes2Rot(Vector fwd, Vector left, Vector up)
180 { 180 {
181 Axiom.Math.Quaternion axQ = new Axiom.Math.Quaternion(); 181 Quaternion axQ = new Quaternion();
182 Axiom.Math.Vector3 axFwd = new Axiom.Math.Vector3(fwd.X, fwd.Y, fwd.Z); 182 Vector3 axFwd = new Vector3(fwd.X, fwd.Y, fwd.Z);
183 Axiom.Math.Vector3 axLeft = new Axiom.Math.Vector3(left.X, left.Y, left.Z); 183 Vector3 axLeft = new Vector3(left.X, left.Y, left.Z);
184 Axiom.Math.Vector3 axUp = new Axiom.Math.Vector3(up.X, up.Y, up.Z); 184 Vector3 axUp = new Vector3(up.X, up.Y, up.Z);
185 185
186 axQ.FromAxes(axFwd, axLeft, axUp); 186 axQ.FromAxes(axFwd, axLeft, axUp);
187 187
@@ -190,14 +190,14 @@ namespace OpenSim.Region.ExtensionsScriptModule
190 190
191 public Rotation osAxisAngle2Rot(Vector axis, float angle) 191 public Rotation osAxisAngle2Rot(Vector axis, float angle)
192 { 192 {
193 Axiom.Math.Quaternion axQ = Axiom.Math.Quaternion.FromAngleAxis(angle, new Axiom.Math.Vector3(axis.X, axis.Y, axis.Z)); 193 Quaternion axQ = Quaternion.FromAngleAxis(angle, new Vector3(axis.X, axis.Y, axis.Z));
194 194
195 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w); 195 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w);
196 } 196 }
197 197
198 public string osBase64ToString(string str) 198 public string osBase64ToString(string str)
199 { 199 {
200 Encoding enc = System.Text.Encoding.UTF8; 200 Encoding enc = Encoding.UTF8;
201 return enc.GetString(Convert.FromBase64String(str)); 201 return enc.GetString(Convert.FromBase64String(str));
202 } 202 }
203 203
@@ -223,7 +223,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
223 223
224 public int osCeil(float val) 224 public int osCeil(float val)
225 { 225 {
226 return (int)Math.Ceiling(val); 226 return (int) Math.Ceiling(val);
227 } 227 }
228 228
229 [Obsolete("Unimplemented")] 229 [Obsolete("Unimplemented")]
@@ -252,13 +252,13 @@ namespace OpenSim.Region.ExtensionsScriptModule
252 252
253 public float osCos(float theta) 253 public float osCos(float theta)
254 { 254 {
255 return (float)Math.Cos(theta); 255 return (float) Math.Cos(theta);
256 } 256 }
257 257
258 public void osCreateLink(Key target, int parent) 258 public void osCreateLink(Key target, int parent)
259 { 259 {
260 if(Scene.Entities[target] is SceneObjectGroup) 260 if (Scene.Entities[target] is SceneObjectGroup)
261 Task.LinkToGroup((SceneObjectGroup)Scene.Entities[target]); 261 Task.LinkToGroup((SceneObjectGroup) Scene.Entities[target]);
262 262
263 return; 263 return;
264 } 264 }
@@ -292,4 +292,4 @@ namespace OpenSim.Region.ExtensionsScriptModule
292 return; 292 return;
293 } 293 }
294 } 294 }
295} 295} \ No newline at end of file