aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs139
1 files changed, 2 insertions, 137 deletions
diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
index 702653e..6a2b839 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptAPI.cs
@@ -16,152 +16,17 @@ namespace OpenSim.Region.Environment.Scripting
16 public class ScriptAPI 16 public class ScriptAPI
17 { 17 {
18 Scene scene; 18 Scene scene;
19 ScriptInterpretedAPI interpretedAPI;
19 20
20 public ScriptAPI(Scene world) 21 public ScriptAPI(Scene world)
21 { 22 {
22 scene = world; 23 scene = world;
24 interpretedAPI = new ScriptInterpretedAPI();
23 } 25 }
24 26
25 public Object CallMethod(String method, Object[] args) 27 public Object CallMethod(String method, Object[] args)
26 { 28 {
27 return null; 29 return null;
28 } 30 }
29
30 // LSL Compatibility below
31 // remap LL* functions to OS*
32 public int osAbs(int val)
33 {
34 return Math.Abs(val);
35 }
36
37 public float osAcos(float val)
38 {
39 return (float)Math.Acos(val);
40 }
41
42 [Obsolete("Unimplemented")]
43 public void osAddToLandPassList(Key avatar, float hours)
44 {
45 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)");
46 return;
47 }
48
49 [Obsolete("Unimplemented")]
50 public void osAdjustSoundVolume(float volume)
51 {
52 OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAdjustSoundVolume(float volume)");
53 return;
54 }
55
56 [Obsolete("Unimplemented")]
57 public void osAllowInventoryDrop(int add)
58 {
59 return;
60 }
61
62 [Obsolete("Unimplemented")]
63 public float osAngleBetween(Rotation a, Rotation b)
64 {
65 Axiom.Math.Quaternion axA = new Axiom.Math.Quaternion(a.W, a.X, a.Y, a.Z);
66 Axiom.Math.Quaternion axB = new Axiom.Math.Quaternion(b.W, b.X, b.Y, b.Z);
67
68 return 0;
69 }
70
71 [Obsolete("Unimplemented")]
72 public void osApplyImpulse(Vector force, int local)
73 {
74 return;
75 }
76
77 [Obsolete("Unimplemented")]
78 public void osApplyRotationalImpulse(Vector force, int local)
79 {
80 return;
81 }
82
83 public float osAsin(float val)
84 {
85 return (float)Math.Asin(val);
86 }
87
88 public float osAtan2(float x, float y)
89 {
90 return (float)Math.Atan2(x, y);
91 }
92
93 [Obsolete("Unimplemented")]
94 public void osAttachToAvatar(Key avatar, int attachmentPoint)
95 {
96 return;
97 }
98
99 [Obsolete("Unimplemented")]
100 public Key osAvatarOnSitTarget()
101 {
102 return Key.Zero;
103 }
104
105 public Rotation osAxes2Rot(Vector fwd, Vector left, Vector up)
106 {
107 Axiom.Math.Quaternion axQ = new Axiom.Math.Quaternion();
108 Axiom.Math.Vector3 axFwd = new Axiom.Math.Vector3(fwd.X, fwd.Y, fwd.Z);
109 Axiom.Math.Vector3 axLeft = new Axiom.Math.Vector3(left.X, left.Y, left.Z);
110 Axiom.Math.Vector3 axUp = new Axiom.Math.Vector3(up.X, up.Y, up.Z);
111
112 axQ.FromAxes(axFwd, axLeft, axUp);
113
114 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w);
115 }
116
117 public Rotation osAxisAngle2Rot(Vector axis, float angle)
118 {
119 Axiom.Math.Quaternion axQ = Axiom.Math.Quaternion.FromAngleAxis(angle, new Axiom.Math.Vector3(axis.X, axis.Y, axis.Z));
120
121 return new Rotation(axQ.x, axQ.y, axQ.z, axQ.w);
122 }
123
124 public string osBase64ToString(string str)
125 {
126 Encoding enc = System.Text.Encoding.UTF8;
127 return enc.GetString(Convert.FromBase64String(str));
128 }
129
130 [Obsolete("Unimplemented")]
131 public void osBreakAllLinks()
132 {
133 return;
134 }
135
136 [Obsolete("Unimplemented")]
137 public void osBreakLink()
138 {
139 return;
140 }
141
142 public LSLList osCSV2List(string src)
143 {
144 LSLList retVal = new LSLList();
145 retVal.AddRange(src.Split(','));
146
147 return retVal;
148 }
149
150 public int osCeil(float val)
151 {
152 return (int)Math.Ceiling(val);
153 }
154
155 [Obsolete("Unimplemented")]
156 public void osCloseRemoteDataChannel(Key channel)
157 {
158 return;
159 }
160
161 [Obsolete("Unimplemented")]
162 public float osCloud(Vector offset)
163 {
164 return 0.0;
165 }
166 } 31 }
167} 32}