diff options
author | Teravus Ovares | 2008-05-30 12:27:06 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-30 12:27:06 +0000 |
commit | 1a47ff8094ee414a47aebd310826906d89428a09 (patch) | |
tree | 0e90b3a33f43ff8617a077bb57b86d6b28e63e71 /OpenSim/Region/ScriptEngine/XEngine/Script | |
parent | * Fixed a dangling event hook that I added. (diff) | |
download | opensim-SC-1a47ff8094ee414a47aebd310826906d89428a09.zip opensim-SC-1a47ff8094ee414a47aebd310826906d89428a09.tar.gz opensim-SC-1a47ff8094ee414a47aebd310826906d89428a09.tar.bz2 opensim-SC-1a47ff8094ee414a47aebd310826906d89428a09.tar.xz |
* This is Melanie's XEngine script engine. I've not tested this real well, however, it's confirmed to compile and OpenSimulator to run successfully without this script engine active.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/Script')
6 files changed, 4636 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs new file mode 100644 index 0000000..8107788 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs | |||
@@ -0,0 +1,65 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.IO; | ||
30 | using System.Reflection; | ||
31 | |||
32 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | ||
33 | { | ||
34 | [Serializable] | ||
35 | public class AssemblyResolver | ||
36 | { | ||
37 | public static Assembly OnAssemblyResolve(object sender, | ||
38 | ResolveEventArgs args) | ||
39 | { | ||
40 | if(!(sender is System.AppDomain)) | ||
41 | return null; | ||
42 | |||
43 | AppDomain myDomain = (AppDomain)sender; | ||
44 | string dirName = myDomain.FriendlyName; | ||
45 | |||
46 | string[] pathList=new string[] {"bin", "ScriptEngines", | ||
47 | Path.Combine("ScriptEngines", dirName)}; | ||
48 | |||
49 | string assemblyName = args.Name; | ||
50 | if(assemblyName.IndexOf(",") != -1) | ||
51 | assemblyName=args.Name.Substring(0, args.Name.IndexOf(",")); | ||
52 | |||
53 | foreach (string s in pathList) | ||
54 | { | ||
55 | string path=Path.Combine(Directory.GetCurrentDirectory(), | ||
56 | Path.Combine(s, assemblyName))+".dll"; | ||
57 | |||
58 | if(File.Exists(path)) | ||
59 | return Assembly.LoadFrom(path); | ||
60 | } | ||
61 | |||
62 | return null; | ||
63 | } | ||
64 | } | ||
65 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/BuiltIn_Commands_BaseClass.cs new file mode 100644 index 0000000..bae8192 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/BuiltIn_Commands_BaseClass.cs | |||
@@ -0,0 +1,2393 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Runtime.Remoting.Lifetime; | ||
30 | using System.Threading; | ||
31 | using System.Reflection; | ||
32 | using System.Collections; | ||
33 | using System.Collections.Generic; | ||
34 | using OpenSim.Region.Environment.Interfaces; | ||
35 | using integer = OpenSim.Region.ScriptEngine.XEngine.Script.LSL_Types.LSLInteger; | ||
36 | using key = System.String; | ||
37 | using vector = OpenSim.Region.ScriptEngine.XEngine.Script.LSL_Types.Vector3; | ||
38 | using rotation = OpenSim.Region.ScriptEngine.XEngine.Script.LSL_Types.Quaternion; | ||
39 | |||
40 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | ||
41 | { | ||
42 | public class BuiltIn_Commands_BaseClass : MarshalByRefObject, IOSSL_ScriptCommands, ILSL_ScriptCommands, IScript | ||
43 | { | ||
44 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
46 | // Object never expires | ||
47 | public override Object InitializeLifetimeService() | ||
48 | { | ||
49 | //Console.WriteLine("LSL_BaseClass: InitializeLifetimeService()"); | ||
50 | // return null; | ||
51 | ILease lease = (ILease)base.InitializeLifetimeService(); | ||
52 | |||
53 | if (lease.CurrentState == LeaseState.Initial) | ||
54 | { | ||
55 | lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1); | ||
56 | //lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); | ||
57 | //lease.RenewOnCallTime = TimeSpan.FromSeconds(2); | ||
58 | } | ||
59 | return lease; | ||
60 | } | ||
61 | |||
62 | public ILSL_ScriptCommands m_LSL_Functions; | ||
63 | public IOSSL_ScriptCommands m_OSSL_Functions; | ||
64 | |||
65 | public BuiltIn_Commands_BaseClass() | ||
66 | { | ||
67 | } | ||
68 | |||
69 | public Type Start(ILSL_ScriptCommands LSL_Functions, IOSSL_ScriptCommands OSSL_Functions) | ||
70 | { | ||
71 | m_LSL_Functions = LSL_Functions; | ||
72 | m_OSSL_Functions = OSSL_Functions; | ||
73 | m_InitialValues=GetVars(); | ||
74 | return GetType(); | ||
75 | } | ||
76 | |||
77 | private Dictionary<string, object> m_InitialValues = | ||
78 | new Dictionary<string, object>(); | ||
79 | private Dictionary<string, FieldInfo> m_Fields = | ||
80 | new Dictionary<string, FieldInfo>(); | ||
81 | |||
82 | public Dictionary<string, object> GetVars() | ||
83 | { | ||
84 | m_Fields.Clear(); | ||
85 | |||
86 | Dictionary<string, object> vars = new Dictionary<string, object>(); | ||
87 | |||
88 | Type t = GetType(); | ||
89 | |||
90 | FieldInfo[] fields = t.GetFields(BindingFlags.NonPublic | | ||
91 | BindingFlags.Public | | ||
92 | BindingFlags.Instance | | ||
93 | BindingFlags.DeclaredOnly); | ||
94 | |||
95 | foreach (FieldInfo field in fields) | ||
96 | { | ||
97 | m_Fields[field.Name]=field; | ||
98 | |||
99 | vars[field.Name]=field.GetValue(this); | ||
100 | } | ||
101 | |||
102 | return vars; | ||
103 | } | ||
104 | |||
105 | public void SetVars(Dictionary<string, object> vars) | ||
106 | { | ||
107 | foreach (KeyValuePair<string, object> var in vars) | ||
108 | { | ||
109 | if(m_Fields.ContainsKey(var.Key)) | ||
110 | { | ||
111 | m_Fields[var.Key].SetValue(this, var.Value); | ||
112 | } | ||
113 | } | ||
114 | } | ||
115 | |||
116 | public void ResetVars() | ||
117 | { | ||
118 | SetVars(m_InitialValues); | ||
119 | } | ||
120 | |||
121 | public string State | ||
122 | { | ||
123 | get { return m_LSL_Functions.State; } | ||
124 | set { m_LSL_Functions.State = value; } | ||
125 | } | ||
126 | |||
127 | public void state(string newState) | ||
128 | { | ||
129 | m_LSL_Functions.state(newState); | ||
130 | } | ||
131 | |||
132 | public void llSay(int channelID, string text) | ||
133 | { | ||
134 | m_LSL_Functions.llSay(channelID, text); | ||
135 | } | ||
136 | |||
137 | // | ||
138 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
139 | // | ||
140 | // They are only forwarders to LSL_BuiltIn_Commands.cs | ||
141 | // | ||
142 | |||
143 | public ICommander GetCommander(string name) | ||
144 | { | ||
145 | return m_LSL_Functions.GetCommander(name); | ||
146 | } | ||
147 | |||
148 | public double llSin(double f) | ||
149 | { | ||
150 | return m_LSL_Functions.llSin(f); | ||
151 | } | ||
152 | public double llCos(double f) | ||
153 | { | ||
154 | return m_LSL_Functions.llCos(f); | ||
155 | } | ||
156 | |||
157 | public double llTan(double f) | ||
158 | { | ||
159 | return m_LSL_Functions.llTan(f); | ||
160 | } | ||
161 | |||
162 | public double llAtan2(double x, double y) | ||
163 | { | ||
164 | return m_LSL_Functions.llAtan2(x, y); | ||
165 | } | ||
166 | |||
167 | public double llSqrt(double f) | ||
168 | { | ||
169 | return m_LSL_Functions.llSqrt(f); | ||
170 | } | ||
171 | |||
172 | public double llPow(double fbase, double fexponent) | ||
173 | { | ||
174 | return m_LSL_Functions.llPow(fbase, fexponent); | ||
175 | } | ||
176 | |||
177 | public LSL_Types.LSLInteger llAbs(int i) | ||
178 | { | ||
179 | return m_LSL_Functions.llAbs(i); | ||
180 | } | ||
181 | |||
182 | public double llFabs(double f) | ||
183 | { | ||
184 | return m_LSL_Functions.llFabs(f); | ||
185 | } | ||
186 | |||
187 | public double llFrand(double mag) | ||
188 | { | ||
189 | return m_LSL_Functions.llFrand(mag); | ||
190 | } | ||
191 | |||
192 | public LSL_Types.LSLInteger llFloor(double f) | ||
193 | { | ||
194 | return m_LSL_Functions.llFloor(f); | ||
195 | } | ||
196 | |||
197 | public LSL_Types.LSLInteger llCeil(double f) | ||
198 | { | ||
199 | return m_LSL_Functions.llCeil(f); | ||
200 | } | ||
201 | |||
202 | public LSL_Types.LSLInteger llRound(double f) | ||
203 | { | ||
204 | return m_LSL_Functions.llRound(f); | ||
205 | } | ||
206 | |||
207 | public double llVecMag(vector v) | ||
208 | { | ||
209 | return m_LSL_Functions.llVecMag(v); | ||
210 | } | ||
211 | |||
212 | public vector llVecNorm(vector v) | ||
213 | { | ||
214 | return m_LSL_Functions.llVecNorm(v); | ||
215 | } | ||
216 | |||
217 | public double llVecDist(vector a, vector b) | ||
218 | { | ||
219 | return m_LSL_Functions.llVecDist(a, b); | ||
220 | } | ||
221 | |||
222 | public vector llRot2Euler(rotation r) | ||
223 | { | ||
224 | return m_LSL_Functions.llRot2Euler(r); | ||
225 | } | ||
226 | |||
227 | public rotation llEuler2Rot(vector v) | ||
228 | { | ||
229 | return m_LSL_Functions.llEuler2Rot(v); | ||
230 | } | ||
231 | |||
232 | public rotation llAxes2Rot(vector fwd, vector left, vector up) | ||
233 | { | ||
234 | return m_LSL_Functions.llAxes2Rot(fwd, left, up); | ||
235 | } | ||
236 | |||
237 | public vector llRot2Fwd(rotation r) | ||
238 | { | ||
239 | return m_LSL_Functions.llRot2Fwd(r); | ||
240 | } | ||
241 | |||
242 | public vector llRot2Left(rotation r) | ||
243 | { | ||
244 | return m_LSL_Functions.llRot2Left(r); | ||
245 | } | ||
246 | |||
247 | public vector llRot2Up(rotation r) | ||
248 | { | ||
249 | return m_LSL_Functions.llRot2Up(r); | ||
250 | } | ||
251 | |||
252 | public rotation llRotBetween(vector start, vector end) | ||
253 | { | ||
254 | return m_LSL_Functions.llRotBetween(start, end); | ||
255 | } | ||
256 | |||
257 | public void llWhisper(int channelID, string text) | ||
258 | { | ||
259 | m_LSL_Functions.llWhisper(channelID, text); | ||
260 | } | ||
261 | |||
262 | // | ||
263 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
264 | // | ||
265 | public void llShout(int channelID, string text) | ||
266 | { | ||
267 | m_LSL_Functions.llShout(channelID, text); | ||
268 | } | ||
269 | |||
270 | public void llRegionSay(int channelID, string text) | ||
271 | { | ||
272 | m_LSL_Functions.llRegionSay(channelID, text); | ||
273 | } | ||
274 | |||
275 | public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) | ||
276 | { | ||
277 | return m_LSL_Functions.llListen(channelID, name, ID, msg); | ||
278 | } | ||
279 | |||
280 | public void llListenControl(int number, int active) | ||
281 | { | ||
282 | m_LSL_Functions.llListenControl(number, active); | ||
283 | } | ||
284 | |||
285 | public void llListenRemove(int number) | ||
286 | { | ||
287 | m_LSL_Functions.llListenRemove(number); | ||
288 | } | ||
289 | |||
290 | public void llSensor(string name, string id, int type, double range, double arc) | ||
291 | { | ||
292 | m_LSL_Functions.llSensor(name, id, type, range, arc); | ||
293 | } | ||
294 | |||
295 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | ||
296 | { | ||
297 | m_LSL_Functions.llSensorRepeat(name, id, type, range, arc, rate); | ||
298 | } | ||
299 | |||
300 | public void llSensorRemove() | ||
301 | { | ||
302 | m_LSL_Functions.llSensorRemove(); | ||
303 | } | ||
304 | |||
305 | public string llDetectedName(int number) | ||
306 | { | ||
307 | return m_LSL_Functions.llDetectedName(number); | ||
308 | } | ||
309 | |||
310 | public string llDetectedKey(int number) | ||
311 | { | ||
312 | return m_LSL_Functions.llDetectedKey(number); | ||
313 | } | ||
314 | |||
315 | public string llDetectedOwner(int number) | ||
316 | { | ||
317 | return m_LSL_Functions.llDetectedOwner(number); | ||
318 | } | ||
319 | |||
320 | public LSL_Types.LSLInteger llDetectedType(int number) | ||
321 | { | ||
322 | return m_LSL_Functions.llDetectedType(number); | ||
323 | } | ||
324 | |||
325 | public vector llDetectedPos(int number) | ||
326 | { | ||
327 | return m_LSL_Functions.llDetectedPos(number); | ||
328 | } | ||
329 | |||
330 | public vector llDetectedVel(int number) | ||
331 | { | ||
332 | return m_LSL_Functions.llDetectedVel(number); | ||
333 | } | ||
334 | |||
335 | public vector llDetectedGrab(int number) | ||
336 | { | ||
337 | return m_LSL_Functions.llDetectedGrab(number); | ||
338 | } | ||
339 | |||
340 | public rotation llDetectedRot(int number) | ||
341 | { | ||
342 | return m_LSL_Functions.llDetectedRot(number); | ||
343 | } | ||
344 | |||
345 | public LSL_Types.LSLInteger llDetectedGroup(int number) | ||
346 | { | ||
347 | return m_LSL_Functions.llDetectedGroup(number); | ||
348 | } | ||
349 | |||
350 | public LSL_Types.LSLInteger llDetectedLinkNumber(int number) | ||
351 | { | ||
352 | return m_LSL_Functions.llDetectedLinkNumber(number); | ||
353 | } | ||
354 | |||
355 | // | ||
356 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
357 | // | ||
358 | public void llDie() | ||
359 | { | ||
360 | m_LSL_Functions.llDie(); | ||
361 | } | ||
362 | |||
363 | public double llGround(vector offset) | ||
364 | { | ||
365 | return m_LSL_Functions.llGround(offset); | ||
366 | } | ||
367 | |||
368 | public double llCloud(vector offset) | ||
369 | { | ||
370 | return m_LSL_Functions.llCloud(offset); | ||
371 | } | ||
372 | |||
373 | public vector llWind(vector offset) | ||
374 | { | ||
375 | return m_LSL_Functions.llWind(offset); | ||
376 | } | ||
377 | |||
378 | public void llSetStatus(int status, int value) | ||
379 | { | ||
380 | m_LSL_Functions.llSetStatus(status, value); | ||
381 | } | ||
382 | |||
383 | public LSL_Types.LSLInteger llGetStatus(int status) | ||
384 | { | ||
385 | return m_LSL_Functions.llGetStatus(status); | ||
386 | } | ||
387 | |||
388 | public void llSetScale(vector scale) | ||
389 | { | ||
390 | m_LSL_Functions.llSetScale(scale); | ||
391 | } | ||
392 | |||
393 | public vector llGetScale() | ||
394 | { | ||
395 | return m_LSL_Functions.llGetScale(); | ||
396 | } | ||
397 | |||
398 | public void llSetColor(vector color, int face) | ||
399 | { | ||
400 | m_LSL_Functions.llSetColor(color, face); | ||
401 | } | ||
402 | |||
403 | public double llGetAlpha(int face) | ||
404 | { | ||
405 | return m_LSL_Functions.llGetAlpha(face); | ||
406 | } | ||
407 | |||
408 | public void llSetAlpha(double alpha, int face) | ||
409 | { | ||
410 | m_LSL_Functions.llSetAlpha(alpha, face); | ||
411 | } | ||
412 | |||
413 | public vector llGetColor(int face) | ||
414 | { | ||
415 | return m_LSL_Functions.llGetColor(face); | ||
416 | } | ||
417 | |||
418 | public void llSetTexture(string texture, int face) | ||
419 | { | ||
420 | m_LSL_Functions.llSetTexture(texture, face); | ||
421 | } | ||
422 | |||
423 | public void llScaleTexture(double u, double v, int face) | ||
424 | { | ||
425 | m_LSL_Functions.llScaleTexture(u, v, face); | ||
426 | } | ||
427 | |||
428 | public void llOffsetTexture(double u, double v, int face) | ||
429 | { | ||
430 | m_LSL_Functions.llOffsetTexture(u, v, face); | ||
431 | } | ||
432 | |||
433 | public void llRotateTexture(double rotation, int face) | ||
434 | { | ||
435 | m_LSL_Functions.llRotateTexture(rotation, face); | ||
436 | } | ||
437 | |||
438 | public string llGetTexture(int face) | ||
439 | { | ||
440 | return m_LSL_Functions.llGetTexture(face); | ||
441 | } | ||
442 | |||
443 | // | ||
444 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
445 | // | ||
446 | public void llSetPos(vector pos) | ||
447 | { | ||
448 | m_LSL_Functions.llSetPos(pos); | ||
449 | } | ||
450 | |||
451 | public vector llGetPos() | ||
452 | { | ||
453 | return m_LSL_Functions.llGetPos(); | ||
454 | } | ||
455 | |||
456 | public vector llGetLocalPos() | ||
457 | { | ||
458 | return m_LSL_Functions.llGetLocalPos(); | ||
459 | } | ||
460 | |||
461 | public void llSetRot(rotation rot) | ||
462 | { | ||
463 | m_LSL_Functions.llSetRot(rot); | ||
464 | } | ||
465 | |||
466 | public rotation llGetRot() | ||
467 | { | ||
468 | return m_LSL_Functions.llGetRot(); | ||
469 | } | ||
470 | |||
471 | public rotation llGetLocalRot() | ||
472 | { | ||
473 | return m_LSL_Functions.llGetLocalRot(); | ||
474 | } | ||
475 | |||
476 | public void llSetForce(vector force, int local) | ||
477 | { | ||
478 | m_LSL_Functions.llSetForce(force, local); | ||
479 | } | ||
480 | |||
481 | public vector llGetForce() | ||
482 | { | ||
483 | return m_LSL_Functions.llGetForce(); | ||
484 | } | ||
485 | |||
486 | public LSL_Types.LSLInteger llTarget(vector position, double range) | ||
487 | { | ||
488 | return m_LSL_Functions.llTarget(position, range); | ||
489 | } | ||
490 | |||
491 | public void llTargetRemove(int number) | ||
492 | { | ||
493 | m_LSL_Functions.llTargetRemove(number); | ||
494 | } | ||
495 | |||
496 | public LSL_Types.LSLInteger llRotTarget(rotation rot, double error) | ||
497 | { | ||
498 | return m_LSL_Functions.llRotTarget(rot, error); | ||
499 | } | ||
500 | |||
501 | public void llRotTargetRemove(int number) | ||
502 | { | ||
503 | m_LSL_Functions.llRotTargetRemove(number); | ||
504 | } | ||
505 | |||
506 | public void llMoveToTarget(vector target, double tau) | ||
507 | { | ||
508 | m_LSL_Functions.llMoveToTarget(target, tau); | ||
509 | } | ||
510 | |||
511 | public void llStopMoveToTarget() | ||
512 | { | ||
513 | m_LSL_Functions.llStopMoveToTarget(); | ||
514 | } | ||
515 | |||
516 | public void llApplyImpulse(vector force, int local) | ||
517 | { | ||
518 | m_LSL_Functions.llApplyImpulse(force, local); | ||
519 | } | ||
520 | |||
521 | // | ||
522 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
523 | // | ||
524 | public void llApplyRotationalImpulse(vector force, int local) | ||
525 | { | ||
526 | m_LSL_Functions.llApplyRotationalImpulse(force, local); | ||
527 | } | ||
528 | |||
529 | public void llSetTorque(vector torque, int local) | ||
530 | { | ||
531 | m_LSL_Functions.llSetTorque(torque, local); | ||
532 | } | ||
533 | |||
534 | public vector llGetTorque() | ||
535 | { | ||
536 | return m_LSL_Functions.llGetTorque(); | ||
537 | } | ||
538 | |||
539 | public void llSetForceAndTorque(vector force, vector torque, int local) | ||
540 | { | ||
541 | m_LSL_Functions.llSetForceAndTorque(force, torque, local); | ||
542 | } | ||
543 | |||
544 | public vector llGetVel() | ||
545 | { | ||
546 | return m_LSL_Functions.llGetVel(); | ||
547 | } | ||
548 | |||
549 | public vector llGetAccel() | ||
550 | { | ||
551 | return m_LSL_Functions.llGetAccel(); | ||
552 | } | ||
553 | |||
554 | public vector llGetOmega() | ||
555 | { | ||
556 | return m_LSL_Functions.llGetOmega(); | ||
557 | } | ||
558 | |||
559 | public double llGetTimeOfDay() | ||
560 | { | ||
561 | return m_LSL_Functions.llGetTimeOfDay(); | ||
562 | } | ||
563 | |||
564 | public double llGetWallclock() | ||
565 | { | ||
566 | return m_LSL_Functions.llGetWallclock(); | ||
567 | } | ||
568 | |||
569 | public double llGetTime() | ||
570 | { | ||
571 | return m_LSL_Functions.llGetTime(); | ||
572 | } | ||
573 | |||
574 | public void llResetTime() | ||
575 | { | ||
576 | m_LSL_Functions.llResetTime(); | ||
577 | } | ||
578 | |||
579 | public double llGetAndResetTime() | ||
580 | { | ||
581 | return m_LSL_Functions.llGetAndResetTime(); | ||
582 | } | ||
583 | |||
584 | public void llSound() | ||
585 | { | ||
586 | m_LSL_Functions.llSound(); | ||
587 | } | ||
588 | |||
589 | public void llPlaySound(string sound, double volume) | ||
590 | { | ||
591 | m_LSL_Functions.llPlaySound(sound, volume); | ||
592 | } | ||
593 | |||
594 | public void llLoopSound(string sound, double volume) | ||
595 | { | ||
596 | m_LSL_Functions.llLoopSound(sound, volume); | ||
597 | } | ||
598 | |||
599 | public void llLoopSoundMaster(string sound, double volume) | ||
600 | { | ||
601 | m_LSL_Functions.llLoopSoundMaster(sound, volume); | ||
602 | } | ||
603 | |||
604 | public void llLoopSoundSlave(string sound, double volume) | ||
605 | { | ||
606 | m_LSL_Functions.llLoopSoundSlave(sound, volume); | ||
607 | } | ||
608 | |||
609 | public void llPlaySoundSlave(string sound, double volume) | ||
610 | { | ||
611 | m_LSL_Functions.llPlaySoundSlave(sound, volume); | ||
612 | } | ||
613 | |||
614 | // | ||
615 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
616 | // | ||
617 | public void llTriggerSound(string sound, double volume) | ||
618 | { | ||
619 | m_LSL_Functions.llTriggerSound(sound, volume); | ||
620 | } | ||
621 | |||
622 | public void llStopSound() | ||
623 | { | ||
624 | m_LSL_Functions.llStopSound(); | ||
625 | } | ||
626 | |||
627 | public void llPreloadSound(string sound) | ||
628 | { | ||
629 | m_LSL_Functions.llPreloadSound(sound); | ||
630 | } | ||
631 | |||
632 | public string llGetSubString(string src, int start, int end) | ||
633 | { | ||
634 | return m_LSL_Functions.llGetSubString(src, start, end); | ||
635 | } | ||
636 | |||
637 | public string llDeleteSubString(string src, int start, int end) | ||
638 | { | ||
639 | return m_LSL_Functions.llDeleteSubString(src, start, end); | ||
640 | } | ||
641 | |||
642 | public string llInsertString(string dst, int position, string src) | ||
643 | { | ||
644 | return m_LSL_Functions.llInsertString(dst, position, src); | ||
645 | } | ||
646 | |||
647 | public string llToUpper(string source) | ||
648 | { | ||
649 | return m_LSL_Functions.llToUpper(source); | ||
650 | } | ||
651 | |||
652 | public string llToLower(string source) | ||
653 | { | ||
654 | return m_LSL_Functions.llToLower(source); | ||
655 | } | ||
656 | |||
657 | public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) | ||
658 | { | ||
659 | return m_LSL_Functions.llGiveMoney(destination, amount); | ||
660 | } | ||
661 | |||
662 | public void llMakeExplosion() | ||
663 | { | ||
664 | m_LSL_Functions.llMakeExplosion(); | ||
665 | } | ||
666 | |||
667 | public void llMakeFountain() | ||
668 | { | ||
669 | m_LSL_Functions.llMakeFountain(); | ||
670 | } | ||
671 | |||
672 | public void llMakeSmoke() | ||
673 | { | ||
674 | m_LSL_Functions.llMakeSmoke(); | ||
675 | } | ||
676 | |||
677 | public void llMakeFire() | ||
678 | { | ||
679 | m_LSL_Functions.llMakeFire(); | ||
680 | } | ||
681 | |||
682 | public void llRezObject(string inventory, vector pos, vector vel, rotation rot, int param) | ||
683 | { | ||
684 | m_LSL_Functions.llRezObject(inventory, pos, vel, rot, param); | ||
685 | } | ||
686 | |||
687 | public void llLookAt(vector target, double strength, double damping) | ||
688 | { | ||
689 | m_LSL_Functions.llLookAt(target, strength, damping); | ||
690 | } | ||
691 | |||
692 | public void llStopLookAt() | ||
693 | { | ||
694 | m_LSL_Functions.llStopLookAt(); | ||
695 | } | ||
696 | |||
697 | public void llSetTimerEvent(double sec) | ||
698 | { | ||
699 | m_LSL_Functions.llSetTimerEvent(sec); | ||
700 | } | ||
701 | |||
702 | public void llSleep(double sec) | ||
703 | { | ||
704 | m_LSL_Functions.llSleep(sec); | ||
705 | } | ||
706 | |||
707 | // | ||
708 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
709 | // | ||
710 | public double llGetMass() | ||
711 | { | ||
712 | return m_LSL_Functions.llGetMass(); | ||
713 | } | ||
714 | |||
715 | public void llCollisionFilter(string name, string id, int accept) | ||
716 | { | ||
717 | m_LSL_Functions.llCollisionFilter(name, id, accept); | ||
718 | } | ||
719 | |||
720 | public void llTakeControls(int controls, int accept, int pass_on) | ||
721 | { | ||
722 | m_LSL_Functions.llTakeControls(controls, accept, pass_on); | ||
723 | } | ||
724 | |||
725 | public void llReleaseControls() | ||
726 | { | ||
727 | m_LSL_Functions.llReleaseControls(); | ||
728 | } | ||
729 | |||
730 | public void llAttachToAvatar(int attachment) | ||
731 | { | ||
732 | m_LSL_Functions.llAttachToAvatar(attachment); | ||
733 | } | ||
734 | |||
735 | public void llDetachFromAvatar() | ||
736 | { | ||
737 | m_LSL_Functions.llDetachFromAvatar(); | ||
738 | } | ||
739 | |||
740 | public void llTakeCamera() | ||
741 | { | ||
742 | m_LSL_Functions.llTakeCamera(); | ||
743 | } | ||
744 | |||
745 | public void llReleaseCamera() | ||
746 | { | ||
747 | m_LSL_Functions.llReleaseCamera(); | ||
748 | } | ||
749 | |||
750 | public string llGetOwner() | ||
751 | { | ||
752 | return m_LSL_Functions.llGetOwner(); | ||
753 | } | ||
754 | |||
755 | public void llInstantMessage(string user, string message) | ||
756 | { | ||
757 | m_LSL_Functions.llInstantMessage(user, message); | ||
758 | } | ||
759 | |||
760 | public void llEmail(string address, string subject, string message) | ||
761 | { | ||
762 | m_LSL_Functions.llEmail(address, subject, message); | ||
763 | } | ||
764 | |||
765 | public void llGetNextEmail(string address, string subject) | ||
766 | { | ||
767 | m_LSL_Functions.llGetNextEmail(address, subject); | ||
768 | } | ||
769 | |||
770 | public string llGetKey() | ||
771 | { | ||
772 | return m_LSL_Functions.llGetKey(); | ||
773 | } | ||
774 | |||
775 | public void llSetBuoyancy(double buoyancy) | ||
776 | { | ||
777 | m_LSL_Functions.llSetBuoyancy(buoyancy); | ||
778 | } | ||
779 | |||
780 | public void llSetHoverHeight(double height, int water, double tau) | ||
781 | { | ||
782 | m_LSL_Functions.llSetHoverHeight(height, water, tau); | ||
783 | } | ||
784 | |||
785 | public void llStopHover() | ||
786 | { | ||
787 | m_LSL_Functions.llStopHover(); | ||
788 | } | ||
789 | |||
790 | public void llMinEventDelay(double delay) | ||
791 | { | ||
792 | m_LSL_Functions.llMinEventDelay(delay); | ||
793 | } | ||
794 | |||
795 | public void llSoundPreload() | ||
796 | { | ||
797 | m_LSL_Functions.llSoundPreload(); | ||
798 | } | ||
799 | |||
800 | public void llRotLookAt(rotation target, double strength, double damping) | ||
801 | { | ||
802 | m_LSL_Functions.llRotLookAt(target, strength, damping); | ||
803 | } | ||
804 | |||
805 | // | ||
806 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
807 | // | ||
808 | public LSL_Types.LSLInteger llStringLength(string str) | ||
809 | { | ||
810 | return m_LSL_Functions.llStringLength(str); | ||
811 | } | ||
812 | |||
813 | public void llStartAnimation(string anim) | ||
814 | { | ||
815 | m_LSL_Functions.llStartAnimation(anim); | ||
816 | } | ||
817 | |||
818 | public void llStopAnimation(string anim) | ||
819 | { | ||
820 | m_LSL_Functions.llStopAnimation(anim); | ||
821 | } | ||
822 | |||
823 | public void llPointAt() | ||
824 | { | ||
825 | m_LSL_Functions.llPointAt(); | ||
826 | } | ||
827 | |||
828 | public void llStopPointAt() | ||
829 | { | ||
830 | m_LSL_Functions.llStopPointAt(); | ||
831 | } | ||
832 | |||
833 | public void llTargetOmega(vector axis, double spinrate, double gain) | ||
834 | { | ||
835 | m_LSL_Functions.llTargetOmega(axis, spinrate, gain); | ||
836 | } | ||
837 | |||
838 | public LSL_Types.LSLInteger llGetStartParameter() | ||
839 | { | ||
840 | return m_LSL_Functions.llGetStartParameter(); | ||
841 | } | ||
842 | |||
843 | public void llGodLikeRezObject(string inventory, vector pos) | ||
844 | { | ||
845 | m_LSL_Functions.llGodLikeRezObject(inventory, pos); | ||
846 | } | ||
847 | |||
848 | public void llRequestPermissions(string agent, int perm) | ||
849 | { | ||
850 | m_LSL_Functions.llRequestPermissions(agent, perm); | ||
851 | } | ||
852 | |||
853 | public string llGetPermissionsKey() | ||
854 | { | ||
855 | return m_LSL_Functions.llGetPermissionsKey(); | ||
856 | } | ||
857 | |||
858 | public LSL_Types.LSLInteger llGetPermissions() | ||
859 | { | ||
860 | return m_LSL_Functions.llGetPermissions(); | ||
861 | } | ||
862 | |||
863 | public LSL_Types.LSLInteger llGetLinkNumber() | ||
864 | { | ||
865 | return m_LSL_Functions.llGetLinkNumber(); | ||
866 | } | ||
867 | |||
868 | public void llSetLinkColor(int linknumber, vector color, int face) | ||
869 | { | ||
870 | m_LSL_Functions.llSetLinkColor(linknumber, color, face); | ||
871 | } | ||
872 | |||
873 | public void llCreateLink(string target, int parent) | ||
874 | { | ||
875 | m_LSL_Functions.llCreateLink(target, parent); | ||
876 | } | ||
877 | |||
878 | public void llBreakLink(int linknum) | ||
879 | { | ||
880 | m_LSL_Functions.llBreakLink(linknum); | ||
881 | } | ||
882 | |||
883 | public void llBreakAllLinks() | ||
884 | { | ||
885 | m_LSL_Functions.llBreakAllLinks(); | ||
886 | } | ||
887 | |||
888 | public string llGetLinkKey(int linknum) | ||
889 | { | ||
890 | return m_LSL_Functions.llGetLinkKey(linknum); | ||
891 | } | ||
892 | |||
893 | public string llGetLinkName(int linknum) | ||
894 | { | ||
895 | return m_LSL_Functions.llGetLinkName(linknum); | ||
896 | } | ||
897 | |||
898 | public LSL_Types.LSLInteger llGetInventoryNumber(int type) | ||
899 | { | ||
900 | return m_LSL_Functions.llGetInventoryNumber(type); | ||
901 | } | ||
902 | |||
903 | public string llGetInventoryName(int type, int number) | ||
904 | { | ||
905 | return m_LSL_Functions.llGetInventoryName(type, number); | ||
906 | } | ||
907 | |||
908 | // | ||
909 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
910 | // | ||
911 | public void llSetScriptState(string name, int run) | ||
912 | { | ||
913 | m_LSL_Functions.llSetScriptState(name, run); | ||
914 | } | ||
915 | |||
916 | public double llGetEnergy() | ||
917 | { | ||
918 | return m_LSL_Functions.llGetEnergy(); | ||
919 | } | ||
920 | |||
921 | public void llGiveInventory(string destination, string inventory) | ||
922 | { | ||
923 | m_LSL_Functions.llGiveInventory(destination, inventory); | ||
924 | } | ||
925 | |||
926 | public void llRemoveInventory(string item) | ||
927 | { | ||
928 | m_LSL_Functions.llRemoveInventory(item); | ||
929 | } | ||
930 | |||
931 | public void llSetText(string text, vector color, double alpha) | ||
932 | { | ||
933 | m_LSL_Functions.llSetText(text, color, alpha); | ||
934 | } | ||
935 | |||
936 | public double llWater(vector offset) | ||
937 | { | ||
938 | return m_LSL_Functions.llWater(offset); | ||
939 | } | ||
940 | |||
941 | public void llPassTouches(int pass) | ||
942 | { | ||
943 | m_LSL_Functions.llPassTouches(pass); | ||
944 | } | ||
945 | |||
946 | public string llRequestAgentData(string id, int data) | ||
947 | { | ||
948 | return m_LSL_Functions.llRequestAgentData(id, data); | ||
949 | } | ||
950 | |||
951 | public string llRequestInventoryData(string name) | ||
952 | { | ||
953 | return m_LSL_Functions.llRequestInventoryData(name); | ||
954 | } | ||
955 | |||
956 | public void llSetDamage(double damage) | ||
957 | { | ||
958 | m_LSL_Functions.llSetDamage(damage); | ||
959 | } | ||
960 | |||
961 | public void llTeleportAgentHome(string agent) | ||
962 | { | ||
963 | m_LSL_Functions.llTeleportAgentHome(agent); | ||
964 | } | ||
965 | |||
966 | public void llModifyLand(int action, int brush) | ||
967 | { | ||
968 | m_LSL_Functions.llModifyLand(action, brush); | ||
969 | } | ||
970 | |||
971 | public void llCollisionSound(string impact_sound, double impact_volume) | ||
972 | { | ||
973 | m_LSL_Functions.llCollisionSound(impact_sound, impact_volume); | ||
974 | } | ||
975 | |||
976 | public void llCollisionSprite(string impact_sprite) | ||
977 | { | ||
978 | m_LSL_Functions.llCollisionSprite(impact_sprite); | ||
979 | } | ||
980 | |||
981 | public string llGetAnimation(string id) | ||
982 | { | ||
983 | return m_LSL_Functions.llGetAnimation(id); | ||
984 | } | ||
985 | |||
986 | public void llResetScript() | ||
987 | { | ||
988 | m_LSL_Functions.llResetScript(); | ||
989 | } | ||
990 | |||
991 | public void llMessageLinked(int linknum, int num, string str, string id) | ||
992 | { | ||
993 | m_LSL_Functions.llMessageLinked(linknum, num, str, id); | ||
994 | } | ||
995 | |||
996 | public void llPushObject(string target, vector impulse, vector ang_impulse, int local) | ||
997 | { | ||
998 | m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local); | ||
999 | } | ||
1000 | |||
1001 | public void llPassCollisions(int pass) | ||
1002 | { | ||
1003 | m_LSL_Functions.llPassCollisions(pass); | ||
1004 | } | ||
1005 | |||
1006 | public string llGetScriptName() | ||
1007 | { | ||
1008 | return m_LSL_Functions.llGetScriptName(); | ||
1009 | } | ||
1010 | |||
1011 | public LSL_Types.LSLInteger llGetNumberOfSides() | ||
1012 | { | ||
1013 | return m_LSL_Functions.llGetNumberOfSides(); | ||
1014 | } | ||
1015 | |||
1016 | // | ||
1017 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1018 | // | ||
1019 | public rotation llAxisAngle2Rot(vector axis, double angle) | ||
1020 | { | ||
1021 | return m_LSL_Functions.llAxisAngle2Rot(axis, angle); | ||
1022 | } | ||
1023 | |||
1024 | public vector llRot2Axis(rotation rot) | ||
1025 | { | ||
1026 | return m_LSL_Functions.llRot2Axis(rot); | ||
1027 | } | ||
1028 | |||
1029 | public double llRot2Angle(rotation rot) | ||
1030 | { | ||
1031 | return m_LSL_Functions.llRot2Angle(rot); | ||
1032 | } | ||
1033 | |||
1034 | public double llAcos(double val) | ||
1035 | { | ||
1036 | return m_LSL_Functions.llAcos(val); | ||
1037 | } | ||
1038 | |||
1039 | public double llAsin(double val) | ||
1040 | { | ||
1041 | return m_LSL_Functions.llAsin(val); | ||
1042 | } | ||
1043 | |||
1044 | public double llAngleBetween(rotation a, rotation b) | ||
1045 | { | ||
1046 | return m_LSL_Functions.llAngleBetween(a, b); | ||
1047 | } | ||
1048 | |||
1049 | public string llGetInventoryKey(string name) | ||
1050 | { | ||
1051 | return m_LSL_Functions.llGetInventoryKey(name); | ||
1052 | } | ||
1053 | |||
1054 | public void llAllowInventoryDrop(int add) | ||
1055 | { | ||
1056 | m_LSL_Functions.llAllowInventoryDrop(add); | ||
1057 | } | ||
1058 | |||
1059 | public vector llGetSunDirection() | ||
1060 | { | ||
1061 | return m_LSL_Functions.llGetSunDirection(); | ||
1062 | } | ||
1063 | |||
1064 | public vector llGetTextureOffset(int face) | ||
1065 | { | ||
1066 | return m_LSL_Functions.llGetTextureOffset(face); | ||
1067 | } | ||
1068 | |||
1069 | public vector llGetTextureScale(int side) | ||
1070 | { | ||
1071 | return m_LSL_Functions.llGetTextureScale(side); | ||
1072 | } | ||
1073 | |||
1074 | public double llGetTextureRot(int side) | ||
1075 | { | ||
1076 | return m_LSL_Functions.llGetTextureRot(side); | ||
1077 | } | ||
1078 | |||
1079 | public LSL_Types.LSLInteger llSubStringIndex(string source, string pattern) | ||
1080 | { | ||
1081 | return m_LSL_Functions.llSubStringIndex(source, pattern); | ||
1082 | } | ||
1083 | |||
1084 | public string llGetOwnerKey(string id) | ||
1085 | { | ||
1086 | return m_LSL_Functions.llGetOwnerKey(id); | ||
1087 | } | ||
1088 | |||
1089 | public vector llGetCenterOfMass() | ||
1090 | { | ||
1091 | return m_LSL_Functions.llGetCenterOfMass(); | ||
1092 | } | ||
1093 | |||
1094 | public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) | ||
1095 | { | ||
1096 | return m_LSL_Functions.llListSort(src, stride, ascending); | ||
1097 | } | ||
1098 | |||
1099 | public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) | ||
1100 | { | ||
1101 | return m_LSL_Functions.llGetListLength(src); | ||
1102 | } | ||
1103 | |||
1104 | // | ||
1105 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1106 | // | ||
1107 | public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) | ||
1108 | { | ||
1109 | return m_LSL_Functions.llList2Integer(src, index); | ||
1110 | } | ||
1111 | |||
1112 | public string llList2String(LSL_Types.list src, int index) | ||
1113 | { | ||
1114 | return m_LSL_Functions.llList2String(src, index); | ||
1115 | } | ||
1116 | |||
1117 | public string llList2Key(LSL_Types.list src, int index) | ||
1118 | { | ||
1119 | return m_LSL_Functions.llList2Key(src, index); | ||
1120 | } | ||
1121 | |||
1122 | public vector llList2Vector(LSL_Types.list src, int index) | ||
1123 | { | ||
1124 | return m_LSL_Functions.llList2Vector(src, index); | ||
1125 | } | ||
1126 | |||
1127 | public rotation llList2Rot(LSL_Types.list src, int index) | ||
1128 | { | ||
1129 | return m_LSL_Functions.llList2Rot(src, index); | ||
1130 | } | ||
1131 | |||
1132 | public LSL_Types.list llList2List(LSL_Types.list src, int start, int end) | ||
1133 | { | ||
1134 | return m_LSL_Functions.llList2List(src, start, end); | ||
1135 | } | ||
1136 | |||
1137 | public LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end) | ||
1138 | { | ||
1139 | return m_LSL_Functions.llDeleteSubList(src, start, end); | ||
1140 | } | ||
1141 | |||
1142 | public LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index) | ||
1143 | { | ||
1144 | return m_LSL_Functions.llGetListEntryType(src, index); | ||
1145 | } | ||
1146 | |||
1147 | public string llList2CSV(LSL_Types.list src) | ||
1148 | { | ||
1149 | return m_LSL_Functions.llList2CSV(src); | ||
1150 | } | ||
1151 | |||
1152 | public LSL_Types.list llCSV2List(string src) | ||
1153 | { | ||
1154 | return m_LSL_Functions.llCSV2List(src); | ||
1155 | } | ||
1156 | |||
1157 | public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) | ||
1158 | { | ||
1159 | return m_LSL_Functions.llListRandomize(src, stride); | ||
1160 | } | ||
1161 | |||
1162 | public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) | ||
1163 | { | ||
1164 | return m_LSL_Functions.llList2ListStrided(src, start, end, stride); | ||
1165 | } | ||
1166 | |||
1167 | public vector llGetRegionCorner() | ||
1168 | { | ||
1169 | return m_LSL_Functions.llGetRegionCorner(); | ||
1170 | } | ||
1171 | |||
1172 | public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start) | ||
1173 | { | ||
1174 | return m_LSL_Functions.llListInsertList(dest, src, start); | ||
1175 | } | ||
1176 | |||
1177 | public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) | ||
1178 | { | ||
1179 | return m_LSL_Functions.llListFindList(src, test); | ||
1180 | } | ||
1181 | |||
1182 | public string llGetObjectName() | ||
1183 | { | ||
1184 | return m_LSL_Functions.llGetObjectName(); | ||
1185 | } | ||
1186 | |||
1187 | public void llSetObjectName(string name) | ||
1188 | { | ||
1189 | m_LSL_Functions.llSetObjectName(name); | ||
1190 | } | ||
1191 | |||
1192 | public string llGetDate() | ||
1193 | { | ||
1194 | return m_LSL_Functions.llGetDate(); | ||
1195 | } | ||
1196 | |||
1197 | public LSL_Types.LSLInteger llEdgeOfWorld(vector pos, vector dir) | ||
1198 | { | ||
1199 | return m_LSL_Functions.llEdgeOfWorld(pos, dir); | ||
1200 | } | ||
1201 | |||
1202 | public LSL_Types.LSLInteger llGetAgentInfo(string id) | ||
1203 | { | ||
1204 | return m_LSL_Functions.llGetAgentInfo(id); | ||
1205 | } | ||
1206 | |||
1207 | // | ||
1208 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1209 | // | ||
1210 | public void llAdjustSoundVolume(double volume) | ||
1211 | { | ||
1212 | m_LSL_Functions.llAdjustSoundVolume(volume); | ||
1213 | } | ||
1214 | |||
1215 | public void llSetSoundQueueing(int queue) | ||
1216 | { | ||
1217 | m_LSL_Functions.llSetSoundQueueing(queue); | ||
1218 | } | ||
1219 | |||
1220 | public void llSetSoundRadius(double radius) | ||
1221 | { | ||
1222 | m_LSL_Functions.llSetSoundRadius(radius); | ||
1223 | } | ||
1224 | |||
1225 | public string llKey2Name(string id) | ||
1226 | { | ||
1227 | return m_LSL_Functions.llKey2Name(id); | ||
1228 | } | ||
1229 | |||
1230 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) | ||
1231 | { | ||
1232 | m_LSL_Functions.llSetTextureAnim(mode, face, sizex, sizey, start, length, rate); | ||
1233 | } | ||
1234 | |||
1235 | public void llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west) | ||
1236 | { | ||
1237 | m_LSL_Functions.llTriggerSoundLimited(sound, volume, top_north_east, bottom_south_west); | ||
1238 | } | ||
1239 | |||
1240 | public void llEjectFromLand(string pest) | ||
1241 | { | ||
1242 | m_LSL_Functions.llEjectFromLand(pest); | ||
1243 | } | ||
1244 | |||
1245 | public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) | ||
1246 | { | ||
1247 | return m_LSL_Functions.llParseString2List(str,separators,spacers); | ||
1248 | } | ||
1249 | |||
1250 | public LSL_Types.LSLInteger llOverMyLand(string id) | ||
1251 | { | ||
1252 | return m_LSL_Functions.llOverMyLand(id); | ||
1253 | } | ||
1254 | |||
1255 | public string llGetLandOwnerAt(vector pos) | ||
1256 | { | ||
1257 | return m_LSL_Functions.llGetLandOwnerAt(pos); | ||
1258 | } | ||
1259 | |||
1260 | public string llGetNotecardLine(string name, int line) | ||
1261 | { | ||
1262 | return m_LSL_Functions.llGetNotecardLine(name, line); | ||
1263 | } | ||
1264 | |||
1265 | public vector llGetAgentSize(string id) | ||
1266 | { | ||
1267 | return m_LSL_Functions.llGetAgentSize(id); | ||
1268 | } | ||
1269 | |||
1270 | public LSL_Types.LSLInteger llSameGroup(string agent) | ||
1271 | { | ||
1272 | return m_LSL_Functions.llSameGroup(agent); | ||
1273 | } | ||
1274 | |||
1275 | public void llUnSit(string id) | ||
1276 | { | ||
1277 | m_LSL_Functions.llUnSit(id); | ||
1278 | } | ||
1279 | |||
1280 | public vector llGroundSlope(vector offset) | ||
1281 | { | ||
1282 | return m_LSL_Functions.llGroundSlope(offset); | ||
1283 | } | ||
1284 | |||
1285 | public vector llGroundNormal(vector offset) | ||
1286 | { | ||
1287 | return m_LSL_Functions.llGroundNormal(offset); | ||
1288 | } | ||
1289 | |||
1290 | public vector llGroundContour(vector offset) | ||
1291 | { | ||
1292 | return m_LSL_Functions.llGroundContour(offset); | ||
1293 | } | ||
1294 | |||
1295 | public LSL_Types.LSLInteger llGetAttached() | ||
1296 | { | ||
1297 | return m_LSL_Functions.llGetAttached(); | ||
1298 | } | ||
1299 | |||
1300 | public LSL_Types.LSLInteger llGetFreeMemory() | ||
1301 | { | ||
1302 | return m_LSL_Functions.llGetFreeMemory(); | ||
1303 | } | ||
1304 | |||
1305 | public string llGetRegionName() | ||
1306 | { | ||
1307 | return m_LSL_Functions.llGetRegionName(); | ||
1308 | } | ||
1309 | |||
1310 | public double llGetRegionTimeDilation() | ||
1311 | { | ||
1312 | return m_LSL_Functions.llGetRegionTimeDilation(); | ||
1313 | } | ||
1314 | |||
1315 | public double llGetRegionFPS() | ||
1316 | { | ||
1317 | return m_LSL_Functions.llGetRegionFPS(); | ||
1318 | } | ||
1319 | |||
1320 | // | ||
1321 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1322 | // | ||
1323 | public void llParticleSystem(LSL_Types.list rules) | ||
1324 | { | ||
1325 | m_LSL_Functions.llParticleSystem(rules); | ||
1326 | } | ||
1327 | |||
1328 | public void llGroundRepel(double height, int water, double tau) | ||
1329 | { | ||
1330 | m_LSL_Functions.llGroundRepel(height, water, tau); | ||
1331 | } | ||
1332 | |||
1333 | public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) | ||
1334 | { | ||
1335 | m_LSL_Functions.llGiveInventoryList(destination, category, inventory); | ||
1336 | } | ||
1337 | |||
1338 | public void llSetVehicleType(int type) | ||
1339 | { | ||
1340 | m_LSL_Functions.llSetVehicleType(type); | ||
1341 | } | ||
1342 | |||
1343 | public void llSetVehicledoubleParam(int param, double value) | ||
1344 | { | ||
1345 | m_LSL_Functions.llSetVehicledoubleParam(param, value); | ||
1346 | } | ||
1347 | |||
1348 | public void llSetVehicleFloatParam(int param, float value) | ||
1349 | { | ||
1350 | m_LSL_Functions.llSetVehicleFloatParam(param, value); | ||
1351 | } | ||
1352 | |||
1353 | public void llSetVehicleVectorParam(int param, vector vec) | ||
1354 | { | ||
1355 | m_LSL_Functions.llSetVehicleVectorParam(param, vec); | ||
1356 | } | ||
1357 | |||
1358 | public void llSetVehicleRotationParam(int param, rotation rot) | ||
1359 | { | ||
1360 | m_LSL_Functions.llSetVehicleRotationParam(param, rot); | ||
1361 | } | ||
1362 | |||
1363 | public void llSetVehicleFlags(int flags) | ||
1364 | { | ||
1365 | m_LSL_Functions.llSetVehicleFlags(flags); | ||
1366 | } | ||
1367 | |||
1368 | public void llRemoveVehicleFlags(int flags) | ||
1369 | { | ||
1370 | m_LSL_Functions.llRemoveVehicleFlags(flags); | ||
1371 | } | ||
1372 | |||
1373 | public void llSitTarget(vector offset, rotation rot) | ||
1374 | { | ||
1375 | m_LSL_Functions.llSitTarget(offset, rot); | ||
1376 | } | ||
1377 | |||
1378 | public string llAvatarOnSitTarget() | ||
1379 | { | ||
1380 | return m_LSL_Functions.llAvatarOnSitTarget(); | ||
1381 | } | ||
1382 | |||
1383 | public void llAddToLandPassList(string avatar, double hours) | ||
1384 | { | ||
1385 | m_LSL_Functions.llAddToLandPassList(avatar, hours); | ||
1386 | } | ||
1387 | |||
1388 | public void llSetTouchText(string text) | ||
1389 | { | ||
1390 | m_LSL_Functions.llSetTouchText(text); | ||
1391 | } | ||
1392 | |||
1393 | public void llSetSitText(string text) | ||
1394 | { | ||
1395 | m_LSL_Functions.llSetSitText(text); | ||
1396 | } | ||
1397 | |||
1398 | public void llSetCameraEyeOffset(vector offset) | ||
1399 | { | ||
1400 | m_LSL_Functions.llSetCameraEyeOffset(offset); | ||
1401 | } | ||
1402 | |||
1403 | public void llSetCameraAtOffset(vector offset) | ||
1404 | { | ||
1405 | m_LSL_Functions.llSetCameraAtOffset(offset); | ||
1406 | } | ||
1407 | |||
1408 | public string llDumpList2String(LSL_Types.list src, string seperator) | ||
1409 | { | ||
1410 | return m_LSL_Functions.llDumpList2String(src, seperator); | ||
1411 | } | ||
1412 | |||
1413 | public LSL_Types.LSLInteger llScriptDanger(vector pos) | ||
1414 | { | ||
1415 | return m_LSL_Functions.llScriptDanger(pos); | ||
1416 | } | ||
1417 | |||
1418 | public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) | ||
1419 | { | ||
1420 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); | ||
1421 | } | ||
1422 | |||
1423 | public void llVolumeDetect(int detect) | ||
1424 | { | ||
1425 | m_LSL_Functions.llVolumeDetect(detect); | ||
1426 | } | ||
1427 | |||
1428 | public void llResetOtherScript(string name) | ||
1429 | { | ||
1430 | m_LSL_Functions.llResetOtherScript(name); | ||
1431 | } | ||
1432 | |||
1433 | public LSL_Types.LSLInteger llGetScriptState(string name) | ||
1434 | { | ||
1435 | return m_LSL_Functions.llGetScriptState(name); | ||
1436 | } | ||
1437 | |||
1438 | public void llRemoteLoadScript() | ||
1439 | { | ||
1440 | m_LSL_Functions.llRemoteLoadScript(); | ||
1441 | } | ||
1442 | |||
1443 | public void llSetRemoteScriptAccessPin(int pin) | ||
1444 | { | ||
1445 | m_LSL_Functions.llSetRemoteScriptAccessPin(pin); | ||
1446 | } | ||
1447 | |||
1448 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | ||
1449 | { | ||
1450 | m_LSL_Functions.llRemoteLoadScriptPin(target, name, pin, running, start_param); | ||
1451 | } | ||
1452 | |||
1453 | // | ||
1454 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1455 | // | ||
1456 | public void llOpenRemoteDataChannel() | ||
1457 | { | ||
1458 | m_LSL_Functions.llOpenRemoteDataChannel(); | ||
1459 | } | ||
1460 | |||
1461 | public string llSendRemoteData(string channel, string dest, int idata, string sdata) | ||
1462 | { | ||
1463 | return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata); | ||
1464 | } | ||
1465 | |||
1466 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) | ||
1467 | { | ||
1468 | m_LSL_Functions.llRemoteDataReply(channel, message_id, sdata, idata); | ||
1469 | } | ||
1470 | |||
1471 | public void llCloseRemoteDataChannel(string channel) | ||
1472 | { | ||
1473 | m_LSL_Functions.llCloseRemoteDataChannel(channel); | ||
1474 | } | ||
1475 | |||
1476 | public string llMD5String(string src, int nonce) | ||
1477 | { | ||
1478 | return m_LSL_Functions.llMD5String(src, nonce); | ||
1479 | } | ||
1480 | |||
1481 | public void llSetPrimitiveParams(LSL_Types.list rules) | ||
1482 | { | ||
1483 | m_LSL_Functions.llSetPrimitiveParams(rules); | ||
1484 | } | ||
1485 | |||
1486 | public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) | ||
1487 | { | ||
1488 | m_LSL_Functions.llSetLinkPrimitiveParams(linknumber, rules); | ||
1489 | } | ||
1490 | public string llStringToBase64(string str) | ||
1491 | { | ||
1492 | return m_LSL_Functions.llStringToBase64(str); | ||
1493 | } | ||
1494 | |||
1495 | public string llBase64ToString(string str) | ||
1496 | { | ||
1497 | return m_LSL_Functions.llBase64ToString(str); | ||
1498 | } | ||
1499 | |||
1500 | public void llXorBase64Strings() | ||
1501 | { | ||
1502 | m_LSL_Functions.llXorBase64Strings(); | ||
1503 | } | ||
1504 | |||
1505 | public void llRemoteDataSetRegion() | ||
1506 | { | ||
1507 | m_LSL_Functions.llRemoteDataSetRegion(); | ||
1508 | } | ||
1509 | |||
1510 | public double llLog10(double val) | ||
1511 | { | ||
1512 | return m_LSL_Functions.llLog10(val); | ||
1513 | } | ||
1514 | |||
1515 | public double llLog(double val) | ||
1516 | { | ||
1517 | return m_LSL_Functions.llLog(val); | ||
1518 | } | ||
1519 | |||
1520 | public LSL_Types.list llGetAnimationList(string id) | ||
1521 | { | ||
1522 | return m_LSL_Functions.llGetAnimationList(id); | ||
1523 | } | ||
1524 | |||
1525 | public void llSetParcelMusicURL(string url) | ||
1526 | { | ||
1527 | m_LSL_Functions.llSetParcelMusicURL(url); | ||
1528 | } | ||
1529 | |||
1530 | public vector llGetRootPosition() | ||
1531 | { | ||
1532 | return m_LSL_Functions.llGetRootPosition(); | ||
1533 | } | ||
1534 | |||
1535 | public rotation llGetRootRotation() | ||
1536 | { | ||
1537 | return m_LSL_Functions.llGetRootRotation(); | ||
1538 | } | ||
1539 | |||
1540 | public string llGetObjectDesc() | ||
1541 | { | ||
1542 | return m_LSL_Functions.llGetObjectDesc(); | ||
1543 | } | ||
1544 | |||
1545 | public void llSetObjectDesc(string desc) | ||
1546 | { | ||
1547 | m_LSL_Functions.llSetObjectDesc(desc); | ||
1548 | } | ||
1549 | |||
1550 | public string llGetCreator() | ||
1551 | { | ||
1552 | return m_LSL_Functions.llGetCreator(); | ||
1553 | } | ||
1554 | |||
1555 | public string llGetTimestamp() | ||
1556 | { | ||
1557 | return m_LSL_Functions.llGetTimestamp(); | ||
1558 | } | ||
1559 | |||
1560 | public void llSetLinkAlpha(int linknumber, double alpha, int face) | ||
1561 | { | ||
1562 | m_LSL_Functions.llSetLinkAlpha(linknumber, alpha, face); | ||
1563 | } | ||
1564 | |||
1565 | public LSL_Types.LSLInteger llGetNumberOfPrims() | ||
1566 | { | ||
1567 | return m_LSL_Functions.llGetNumberOfPrims(); | ||
1568 | } | ||
1569 | |||
1570 | public string llGetNumberOfNotecardLines(string name) | ||
1571 | { | ||
1572 | return m_LSL_Functions.llGetNumberOfNotecardLines(name); | ||
1573 | } | ||
1574 | |||
1575 | public LSL_Types.list llGetBoundingBox(string obj) | ||
1576 | { | ||
1577 | return m_LSL_Functions.llGetBoundingBox(obj); | ||
1578 | } | ||
1579 | |||
1580 | public vector llGetGeometricCenter() | ||
1581 | { | ||
1582 | return m_LSL_Functions.llGetGeometricCenter(); | ||
1583 | } | ||
1584 | |||
1585 | public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) | ||
1586 | { | ||
1587 | return m_LSL_Functions.llGetPrimitiveParams(rules); | ||
1588 | } | ||
1589 | |||
1590 | // | ||
1591 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1592 | // | ||
1593 | public string llIntegerToBase64(int number) | ||
1594 | { | ||
1595 | return m_LSL_Functions.llIntegerToBase64(number); | ||
1596 | } | ||
1597 | |||
1598 | public LSL_Types.LSLInteger llBase64ToInteger(string str) | ||
1599 | { | ||
1600 | return m_LSL_Functions.llBase64ToInteger(str); | ||
1601 | } | ||
1602 | |||
1603 | public double llGetGMTclock() | ||
1604 | { | ||
1605 | return m_LSL_Functions.llGetGMTclock(); | ||
1606 | } | ||
1607 | |||
1608 | public string llGetSimulatorHostname() | ||
1609 | { | ||
1610 | return m_LSL_Functions.llGetSimulatorHostname(); | ||
1611 | } | ||
1612 | |||
1613 | public void llSetLocalRot(rotation rot) | ||
1614 | { | ||
1615 | m_LSL_Functions.llSetLocalRot(rot); | ||
1616 | } | ||
1617 | |||
1618 | public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers) | ||
1619 | { | ||
1620 | return m_LSL_Functions.llParseStringKeepNulls(src, seperators, spacers); | ||
1621 | } | ||
1622 | |||
1623 | public void llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, int param) | ||
1624 | { | ||
1625 | m_LSL_Functions.llRezAtRoot(inventory, position, velocity, rot, param); | ||
1626 | } | ||
1627 | |||
1628 | public LSL_Types.LSLInteger llGetObjectPermMask(int mask) | ||
1629 | { | ||
1630 | return m_LSL_Functions.llGetObjectPermMask(mask); | ||
1631 | } | ||
1632 | |||
1633 | public void llSetObjectPermMask(int mask, int value) | ||
1634 | { | ||
1635 | m_LSL_Functions.llSetObjectPermMask(mask, value); | ||
1636 | } | ||
1637 | |||
1638 | public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) | ||
1639 | { | ||
1640 | return m_LSL_Functions.llGetInventoryPermMask(item, mask); | ||
1641 | } | ||
1642 | |||
1643 | public void llSetInventoryPermMask(string item, int mask, int value) | ||
1644 | { | ||
1645 | m_LSL_Functions.llSetInventoryPermMask(item, mask, value); | ||
1646 | } | ||
1647 | |||
1648 | public string llGetInventoryCreator(string item) | ||
1649 | { | ||
1650 | return m_LSL_Functions.llGetInventoryCreator(item); | ||
1651 | } | ||
1652 | |||
1653 | public void llOwnerSay(string msg) | ||
1654 | { | ||
1655 | m_LSL_Functions.llOwnerSay(msg); | ||
1656 | } | ||
1657 | |||
1658 | public string llRequestSimulatorData(string simulator, int data) | ||
1659 | { | ||
1660 | return m_LSL_Functions.llRequestSimulatorData(simulator, data); | ||
1661 | } | ||
1662 | |||
1663 | public void llForceMouselook(int mouselook) | ||
1664 | { | ||
1665 | m_LSL_Functions.llForceMouselook(mouselook); | ||
1666 | } | ||
1667 | |||
1668 | public double llGetObjectMass(string id) | ||
1669 | { | ||
1670 | return m_LSL_Functions.llGetObjectMass(id); | ||
1671 | } | ||
1672 | |||
1673 | public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) | ||
1674 | { | ||
1675 | return m_LSL_Functions.llListReplaceList(dest, src, start, end); | ||
1676 | } | ||
1677 | |||
1678 | public void llLoadURL(string avatar_id, string message, string url) | ||
1679 | { | ||
1680 | m_LSL_Functions.llLoadURL(avatar_id, message, url); | ||
1681 | } | ||
1682 | |||
1683 | public void llParcelMediaCommandList(LSL_Types.list commandList) | ||
1684 | { | ||
1685 | m_LSL_Functions.llParcelMediaCommandList(commandList); | ||
1686 | } | ||
1687 | |||
1688 | public void llParcelMediaQuery() | ||
1689 | { | ||
1690 | m_LSL_Functions.llParcelMediaQuery(); | ||
1691 | } | ||
1692 | |||
1693 | public LSL_Types.LSLInteger llModPow(int a, int b, int c) | ||
1694 | { | ||
1695 | return m_LSL_Functions.llModPow(a, b, c); | ||
1696 | } | ||
1697 | |||
1698 | // | ||
1699 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1700 | // | ||
1701 | public LSL_Types.LSLInteger llGetInventoryType(string name) | ||
1702 | { | ||
1703 | return m_LSL_Functions.llGetInventoryType(name); | ||
1704 | } | ||
1705 | |||
1706 | public void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons) | ||
1707 | { | ||
1708 | m_LSL_Functions.llSetPayPrice(price, quick_pay_buttons); | ||
1709 | } | ||
1710 | |||
1711 | public vector llGetCameraPos() | ||
1712 | { | ||
1713 | return m_LSL_Functions.llGetCameraPos(); | ||
1714 | } | ||
1715 | |||
1716 | public rotation llGetCameraRot() | ||
1717 | { | ||
1718 | return m_LSL_Functions.llGetCameraRot(); | ||
1719 | } | ||
1720 | |||
1721 | public void llSetPrimURL() | ||
1722 | { | ||
1723 | m_LSL_Functions.llSetPrimURL(); | ||
1724 | } | ||
1725 | |||
1726 | public void llRefreshPrimURL() | ||
1727 | { | ||
1728 | m_LSL_Functions.llRefreshPrimURL(); | ||
1729 | } | ||
1730 | |||
1731 | public string llEscapeURL(string url) | ||
1732 | { | ||
1733 | return m_LSL_Functions.llEscapeURL(url); | ||
1734 | } | ||
1735 | |||
1736 | public string llUnescapeURL(string url) | ||
1737 | { | ||
1738 | return m_LSL_Functions.llUnescapeURL(url); | ||
1739 | } | ||
1740 | |||
1741 | public void llMapDestination(string simname, vector pos, vector look_at) | ||
1742 | { | ||
1743 | m_LSL_Functions.llMapDestination(simname, pos, look_at); | ||
1744 | } | ||
1745 | |||
1746 | public void llAddToLandBanList(string avatar, double hours) | ||
1747 | { | ||
1748 | m_LSL_Functions.llAddToLandBanList(avatar, hours); | ||
1749 | } | ||
1750 | |||
1751 | public void llRemoveFromLandPassList(string avatar) | ||
1752 | { | ||
1753 | m_LSL_Functions.llRemoveFromLandPassList(avatar); | ||
1754 | } | ||
1755 | |||
1756 | public void llRemoveFromLandBanList(string avatar) | ||
1757 | { | ||
1758 | m_LSL_Functions.llRemoveFromLandBanList(avatar); | ||
1759 | } | ||
1760 | |||
1761 | public void llSetCameraParams(LSL_Types.list rules) | ||
1762 | { | ||
1763 | m_LSL_Functions.llSetCameraParams(rules); | ||
1764 | } | ||
1765 | |||
1766 | public void llClearCameraParams() | ||
1767 | { | ||
1768 | m_LSL_Functions.llClearCameraParams(); | ||
1769 | } | ||
1770 | |||
1771 | public double llListStatistics(int operation, LSL_Types.list src) | ||
1772 | { | ||
1773 | return m_LSL_Functions.llListStatistics(operation, src); | ||
1774 | } | ||
1775 | |||
1776 | public LSL_Types.LSLInteger llGetUnixTime() | ||
1777 | { | ||
1778 | return m_LSL_Functions.llGetUnixTime(); | ||
1779 | } | ||
1780 | |||
1781 | public LSL_Types.LSLInteger llGetParcelFlags(vector pos) | ||
1782 | { | ||
1783 | return m_LSL_Functions.llGetParcelFlags(pos); | ||
1784 | } | ||
1785 | |||
1786 | public LSL_Types.LSLInteger llGetRegionFlags() | ||
1787 | { | ||
1788 | return m_LSL_Functions.llGetRegionFlags(); | ||
1789 | } | ||
1790 | |||
1791 | public string llXorBase64StringsCorrect(string str1, string str2) | ||
1792 | { | ||
1793 | return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2); | ||
1794 | } | ||
1795 | |||
1796 | public string llHTTPRequest(string url, LSL_Types.list parameters, string body) | ||
1797 | { | ||
1798 | return m_LSL_Functions.llHTTPRequest(url, parameters, body); | ||
1799 | } | ||
1800 | |||
1801 | public void llResetLandBanList() | ||
1802 | { | ||
1803 | m_LSL_Functions.llResetLandBanList(); | ||
1804 | } | ||
1805 | |||
1806 | public void llResetLandPassList() | ||
1807 | { | ||
1808 | m_LSL_Functions.llResetLandPassList(); | ||
1809 | } | ||
1810 | |||
1811 | public LSL_Types.LSLInteger llGetParcelPrimCount(vector pos, int category, int sim_wide) | ||
1812 | { | ||
1813 | return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); | ||
1814 | } | ||
1815 | |||
1816 | public LSL_Types.list llGetParcelPrimOwners(vector pos) | ||
1817 | { | ||
1818 | return m_LSL_Functions.llGetParcelPrimOwners(pos); | ||
1819 | } | ||
1820 | |||
1821 | public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) | ||
1822 | { | ||
1823 | return m_LSL_Functions.llGetObjectPrimCount(object_id); | ||
1824 | } | ||
1825 | |||
1826 | // | ||
1827 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1828 | // | ||
1829 | public LSL_Types.LSLInteger llGetParcelMaxPrims(vector pos, int sim_wide) | ||
1830 | { | ||
1831 | return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); | ||
1832 | } | ||
1833 | |||
1834 | public LSL_Types.list llGetParcelDetails(vector pos, LSL_Types.list param) | ||
1835 | { | ||
1836 | return m_LSL_Functions.llGetParcelDetails(pos, param); | ||
1837 | } | ||
1838 | |||
1839 | public void llSetLinkTexture(int linknumber, string texture, int face) | ||
1840 | { | ||
1841 | m_LSL_Functions.llSetLinkTexture(linknumber, texture, face); | ||
1842 | } | ||
1843 | |||
1844 | public string llStringTrim(string src, int type) | ||
1845 | { | ||
1846 | return m_LSL_Functions.llStringTrim(src, type); | ||
1847 | } | ||
1848 | |||
1849 | public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) | ||
1850 | { | ||
1851 | return m_LSL_Functions.llGetObjectDetails(id, args); | ||
1852 | } | ||
1853 | |||
1854 | public double llList2Float(LSL_Types.list src, int index) | ||
1855 | { | ||
1856 | return m_LSL_Functions.llList2Float(src, index); | ||
1857 | } | ||
1858 | |||
1859 | // LSL CONSTANTS | ||
1860 | public const int TRUE = 1; | ||
1861 | public const int FALSE = 0; | ||
1862 | |||
1863 | public const int STATUS_PHYSICS = 1; | ||
1864 | public const int STATUS_ROTATE_X = 2; | ||
1865 | public const int STATUS_ROTATE_Y = 4; | ||
1866 | public const int STATUS_ROTATE_Z = 8; | ||
1867 | public const int STATUS_PHANTOM = 16; | ||
1868 | public const int STATUS_SANDBOX = 32; | ||
1869 | public const int STATUS_BLOCK_GRAB = 64; | ||
1870 | public const int STATUS_DIE_AT_EDGE = 128; | ||
1871 | public const int STATUS_RETURN_AT_EDGE = 256; | ||
1872 | public const int STATUS_CAST_SHADOWS = 512; | ||
1873 | |||
1874 | public const int AGENT = 1; | ||
1875 | public const int ACTIVE = 2; | ||
1876 | public const int PASSIVE = 4; | ||
1877 | public const int SCRIPTED = 8; | ||
1878 | |||
1879 | public const int CONTROL_FWD = 1; | ||
1880 | public const int CONTROL_BACK = 2; | ||
1881 | public const int CONTROL_LEFT = 4; | ||
1882 | public const int CONTROL_RIGHT = 8; | ||
1883 | public const int CONTROL_UP = 16; | ||
1884 | public const int CONTROL_DOWN = 32; | ||
1885 | public const int CONTROL_ROT_LEFT = 256; | ||
1886 | public const int CONTROL_ROT_RIGHT = 512; | ||
1887 | public const int CONTROL_LBUTTON = 268435456; | ||
1888 | public const int CONTROL_ML_LBUTTON = 1073741824; | ||
1889 | |||
1890 | //Permissions | ||
1891 | public const int PERMISSION_DEBIT = 2; | ||
1892 | public const int PERMISSION_TAKE_CONTROLS = 4; | ||
1893 | public const int PERMISSION_REMAP_CONTROLS = 8; | ||
1894 | public const int PERMISSION_TRIGGER_ANIMATION = 16; | ||
1895 | public const int PERMISSION_ATTACH = 32; | ||
1896 | public const int PERMISSION_RELEASE_OWNERSHIP = 64; | ||
1897 | public const int PERMISSION_CHANGE_LINKS = 128; | ||
1898 | public const int PERMISSION_CHANGE_JOINTS = 256; | ||
1899 | public const int PERMISSION_CHANGE_PERMISSIONS = 512; | ||
1900 | public const int PERMISSION_TRACK_CAMERA = 1024; | ||
1901 | |||
1902 | public const int AGENT_FLYING = 1; | ||
1903 | public const int AGENT_ATTACHMENTS = 2; | ||
1904 | public const int AGENT_SCRIPTED = 4; | ||
1905 | public const int AGENT_MOUSELOOK = 8; | ||
1906 | public const int AGENT_SITTING = 16; | ||
1907 | public const int AGENT_ON_OBJECT = 32; | ||
1908 | public const int AGENT_AWAY = 64; | ||
1909 | public const int AGENT_WALKING = 128; | ||
1910 | public const int AGENT_IN_AIR = 256; | ||
1911 | public const int AGENT_TYPING = 512; | ||
1912 | public const int AGENT_CROUCHING = 1024; | ||
1913 | public const int AGENT_BUSY = 2048; | ||
1914 | public const int AGENT_ALWAYS_RUN = 4096; | ||
1915 | |||
1916 | //Particle Systems | ||
1917 | public const int PSYS_PART_INTERP_COLOR_MASK = 1; | ||
1918 | public const int PSYS_PART_INTERP_SCALE_MASK = 2; | ||
1919 | public const int PSYS_PART_BOUNCE_MASK = 4; | ||
1920 | public const int PSYS_PART_WIND_MASK = 8; | ||
1921 | public const int PSYS_PART_FOLLOW_SRC_MASK = 16; | ||
1922 | public const int PSYS_PART_FOLLOW_VELOCITY_MASK = 32; | ||
1923 | public const int PSYS_PART_TARGET_POS_MASK = 64; | ||
1924 | public const int PSYS_PART_TARGET_LINEAR_MASK = 128; | ||
1925 | public const int PSYS_PART_EMISSIVE_MASK = 256; | ||
1926 | public const int PSYS_PART_FLAGS = 0; | ||
1927 | public const int PSYS_PART_START_COLOR = 1; | ||
1928 | public const int PSYS_PART_START_ALPHA = 2; | ||
1929 | public const int PSYS_PART_END_COLOR = 3; | ||
1930 | public const int PSYS_PART_END_ALPHA = 4; | ||
1931 | public const int PSYS_PART_START_SCALE = 5; | ||
1932 | public const int PSYS_PART_END_SCALE = 6; | ||
1933 | public const int PSYS_PART_MAX_AGE = 7; | ||
1934 | public const int PSYS_SRC_ACCEL = 8; | ||
1935 | public const int PSYS_SRC_PATTERN = 9; | ||
1936 | public const int PSYS_SRC_INNERANGLE = 10; | ||
1937 | public const int PSYS_SRC_OUTERANGLE = 11; | ||
1938 | public const int PSYS_SRC_TEXTURE = 12; | ||
1939 | public const int PSYS_SRC_BURST_RATE = 13; | ||
1940 | public const int PSYS_SRC_BURST_PART_COUNT = 15; | ||
1941 | public const int PSYS_SRC_BURST_RADIUS = 16; | ||
1942 | public const int PSYS_SRC_BURST_SPEED_MIN = 17; | ||
1943 | public const int PSYS_SRC_BURST_SPEED_MAX = 18; | ||
1944 | public const int PSYS_SRC_MAX_AGE = 19; | ||
1945 | public const int PSYS_SRC_TARGET_KEY = 20; | ||
1946 | public const int PSYS_SRC_OMEGA = 21; | ||
1947 | public const int PSYS_SRC_ANGLE_BEGIN = 22; | ||
1948 | public const int PSYS_SRC_ANGLE_END = 23; | ||
1949 | public const int PSYS_SRC_PATTERN_DROP = 1; | ||
1950 | public const int PSYS_SRC_PATTERN_EXPLODE = 2; | ||
1951 | public const int PSYS_SRC_PATTERN_ANGLE = 4; | ||
1952 | public const int PSYS_SRC_PATTERN_ANGLE_CONE = 8; | ||
1953 | public const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16; | ||
1954 | |||
1955 | public const int VEHICLE_TYPE_NONE = 0; | ||
1956 | public const int VEHICLE_TYPE_SLED = 1; | ||
1957 | public const int VEHICLE_TYPE_CAR = 2; | ||
1958 | public const int VEHICLE_TYPE_BOAT = 3; | ||
1959 | public const int VEHICLE_TYPE_AIRPLANE = 4; | ||
1960 | public const int VEHICLE_TYPE_BALLOON = 5; | ||
1961 | public const int VEHICLE_LINEAR_FRICTION_TIMESCALE = 16; | ||
1962 | public const int VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17; | ||
1963 | public const int VEHICLE_LINEAR_MOTOR_DIRECTION = 18; | ||
1964 | public const int VEHICLE_LINEAR_MOTOR_OFFSET = 20; | ||
1965 | public const int VEHICLE_ANGULAR_MOTOR_DIRECTION = 19; | ||
1966 | public const int VEHICLE_HOVER_HEIGHT = 24; | ||
1967 | public const int VEHICLE_HOVER_EFFICIENCY = 25; | ||
1968 | public const int VEHICLE_HOVER_TIMESCALE = 26; | ||
1969 | public const int VEHICLE_BUOYANCY = 27; | ||
1970 | public const int VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28; | ||
1971 | public const int VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29; | ||
1972 | public const int VEHICLE_LINEAR_MOTOR_TIMESCALE = 30; | ||
1973 | public const int VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31; | ||
1974 | public const int VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32; | ||
1975 | public const int VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33; | ||
1976 | public const int VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34; | ||
1977 | public const int VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35; | ||
1978 | public const int VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36; | ||
1979 | public const int VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37; | ||
1980 | public const int VEHICLE_BANKING_EFFICIENCY = 38; | ||
1981 | public const int VEHICLE_BANKING_MIX = 39; | ||
1982 | public const int VEHICLE_BANKING_TIMESCALE = 40; | ||
1983 | public const int VEHICLE_REFERENCE_FRAME = 44; | ||
1984 | public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1; | ||
1985 | public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2; | ||
1986 | public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4; | ||
1987 | public const int VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 8; | ||
1988 | public const int VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 16; | ||
1989 | public const int VEHICLE_FLAG_HOVER_UP_ONLY = 32; | ||
1990 | public const int VEHICLE_FLAG_LIMIT_MOTOR_UP = 64; | ||
1991 | public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128; | ||
1992 | public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256; | ||
1993 | public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512; | ||
1994 | |||
1995 | public const int INVENTORY_ALL = -1; | ||
1996 | public const int INVENTORY_NONE = -1; | ||
1997 | public const int INVENTORY_TEXTURE = 0; | ||
1998 | public const int INVENTORY_SOUND = 1; | ||
1999 | public const int INVENTORY_LANDMARK = 3; | ||
2000 | public const int INVENTORY_CLOTHING = 5; | ||
2001 | public const int INVENTORY_OBJECT = 6; | ||
2002 | public const int INVENTORY_NOTECARD = 7; | ||
2003 | public const int INVENTORY_SCRIPT = 10; | ||
2004 | public const int INVENTORY_BODYPART = 13; | ||
2005 | public const int INVENTORY_ANIMATION = 20; | ||
2006 | public const int INVENTORY_GESTURE = 21; | ||
2007 | |||
2008 | public const int ATTACH_CHEST = 1; | ||
2009 | public const int ATTACH_HEAD = 2; | ||
2010 | public const int ATTACH_LSHOULDER = 3; | ||
2011 | public const int ATTACH_RSHOULDER = 4; | ||
2012 | public const int ATTACH_LHAND = 5; | ||
2013 | public const int ATTACH_RHAND = 6; | ||
2014 | public const int ATTACH_LFOOT = 7; | ||
2015 | public const int ATTACH_RFOOT = 8; | ||
2016 | public const int ATTACH_BACK = 9; | ||
2017 | public const int ATTACH_PELVIS = 10; | ||
2018 | public const int ATTACH_MOUTH = 11; | ||
2019 | public const int ATTACH_CHIN = 12; | ||
2020 | public const int ATTACH_LEAR = 13; | ||
2021 | public const int ATTACH_REAR = 14; | ||
2022 | public const int ATTACH_LEYE = 15; | ||
2023 | public const int ATTACH_REYE = 16; | ||
2024 | public const int ATTACH_NOSE = 17; | ||
2025 | public const int ATTACH_RUARM = 18; | ||
2026 | public const int ATTACH_RLARM = 19; | ||
2027 | public const int ATTACH_LUARM = 20; | ||
2028 | public const int ATTACH_LLARM = 21; | ||
2029 | public const int ATTACH_RHIP = 22; | ||
2030 | public const int ATTACH_RULEG = 23; | ||
2031 | public const int ATTACH_RLLEG = 24; | ||
2032 | public const int ATTACH_LHIP = 25; | ||
2033 | public const int ATTACH_LULEG = 26; | ||
2034 | public const int ATTACH_LLLEG = 27; | ||
2035 | public const int ATTACH_BELLY = 28; | ||
2036 | public const int ATTACH_RPEC = 29; | ||
2037 | public const int ATTACH_LPEC = 30; | ||
2038 | |||
2039 | public const int LAND_LEVEL = 0; | ||
2040 | public const int LAND_RAISE = 1; | ||
2041 | public const int LAND_LOWER = 2; | ||
2042 | public const int LAND_SMOOTH = 3; | ||
2043 | public const int LAND_NOISE = 4; | ||
2044 | public const int LAND_REVERT = 5; | ||
2045 | public const int LAND_SMALL_BRUSH = 1; | ||
2046 | public const int LAND_MEDIUM_BRUSH = 2; | ||
2047 | public const int LAND_LARGE_BRUSH = 3; | ||
2048 | |||
2049 | //Agent Dataserver | ||
2050 | public const int DATA_ONLINE = 1; | ||
2051 | public const int DATA_NAME = 2; | ||
2052 | public const int DATA_BORN = 3; | ||
2053 | public const int DATA_RATING = 4; | ||
2054 | public const int DATA_SIM_POS = 5; | ||
2055 | public const int DATA_SIM_STATUS = 6; | ||
2056 | public const int DATA_SIM_RATING = 7; | ||
2057 | public const int DATA_PAYINFO = 8; | ||
2058 | |||
2059 | public const int ANIM_ON = 1; | ||
2060 | public const int LOOP = 2; | ||
2061 | public const int REVERSE = 4; | ||
2062 | public const int PING_PONG = 8; | ||
2063 | public const int SMOOTH = 16; | ||
2064 | public const int ROTATE = 32; | ||
2065 | public const int SCALE = 64; | ||
2066 | public const int ALL_SIDES = -1; | ||
2067 | public const int LINK_SET = -1; | ||
2068 | public const int LINK_ROOT = 1; | ||
2069 | public const int LINK_ALL_OTHERS = -2; | ||
2070 | public const int LINK_ALL_CHILDREN = -3; | ||
2071 | public const int LINK_THIS = -4; | ||
2072 | public const int CHANGED_INVENTORY = 1; | ||
2073 | public const int CHANGED_COLOR = 2; | ||
2074 | public const int CHANGED_SHAPE = 4; | ||
2075 | public const int CHANGED_SCALE = 8; | ||
2076 | public const int CHANGED_TEXTURE = 16; | ||
2077 | public const int CHANGED_LINK = 32; | ||
2078 | public const int CHANGED_ALLOWED_DROP = 64; | ||
2079 | public const int CHANGED_OWNER = 128; | ||
2080 | public const int TYPE_INVALID = 0; | ||
2081 | public const int TYPE_INTEGER = 1; | ||
2082 | public const int TYPE_double = 2; | ||
2083 | public const int TYPE_STRING = 3; | ||
2084 | public const int TYPE_KEY = 4; | ||
2085 | public const int TYPE_VECTOR = 5; | ||
2086 | public const int TYPE_ROTATION = 6; | ||
2087 | |||
2088 | //XML RPC Remote Data Channel | ||
2089 | public const int REMOTE_DATA_CHANNEL = 1; | ||
2090 | public const int REMOTE_DATA_REQUEST = 2; | ||
2091 | public const int REMOTE_DATA_REPLY = 3; | ||
2092 | |||
2093 | //llHTTPRequest | ||
2094 | public const int HTTP_METHOD = 0; | ||
2095 | public const int HTTP_MIMETYPE = 1; | ||
2096 | public const int HTTP_BODY_MAXLENGTH = 2; | ||
2097 | public const int HTTP_VERIFY_CERT = 3; | ||
2098 | |||
2099 | public const int PRIM_MATERIAL = 2; | ||
2100 | public const int PRIM_PHYSICS = 3; | ||
2101 | public const int PRIM_TEMP_ON_REZ = 4; | ||
2102 | public const int PRIM_PHANTOM = 5; | ||
2103 | public const int PRIM_POSITION = 6; | ||
2104 | public const int PRIM_SIZE = 7; | ||
2105 | public const int PRIM_ROTATION = 8; | ||
2106 | public const int PRIM_TYPE = 9; | ||
2107 | public const int PRIM_TEXTURE = 17; | ||
2108 | public const int PRIM_COLOR = 18; | ||
2109 | public const int PRIM_BUMP_SHINY = 19; | ||
2110 | public const int PRIM_FULLBRIGHT = 20; | ||
2111 | public const int PRIM_FLEXIBLE = 21; | ||
2112 | public const int PRIM_TEXGEN = 22; | ||
2113 | public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake | ||
2114 | public const int PRIM_POINT_LIGHT = 23; // Huh? | ||
2115 | public const int PRIM_TEXGEN_DEFAULT = 0; | ||
2116 | public const int PRIM_TEXGEN_PLANAR = 1; | ||
2117 | |||
2118 | public const int PRIM_TYPE_BOX = 0; | ||
2119 | public const int PRIM_TYPE_CYLINDER = 1; | ||
2120 | public const int PRIM_TYPE_PRISM = 2; | ||
2121 | public const int PRIM_TYPE_SPHERE = 3; | ||
2122 | public const int PRIM_TYPE_TORUS = 4; | ||
2123 | public const int PRIM_TYPE_TUBE = 5; | ||
2124 | public const int PRIM_TYPE_RING = 6; | ||
2125 | public const int PRIM_TYPE_SCULPT = 7; | ||
2126 | |||
2127 | public const int PRIM_HOLE_DEFAULT = 0; | ||
2128 | public const int PRIM_HOLE_CIRCLE = 16; | ||
2129 | public const int PRIM_HOLE_SQUARE = 32; | ||
2130 | public const int PRIM_HOLE_TRIANGLE = 48; | ||
2131 | |||
2132 | public const int PRIM_MATERIAL_STONE = 0; | ||
2133 | public const int PRIM_MATERIAL_METAL = 1; | ||
2134 | public const int PRIM_MATERIAL_GLASS = 2; | ||
2135 | public const int PRIM_MATERIAL_WOOD = 3; | ||
2136 | public const int PRIM_MATERIAL_FLESH = 4; | ||
2137 | public const int PRIM_MATERIAL_PLASTIC = 5; | ||
2138 | public const int PRIM_MATERIAL_RUBBER = 6; | ||
2139 | public const int PRIM_MATERIAL_LIGHT = 7; | ||
2140 | |||
2141 | public const int PRIM_SHINY_NONE = 0; | ||
2142 | public const int PRIM_SHINY_LOW = 1; | ||
2143 | public const int PRIM_SHINY_MEDIUM = 2; | ||
2144 | public const int PRIM_SHINY_HIGH = 3; | ||
2145 | public const int PRIM_BUMP_NONE = 0; | ||
2146 | public const int PRIM_BUMP_BRIGHT = 1; | ||
2147 | public const int PRIM_BUMP_DARK = 2; | ||
2148 | public const int PRIM_BUMP_WOOD = 3; | ||
2149 | public const int PRIM_BUMP_BARK = 4; | ||
2150 | public const int PRIM_BUMP_BRICKS = 5; | ||
2151 | public const int PRIM_BUMP_CHECKER = 6; | ||
2152 | public const int PRIM_BUMP_CONCRETE = 7; | ||
2153 | public const int PRIM_BUMP_TILE = 8; | ||
2154 | public const int PRIM_BUMP_STONE = 9; | ||
2155 | public const int PRIM_BUMP_DISKS = 10; | ||
2156 | public const int PRIM_BUMP_GRAVEL = 11; | ||
2157 | public const int PRIM_BUMP_BLOBS = 12; | ||
2158 | public const int PRIM_BUMP_SIDING = 13; | ||
2159 | public const int PRIM_BUMP_LARGETILE = 14; | ||
2160 | public const int PRIM_BUMP_STUCCO = 15; | ||
2161 | public const int PRIM_BUMP_SUCTION = 16; | ||
2162 | public const int PRIM_BUMP_WEAVE = 17; | ||
2163 | |||
2164 | public const int PRIM_SCULPT_TYPE_SPHERE = 1; | ||
2165 | public const int PRIM_SCULPT_TYPE_TORUS = 2; | ||
2166 | public const int PRIM_SCULPT_TYPE_PLANE = 3; | ||
2167 | public const int PRIM_SCULPT_TYPE_CYLINDER = 4; | ||
2168 | |||
2169 | public const int MASK_BASE = 0; | ||
2170 | public const int MASK_OWNER = 1; | ||
2171 | public const int MASK_GROUP = 2; | ||
2172 | public const int MASK_EVERYONE = 3; | ||
2173 | public const int MASK_NEXT = 4; | ||
2174 | |||
2175 | public const int PERM_TRANSFER = 8192; | ||
2176 | public const int PERM_MODIFY = 16384; | ||
2177 | public const int PERM_COPY = 32768; | ||
2178 | public const int PERM_MOVE = 524288; | ||
2179 | public const int PERM_ALL = 2147483647; | ||
2180 | |||
2181 | public const int PARCEL_MEDIA_COMMAND_STOP = 0; | ||
2182 | public const int PARCEL_MEDIA_COMMAND_PAUSE = 1; | ||
2183 | public const int PARCEL_MEDIA_COMMAND_PLAY = 2; | ||
2184 | public const int PARCEL_MEDIA_COMMAND_LOOP = 3; | ||
2185 | public const int PARCEL_MEDIA_COMMAND_TEXTURE = 4; | ||
2186 | public const int PARCEL_MEDIA_COMMAND_URL = 5; | ||
2187 | public const int PARCEL_MEDIA_COMMAND_TIME = 6; | ||
2188 | public const int PARCEL_MEDIA_COMMAND_AGENT = 7; | ||
2189 | public const int PARCEL_MEDIA_COMMAND_UNLOAD = 8; | ||
2190 | public const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; | ||
2191 | |||
2192 | public const int PAY_HIDE = -1; | ||
2193 | public const int PAY_DEFAULT = -2; | ||
2194 | |||
2195 | public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; | ||
2196 | public const string EOF = "\n\n\n"; | ||
2197 | public const double PI = 3.14159274f; | ||
2198 | public const double TWO_PI = 6.28318548f; | ||
2199 | public const double PI_BY_TWO = 1.57079637f; | ||
2200 | public const double DEG_TO_RAD = 0.01745329238f; | ||
2201 | public const double RAD_TO_DEG = 57.29578f; | ||
2202 | public const double SQRT2 = 1.414213538f; | ||
2203 | public const int STRING_TRIM_HEAD = 1; | ||
2204 | public const int STRING_TRIM_TAIL = 2; | ||
2205 | public const int STRING_TRIM = 3; | ||
2206 | public const int LIST_STAT_RANGE = 0; | ||
2207 | public const int LIST_STAT_MIN = 1; | ||
2208 | public const int LIST_STAT_MAX = 2; | ||
2209 | public const int LIST_STAT_MEAN = 3; | ||
2210 | public const int LIST_STAT_MEDIAN = 4; | ||
2211 | public const int LIST_STAT_STD_DEV = 5; | ||
2212 | public const int LIST_STAT_SUM = 6; | ||
2213 | public const int LIST_STAT_SUM_SQUARES = 7; | ||
2214 | public const int LIST_STAT_NUM_COUNT = 8; | ||
2215 | public const int LIST_STAT_GEOMETRIC_MEAN = 9; | ||
2216 | public const int LIST_STAT_HARMONIC_MEAN = 100; | ||
2217 | |||
2218 | //ParcelPrim Categories | ||
2219 | public const int PARCEL_COUNT_TOTAL = 0; | ||
2220 | public const int PARCEL_COUNT_OWNER = 1; | ||
2221 | public const int PARCEL_COUNT_GROUP = 2; | ||
2222 | public const int PARCEL_COUNT_OTHER = 3; | ||
2223 | public const int PARCEL_COUNT_SELECTED = 4; | ||
2224 | public const int PARCEL_COUNT_TEMP = 5; | ||
2225 | |||
2226 | public const int DEBUG_CHANNEL = 0x7FFFFFFF; | ||
2227 | public const int PUBLIC_CHANNEL = 0x00000000; | ||
2228 | |||
2229 | public const int OBJECT_NAME = 1; | ||
2230 | public const int OBJECT_DESC = 2; | ||
2231 | public const int OBJECT_POS = 3; | ||
2232 | public const int OBJECT_ROT = 4; | ||
2233 | public const int OBJECT_VELOCITY = 5; | ||
2234 | public const int OBJECT_OWNER = 6; | ||
2235 | public const int OBJECT_GROUP = 7; | ||
2236 | public const int OBJECT_CREATOR = 8; | ||
2237 | |||
2238 | // Can not be public const? | ||
2239 | public vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); | ||
2240 | public rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); | ||
2241 | |||
2242 | |||
2243 | // | ||
2244 | // OSSL | ||
2245 | // | ||
2246 | // FIXME: Refactor so we don't need to pull the script engine | ||
2247 | // into the app domain | ||
2248 | // | ||
2249 | |||
2250 | public void osSetRegionWaterHeight(double height) | ||
2251 | { | ||
2252 | m_OSSL_Functions.osSetRegionWaterHeight(height); | ||
2253 | } | ||
2254 | |||
2255 | public double osList2Double(LSL_Types.list src, int index) | ||
2256 | { | ||
2257 | return m_OSSL_Functions.osList2Double(src, index); | ||
2258 | } | ||
2259 | |||
2260 | public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | ||
2261 | int timer) | ||
2262 | { | ||
2263 | return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer); | ||
2264 | } | ||
2265 | |||
2266 | public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, | ||
2267 | int timer) | ||
2268 | { | ||
2269 | return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer); | ||
2270 | } | ||
2271 | |||
2272 | public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||
2273 | int timer, int alpha) | ||
2274 | { | ||
2275 | return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha); | ||
2276 | } | ||
2277 | |||
2278 | public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | ||
2279 | int timer, int alpha) | ||
2280 | { | ||
2281 | return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha); | ||
2282 | } | ||
2283 | |||
2284 | public double osTerrainGetHeight(int x, int y) | ||
2285 | { | ||
2286 | return m_OSSL_Functions.osTerrainGetHeight(x, y); | ||
2287 | } | ||
2288 | |||
2289 | public int osTerrainSetHeight(int x, int y, double val) | ||
2290 | { | ||
2291 | return m_OSSL_Functions.osTerrainSetHeight(x, y, val); | ||
2292 | } | ||
2293 | |||
2294 | public int osRegionRestart(double seconds) | ||
2295 | { | ||
2296 | return m_OSSL_Functions.osRegionRestart(seconds); | ||
2297 | } | ||
2298 | |||
2299 | public void osRegionNotice(string msg) | ||
2300 | { | ||
2301 | m_OSSL_Functions.osRegionNotice(msg); | ||
2302 | } | ||
2303 | |||
2304 | public bool osConsoleCommand(string Command) | ||
2305 | { | ||
2306 | return m_OSSL_Functions.osConsoleCommand(Command); | ||
2307 | } | ||
2308 | |||
2309 | public void osSetParcelMediaURL(string url) | ||
2310 | { | ||
2311 | m_OSSL_Functions.osSetParcelMediaURL(url); | ||
2312 | } | ||
2313 | |||
2314 | public void osSetPrimFloatOnWater(int floatYN) | ||
2315 | { | ||
2316 | m_OSSL_Functions.osSetPrimFloatOnWater(floatYN); | ||
2317 | } | ||
2318 | |||
2319 | // Animation Functions | ||
2320 | |||
2321 | public void osAvatarPlayAnimation(string avatar, string animation) | ||
2322 | { | ||
2323 | m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation); | ||
2324 | } | ||
2325 | |||
2326 | public void osAvatarStopAnimation(string avatar, string animation) | ||
2327 | { | ||
2328 | m_OSSL_Functions.osAvatarStopAnimation(avatar, animation); | ||
2329 | } | ||
2330 | |||
2331 | |||
2332 | //Texture Draw functions | ||
2333 | |||
2334 | public string osMovePen(string drawList, int x, int y) | ||
2335 | { | ||
2336 | return m_OSSL_Functions.osMovePen(drawList, x, y); | ||
2337 | } | ||
2338 | |||
2339 | public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) | ||
2340 | { | ||
2341 | return m_OSSL_Functions.osDrawLine(drawList, startX, startY, endX, endY); | ||
2342 | } | ||
2343 | |||
2344 | public string osDrawLine(string drawList, int endX, int endY) | ||
2345 | { | ||
2346 | return m_OSSL_Functions.osDrawLine(drawList, endX, endY); | ||
2347 | } | ||
2348 | |||
2349 | public string osDrawText(string drawList, string text) | ||
2350 | { | ||
2351 | return m_OSSL_Functions.osDrawText(drawList, text); | ||
2352 | } | ||
2353 | |||
2354 | public string osDrawEllipse(string drawList, int width, int height) | ||
2355 | { | ||
2356 | return m_OSSL_Functions.osDrawEllipse(drawList, width, height); | ||
2357 | } | ||
2358 | |||
2359 | public string osDrawRectangle(string drawList, int width, int height) | ||
2360 | { | ||
2361 | return m_OSSL_Functions.osDrawRectangle(drawList, width, height); | ||
2362 | } | ||
2363 | |||
2364 | public string osDrawFilledRectangle(string drawList, int width, int height) | ||
2365 | { | ||
2366 | return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height); | ||
2367 | } | ||
2368 | |||
2369 | public string osSetFontSize(string drawList, int fontSize) | ||
2370 | { | ||
2371 | return m_OSSL_Functions.osSetFontSize(drawList, fontSize); | ||
2372 | } | ||
2373 | |||
2374 | public string osSetPenSize(string drawList, int penSize) | ||
2375 | { | ||
2376 | return m_OSSL_Functions.osSetPenSize(drawList, penSize); | ||
2377 | } | ||
2378 | |||
2379 | public string osSetPenColour(string drawList, string colour) | ||
2380 | { | ||
2381 | return m_OSSL_Functions.osSetPenColour(drawList, colour); | ||
2382 | } | ||
2383 | |||
2384 | public string osDrawImage(string drawList, int width, int height, string imageUrl) | ||
2385 | { | ||
2386 | return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl); | ||
2387 | } | ||
2388 | public void osSetStateEvents(int events) | ||
2389 | { | ||
2390 | m_OSSL_Functions.osSetStateEvents(events); | ||
2391 | } | ||
2392 | } | ||
2393 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/ILSL_ScriptCommands.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/ILSL_ScriptCommands.cs new file mode 100644 index 0000000..9e8965c --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/ILSL_ScriptCommands.cs | |||
@@ -0,0 +1,653 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenSim.Region.Environment.Interfaces; | ||
29 | |||
30 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | ||
31 | { | ||
32 | public interface ILSL_ScriptCommands | ||
33 | { | ||
34 | // Interface used for loading and executing scripts | ||
35 | |||
36 | string State { get; set ; } | ||
37 | |||
38 | void state(string newState); | ||
39 | |||
40 | ICommander GetCommander(string name); | ||
41 | |||
42 | void llSay(int channelID, string text); | ||
43 | double llSin(double f); | ||
44 | double llCos(double f); | ||
45 | double llTan(double f); | ||
46 | double llAtan2(double x, double y); | ||
47 | double llSqrt(double f); | ||
48 | double llPow(double fbase, double fexponent); | ||
49 | LSL_Types.LSLInteger llAbs(int i); | ||
50 | double llFabs(double f); | ||
51 | double llFrand(double mag); | ||
52 | LSL_Types.LSLInteger llFloor(double f); | ||
53 | LSL_Types.LSLInteger llCeil(double f); | ||
54 | LSL_Types.LSLInteger llRound(double f); | ||
55 | double llVecMag(LSL_Types.Vector3 v); | ||
56 | LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v); | ||
57 | double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b); | ||
58 | LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r); | ||
59 | LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v); | ||
60 | LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up); | ||
61 | LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r); | ||
62 | LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r); | ||
63 | LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r); | ||
64 | LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end); | ||
65 | void llWhisper(int channelID, string text); | ||
66 | //void llSay(int channelID, string text); | ||
67 | void llShout(int channelID, string text); | ||
68 | void llRegionSay(int channelID, string text); | ||
69 | LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg); | ||
70 | void llListenControl(int number, int active); | ||
71 | void llListenRemove(int number); | ||
72 | void llSensor(string name, string id, int type, double range, double arc); | ||
73 | void llSensorRepeat(string name, string id, int type, double range, double arc, double rate); | ||
74 | void llSensorRemove(); | ||
75 | string llDetectedName(int number); | ||
76 | string llDetectedKey(int number); | ||
77 | string llDetectedOwner(int number); | ||
78 | LSL_Types.LSLInteger llDetectedType(int number); | ||
79 | LSL_Types.Vector3 llDetectedPos(int number); | ||
80 | LSL_Types.Vector3 llDetectedVel(int number); | ||
81 | LSL_Types.Vector3 llDetectedGrab(int number); | ||
82 | LSL_Types.Quaternion llDetectedRot(int number); | ||
83 | LSL_Types.LSLInteger llDetectedGroup(int number); | ||
84 | LSL_Types.LSLInteger llDetectedLinkNumber(int number); | ||
85 | void llDie(); | ||
86 | double llGround(LSL_Types.Vector3 offset); | ||
87 | double llCloud(LSL_Types.Vector3 offset); | ||
88 | LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset); | ||
89 | void llSetStatus(int status, int value); | ||
90 | LSL_Types.LSLInteger llGetStatus(int status); | ||
91 | void llSetScale(LSL_Types.Vector3 scale); | ||
92 | LSL_Types.Vector3 llGetScale(); | ||
93 | void llSetColor(LSL_Types.Vector3 color, int face); | ||
94 | double llGetAlpha(int face); | ||
95 | void llSetAlpha(double alpha, int face); | ||
96 | LSL_Types.Vector3 llGetColor(int face); | ||
97 | void llSetTexture(string texture, int face); | ||
98 | void llScaleTexture(double u, double v, int face); | ||
99 | void llOffsetTexture(double u, double v, int face); | ||
100 | void llRotateTexture(double rotation, int face); | ||
101 | string llGetTexture(int face); | ||
102 | void llSetPos(LSL_Types.Vector3 pos); | ||
103 | |||
104 | //wiki: vector llGetPos() | ||
105 | LSL_Types.Vector3 llGetPos(); | ||
106 | //wiki: vector llGetLocalPos() | ||
107 | LSL_Types.Vector3 llGetLocalPos(); | ||
108 | //wiki: llSetRot(rotation rot) | ||
109 | void llSetRot(LSL_Types.Quaternion rot); | ||
110 | //wiki: rotation llGetRot() | ||
111 | LSL_Types.Quaternion llGetRot(); | ||
112 | //wiki: rotation llGetLocalRot() | ||
113 | LSL_Types.Quaternion llGetLocalRot(); | ||
114 | //wiki: llSetForce(vector force, integer local) | ||
115 | void llSetForce(LSL_Types.Vector3 force, int local); | ||
116 | //wiki: vector llGetForce() | ||
117 | LSL_Types.Vector3 llGetForce(); | ||
118 | //wiki: integer llTarget(vector position, double range) | ||
119 | LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range); | ||
120 | //wiki: llTargetRemove(integer number) | ||
121 | void llTargetRemove(int number); | ||
122 | //wiki: integer llRotTarget(rotation rot, double error) | ||
123 | LSL_Types.LSLInteger llRotTarget(LSL_Types.Quaternion rot, double error); | ||
124 | //wiki: integer llRotTargetRemove(integer number) | ||
125 | void llRotTargetRemove(int number); | ||
126 | //wiki: llMoveToTarget(vector target, double tau) | ||
127 | void llMoveToTarget(LSL_Types.Vector3 target, double tau); | ||
128 | //wiki: llStopMoveToTarget() | ||
129 | void llStopMoveToTarget(); | ||
130 | //wiki: llApplyImpulse(vector force, integer local) | ||
131 | void llApplyImpulse(LSL_Types.Vector3 force, int local); | ||
132 | //wiki: llapplyRotationalImpulse(vector force, integer local) | ||
133 | void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local); | ||
134 | //wiki: llSetTorque(vector torque, integer local) | ||
135 | void llSetTorque(LSL_Types.Vector3 torque, int local); | ||
136 | //wiki: vector llGetTorque() | ||
137 | LSL_Types.Vector3 llGetTorque(); | ||
138 | //wiki: llSeForceAndTorque(vector force, vector torque, integer local) | ||
139 | void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local); | ||
140 | //wiki: vector llGetVel() | ||
141 | LSL_Types.Vector3 llGetVel(); | ||
142 | //wiki: vector llGetAccel() | ||
143 | LSL_Types.Vector3 llGetAccel(); | ||
144 | //wiki: vector llGetOmega() | ||
145 | LSL_Types.Vector3 llGetOmega(); | ||
146 | //wiki: double llGetTimeOfDay() | ||
147 | double llGetTimeOfDay(); | ||
148 | //wiki: double llGetWallclock() | ||
149 | double llGetWallclock(); | ||
150 | //wiki: double llGetTime() | ||
151 | double llGetTime(); | ||
152 | //wiki: llResetTime() | ||
153 | void llResetTime(); | ||
154 | //wiki: double llGetAndResetTime() | ||
155 | double llGetAndResetTime(); | ||
156 | //wiki (deprecated) llSound(string sound, double volume, integer queue, integer loop) | ||
157 | void llSound(); | ||
158 | //wiki: llPlaySound(string sound, double volume) | ||
159 | void llPlaySound(string sound, double volume); | ||
160 | //wiki: llLoopSound(string sound, double volume) | ||
161 | void llLoopSound(string sound, double volume); | ||
162 | //wiki: llLoopSoundMaster(string sound, double volume) | ||
163 | void llLoopSoundMaster(string sound, double volume); | ||
164 | //wiki: llLoopSoundSlave(string sound, double volume) | ||
165 | void llLoopSoundSlave(string sound, double volume); | ||
166 | //wiki llPlaySoundSlave(string sound, double volume) | ||
167 | void llPlaySoundSlave(string sound, double volume); | ||
168 | //wiki: llTriggerSound(string sound, double volume) | ||
169 | void llTriggerSound(string sound, double volume); | ||
170 | //wiki: llStopSound() | ||
171 | void llStopSound(); | ||
172 | //wiki: llPreloadSound(string sound) | ||
173 | void llPreloadSound(string sound); | ||
174 | //wiki: string llGetSubString(string src, integer start, integer end) | ||
175 | string llGetSubString(string src, int start, int end); | ||
176 | //wiki: string llDeleteSubString(string src, integer start, integer end) | ||
177 | string llDeleteSubString(string src, int start, int end); | ||
178 | //wiki string llInsertString(string dst, integer position, string src) | ||
179 | string llInsertString(string dst, int position, string src); | ||
180 | //wiki: string llToUpper(string source) | ||
181 | string llToUpper(string source); | ||
182 | //wiki: string llToLower(string source) | ||
183 | string llToLower(string source); | ||
184 | //wiki: integer llGiveMoney(key destination, integer amount) | ||
185 | LSL_Types.LSLInteger llGiveMoney(string destination, int amount); | ||
186 | //wiki: (deprecated) | ||
187 | void llMakeExplosion(); | ||
188 | //wiki: (deprecated) | ||
189 | void llMakeFountain(); | ||
190 | //wiki: (deprecated) | ||
191 | void llMakeSmoke(); | ||
192 | //wiki: (deprecated) | ||
193 | void llMakeFire(); | ||
194 | //wiki: llRezObject(string inventory, vector pos, vector rel, rotation rot, integer param) | ||
195 | void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param); | ||
196 | //wiki: llLookAt(vector target, double strength, double damping) | ||
197 | void llLookAt(LSL_Types.Vector3 target, double strength, double damping); | ||
198 | //wiki: llStopLookAt() | ||
199 | void llStopLookAt(); | ||
200 | //wiki: llSetTimerEvent(double sec) | ||
201 | void llSetTimerEvent(double sec); | ||
202 | //wiki: llSleep(double sec) | ||
203 | void llSleep(double sec); | ||
204 | //wiki: double llGetMass() | ||
205 | double llGetMass(); | ||
206 | //wiki: llCollisionFilter(string name, key id, integer accept) | ||
207 | void llCollisionFilter(string name, string id, int accept); | ||
208 | //wiki: llTakeControls(integer controls, integer accept, integer pass_on) | ||
209 | void llTakeControls(int controls, int accept, int pass_on); | ||
210 | //wiki: llReleaseControls() | ||
211 | void llReleaseControls(); | ||
212 | //wiki: llAttachToAvatar(integer attachment) | ||
213 | void llAttachToAvatar(int attachment); | ||
214 | //wiki: llDetachFromAvatar() | ||
215 | void llDetachFromAvatar(); | ||
216 | //wiki: (deprecated) llTakeCamera() | ||
217 | void llTakeCamera(); | ||
218 | //wiki: (deprecated) llReleaseCamera() | ||
219 | void llReleaseCamera(); | ||
220 | //wiki: key llGetOwner() | ||
221 | string llGetOwner(); | ||
222 | //wiki: llInstantMessage(key user, string message) | ||
223 | void llInstantMessage(string user, string message); | ||
224 | //wiki: llEmail(string address, string subject, string message) | ||
225 | void llEmail(string address, string subject, string message); | ||
226 | //wiki: llGetNextEmail(string address, string subject) | ||
227 | void llGetNextEmail(string address, string subject); | ||
228 | //wiki: key llGetKey() | ||
229 | string llGetKey(); | ||
230 | //wiki: llSetBuoyancy(double buoyancy) | ||
231 | void llSetBuoyancy(double buoyancy); | ||
232 | //wiki: llSetHoverHeight(double height, integer water, double tau) | ||
233 | void llSetHoverHeight(double height, int water, double tau); | ||
234 | //wiki: llStopHover | ||
235 | void llStopHover(); | ||
236 | //wiki: llMinEventDelay(double delay) | ||
237 | void llMinEventDelay(double delay); | ||
238 | //wiki: (deprecated) llSoundPreload() | ||
239 | void llSoundPreload(); | ||
240 | //wiki: llRotLookAt(rotation target, double strength, double damping) | ||
241 | void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping); | ||
242 | //wiki: integer llStringLength(string str) | ||
243 | LSL_Types.LSLInteger llStringLength(string str); | ||
244 | //wiki: llStartAnimation(string anim) | ||
245 | void llStartAnimation(string anim); | ||
246 | //wiki: llStopAnimation(string anim) | ||
247 | void llStopAnimation(string anim); | ||
248 | //wiki: (deprecated) llPointAt | ||
249 | void llPointAt(); | ||
250 | //wiki: (deprecated) llStopPointAt | ||
251 | void llStopPointAt(); | ||
252 | //wiki: llTargetOmega(vector axis, double spinrate, double gain) | ||
253 | void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain); | ||
254 | //wiki: integer llGetStartParameter() | ||
255 | LSL_Types.LSLInteger llGetStartParameter(); | ||
256 | //wiki: llGodLikeRezObject(key inventory, vector pos) | ||
257 | void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos); | ||
258 | //wiki: llRequestPermissions(key agent, integer perm) | ||
259 | void llRequestPermissions(string agent, int perm); | ||
260 | //wiki: key llGetPermissionsKey() | ||
261 | string llGetPermissionsKey(); | ||
262 | //wiki: integer llGetPermissions() | ||
263 | LSL_Types.LSLInteger llGetPermissions(); | ||
264 | //wiki integer llGetLinkNumber() | ||
265 | LSL_Types.LSLInteger llGetLinkNumber(); | ||
266 | //wiki: llSetLinkColor(integer linknumber, vector color, integer face) | ||
267 | void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face); | ||
268 | //wiki: llCreateLink(key target, integer parent) | ||
269 | void llCreateLink(string target, int parent); | ||
270 | //wiki: llBreakLink(integer linknum) | ||
271 | void llBreakLink(int linknum); | ||
272 | //wiki: llBreakAllLinks() | ||
273 | void llBreakAllLinks(); | ||
274 | //wiki: key llGetLinkKey(integer linknum) | ||
275 | string llGetLinkKey(int linknum); | ||
276 | //wiki: llGetLinkName(integer linknum) | ||
277 | string llGetLinkName(int linknum); | ||
278 | //wiki: integer llGetInventoryNumber(integer type) | ||
279 | LSL_Types.LSLInteger llGetInventoryNumber(int type); | ||
280 | //wiki: string llGetInventoryName(integer type, integer number) | ||
281 | string llGetInventoryName(int type, int number); | ||
282 | //wiki: llSetScriptState(string name, integer run) | ||
283 | void llSetScriptState(string name, int run); | ||
284 | //wiki: double llGetEnergy() | ||
285 | double llGetEnergy(); | ||
286 | //wiki: llGiveInventory(key destination, string inventory) | ||
287 | void llGiveInventory(string destination, string inventory); | ||
288 | //wiki: llRemoveInventory(string item) | ||
289 | void llRemoveInventory(string item); | ||
290 | //wiki: llSetText(string text, vector color, double alpha) | ||
291 | void llSetText(string text, LSL_Types.Vector3 color, double alpha); | ||
292 | //wiki: double llWater(vector offset) | ||
293 | double llWater(LSL_Types.Vector3 offset); | ||
294 | //wiki: llPassTouches(integer pass) | ||
295 | void llPassTouches(int pass); | ||
296 | //wiki: key llRequestAgentData(key id, integer data) | ||
297 | string llRequestAgentData(string id, int data); | ||
298 | //wiki: key llRequestInventoryData(string name) | ||
299 | string llRequestInventoryData(string name); | ||
300 | //wiki: llSetDamage(double damage) | ||
301 | void llSetDamage(double damage); | ||
302 | //wiki: llTeleportAgentHome(key agent) | ||
303 | void llTeleportAgentHome(string agent); | ||
304 | //wiki: llModifyLand(integer action, integer brush) | ||
305 | void llModifyLand(int action, int brush); | ||
306 | //wiki: llCollisionSound(string impact_sound, double impact_volume) | ||
307 | void llCollisionSound(string impact_sound, double impact_volume); | ||
308 | //wiki: llCollisionSprite(string impact_sprite) | ||
309 | void llCollisionSprite(string impact_sprite); | ||
310 | //wiki: string llGetAnimation(key id) | ||
311 | string llGetAnimation(string id); | ||
312 | //wiki: llResetScript() | ||
313 | void llResetScript(); | ||
314 | //wiki: llMessageLinked(integer linknum, integer num, string str, key id) | ||
315 | void llMessageLinked(int linknum, int num, string str, string id); | ||
316 | //wiki: llPushObject(key target, vector impulse, vector ang_impulse, integer local) | ||
317 | void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local); | ||
318 | //wiki: llPassCollisions(integer pass) | ||
319 | void llPassCollisions(int pass); | ||
320 | //wiki: string llGetScriptName() | ||
321 | string llGetScriptName(); | ||
322 | //wiki: integer llGetNumberOfSides() | ||
323 | LSL_Types.LSLInteger llGetNumberOfSides(); | ||
324 | //wiki: rotation llAxisAngle2Rot(vector axis, double angle) | ||
325 | LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle); | ||
326 | //wiki: vector llRot2Axis(rotation rot) | ||
327 | LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot); | ||
328 | //wiki: double llRot2Angle(rotation rot); | ||
329 | double llRot2Angle(LSL_Types.Quaternion rot); | ||
330 | //wiki: double llAcos(double val) | ||
331 | double llAcos(double val); | ||
332 | //wiki: double llAsin(double val) | ||
333 | double llAsin(double val); | ||
334 | //wiki: double llAngleBetween(rotation a, rotation b) | ||
335 | double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b); | ||
336 | //wiki: string llGetInventoryKey(string name) | ||
337 | string llGetInventoryKey(string name); | ||
338 | //wiki: llAllowInventoryDrop(integer add) | ||
339 | void llAllowInventoryDrop(int add); | ||
340 | //wiki: vector llGetSunDirection() | ||
341 | LSL_Types.Vector3 llGetSunDirection(); | ||
342 | //wiki: vector llGetTextureOffset(integer face) | ||
343 | LSL_Types.Vector3 llGetTextureOffset(int face); | ||
344 | //wiki: vector llGetTextureScale(integer side) | ||
345 | LSL_Types.Vector3 llGetTextureScale(int side); | ||
346 | //wiki: double llGetTextureRot(integer side) | ||
347 | double llGetTextureRot(int side); | ||
348 | //wiki: integer llSubStringIndex(string source, string pattern) | ||
349 | LSL_Types.LSLInteger llSubStringIndex(string source, string pattern); | ||
350 | //wiki: key llGetOwnerKey(key id) | ||
351 | string llGetOwnerKey(string id); | ||
352 | //wiki: vector llGetCenterOfMass() | ||
353 | LSL_Types.Vector3 llGetCenterOfMass(); | ||
354 | //wiki: list llListSort(list src, integer stride, integer ascending) | ||
355 | LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending); | ||
356 | //integer llGetListLength(list src) | ||
357 | LSL_Types.LSLInteger llGetListLength(LSL_Types.list src); | ||
358 | //wiki: integer llList2Integer(list src, integer index) | ||
359 | LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index); | ||
360 | //wiki: double llList2double(list src, integer index) | ||
361 | double llList2Float(LSL_Types.list src, int index); | ||
362 | //wiki: string llList2String(list src, integer index) | ||
363 | string llList2String(LSL_Types.list src, int index); | ||
364 | //wiki: key llList2Key(list src, integer index) | ||
365 | string llList2Key(LSL_Types.list src, int index); | ||
366 | //wiki: vector llList2Vector(list src, integer index) | ||
367 | LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index); | ||
368 | //wiki rotation llList2Rot(list src, integer index) | ||
369 | LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index); | ||
370 | //wiki: list llList2List(list src, integer start, integer end) | ||
371 | LSL_Types.list llList2List(LSL_Types.list src, int start, int end); | ||
372 | //wiki: llDeleteSubList(list src, integer start, integer end) | ||
373 | LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end); | ||
374 | //wiki: integer llGetListEntryType(list src, integer index) | ||
375 | LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index); | ||
376 | //wiki: string llList2CSV(list src) | ||
377 | string llList2CSV(LSL_Types.list src); | ||
378 | //wiki: list llCSV2List(string src) | ||
379 | LSL_Types.list llCSV2List(string src); | ||
380 | //wiki: list llListRandomize(list src, integer stride) | ||
381 | LSL_Types.list llListRandomize(LSL_Types.list src, int stride); | ||
382 | //wiki: list llList2ListStrided(list src, integer start, integer end, integer stride) | ||
383 | LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride); | ||
384 | //wiki: vector llGetRegionCorner() | ||
385 | LSL_Types.Vector3 llGetRegionCorner(); | ||
386 | //wiki: list llListInsertList(list dest, list src, integer start) | ||
387 | LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start); | ||
388 | //wiki: integer llListFindList(list src, list test) | ||
389 | LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test); | ||
390 | //wiki: string llGetObjectName() | ||
391 | string llGetObjectName(); | ||
392 | //wiki: llSetObjectName(string name) | ||
393 | void llSetObjectName(string name); | ||
394 | //wiki: string llGetDate() | ||
395 | string llGetDate(); | ||
396 | //wiki: integer llEdgeOfWorld(vector pos, vector dir) | ||
397 | LSL_Types.LSLInteger llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir); | ||
398 | //wiki: integer llGetAgentInfo(key id) | ||
399 | LSL_Types.LSLInteger llGetAgentInfo(string id); | ||
400 | //wiki: llAdjustSoundVolume(double volume) | ||
401 | void llAdjustSoundVolume(double volume); | ||
402 | //wiki: llSetSoundQueueing(integer queue) | ||
403 | void llSetSoundQueueing(int queue); | ||
404 | //wiki: llSetSoundRadius(double radius) | ||
405 | void llSetSoundRadius(double radius); | ||
406 | //wiki: string llKey2Name(key id) | ||
407 | string llKey2Name(string id); | ||
408 | //wiki: llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, double start, double length, double rate) | ||
409 | void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate); | ||
410 | //wiki: llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west) | ||
411 | void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, | ||
412 | LSL_Types.Vector3 bottom_south_west); | ||
413 | |||
414 | //wiki: llEjectFromLand(key pest) | ||
415 | void llEjectFromLand(string pest); | ||
416 | LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers); | ||
417 | //wiki: integer llOverMyLand(key id) | ||
418 | LSL_Types.LSLInteger llOverMyLand(string id); | ||
419 | //wiki: key llGetLandOwnerAt(vector pos) | ||
420 | string llGetLandOwnerAt(LSL_Types.Vector3 pos); | ||
421 | //wiki: key llGetNotecardLine(string name, integer line) | ||
422 | string llGetNotecardLine(string name, int line); | ||
423 | //wiki: vector llGetAgentSize(key id) | ||
424 | LSL_Types.Vector3 llGetAgentSize(string id); | ||
425 | //wiki: integer llSameGroup(key agent) | ||
426 | LSL_Types.LSLInteger llSameGroup(string agent); | ||
427 | //wiki: llUnSit(key id) | ||
428 | void llUnSit(string id); | ||
429 | //wiki: vector llGroundSlope(vector offset) | ||
430 | LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset); | ||
431 | //wiki: vector llGroundNormal(vector offset) | ||
432 | LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset); | ||
433 | //wiki: vector llGroundContour(vector offset) | ||
434 | LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset); | ||
435 | //wiki: integer llGetAttached() | ||
436 | LSL_Types.LSLInteger llGetAttached(); | ||
437 | //wiki: integer llGetFreeMemory() | ||
438 | LSL_Types.LSLInteger llGetFreeMemory(); | ||
439 | //wiki: string llGetRegionName() | ||
440 | string llGetRegionName(); | ||
441 | //wiki: double llGetRegionTimeDilation() | ||
442 | double llGetRegionTimeDilation(); | ||
443 | //wiki: double llGetRegionFPS() | ||
444 | double llGetRegionFPS(); | ||
445 | //wiki: llParticleSystem(List<Object> rules | ||
446 | void llParticleSystem(LSL_Types.list rules); | ||
447 | //wiki: llGroundRepel(double height, integer water, double tau) | ||
448 | void llGroundRepel(double height, int water, double tau); | ||
449 | //wiki: llGiveInventoryList(string destination, string category, LSL_Types.list inventory) | ||
450 | void llGiveInventoryList(string destination, string category, LSL_Types.list inventory); | ||
451 | //wiki: llSetVehicleType(integer type) | ||
452 | void llSetVehicleType(int type); | ||
453 | //wiki: llSetVehicledoubleParam(integer param, double value) | ||
454 | void llSetVehicledoubleParam(int param, double value); | ||
455 | // wiki: llSetVehicleFloatParam(integer param, float value) | ||
456 | void llSetVehicleFloatParam(int param, float value); | ||
457 | //wiki: llSetVehicleVectorParam(integer param, vector vec) | ||
458 | void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec); | ||
459 | //wiki: llSetVehicleRotationParam(integer param, rotation rot) | ||
460 | void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot); | ||
461 | //wiki: llSetVehicleFlags(integer flags) | ||
462 | void llSetVehicleFlags(int flags); | ||
463 | //wiki: llRemoveVehicleFlags(integer flags) | ||
464 | void llRemoveVehicleFlags(int flags); | ||
465 | //wiki: llSitTarget(vector offset, rotation rot) | ||
466 | void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot); | ||
467 | //wiki key llAvatarOnSitTarget() | ||
468 | string llAvatarOnSitTarget(); | ||
469 | //wiki: llAddToLandPassList(key avatar, double hours) | ||
470 | void llAddToLandPassList(string avatar, double hours); | ||
471 | //wiki: llSetTouchText(string text) | ||
472 | void llSetTouchText(string text); | ||
473 | //wiki: llSetSitText(string text) | ||
474 | void llSetSitText(string text); | ||
475 | //wiki: llSetCameraEyeOffset(vector offset) | ||
476 | void llSetCameraEyeOffset(LSL_Types.Vector3 offset); | ||
477 | //wiki: llSeteCameraAtOffset(vector offset) | ||
478 | void llSetCameraAtOffset(LSL_Types.Vector3 offset); | ||
479 | // | ||
480 | string llDumpList2String(LSL_Types.list src, string seperator); | ||
481 | //wiki: integer llScriptDanger(vector pos) | ||
482 | LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos); | ||
483 | //wiki: llDialog(key avatar, string message, list buttons, integer chat_channel) | ||
484 | void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel); | ||
485 | //wiki: llVolumeDetect(integer detect) | ||
486 | void llVolumeDetect(int detect); | ||
487 | //wiki: llResetOtherScript(string name) | ||
488 | void llResetOtherScript(string name); | ||
489 | //wiki: integer llGetScriptState(string name) | ||
490 | LSL_Types.LSLInteger llGetScriptState(string name); | ||
491 | //wiki: (deprecated) | ||
492 | void llRemoteLoadScript(); | ||
493 | //wiki: llSetRemoteScriptAccessPin(integer pin) | ||
494 | void llSetRemoteScriptAccessPin(int pin); | ||
495 | //wiki: llRemoteLoadScriptPin(key target, string name, integer pin, integer running, integer start_param) | ||
496 | void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param); | ||
497 | //wiki: llOpenRemoteDataChannel() | ||
498 | void llOpenRemoteDataChannel(); | ||
499 | //wiki: key llSendRemoteData(key channel, string dest, integer idata, string sdata) | ||
500 | string llSendRemoteData(string channel, string dest, int idata, string sdata); | ||
501 | //wiki: llRemoteDataReply(key channel, key message_id, string sdata, integer idata) | ||
502 | void llRemoteDataReply(string channel, string message_id, string sdata, int idata); | ||
503 | //wiki: llCloseRemoteDataChannel(key channel) | ||
504 | void llCloseRemoteDataChannel(string channel); | ||
505 | //wiki: string llMD5String(string src, integer nonce) | ||
506 | string llMD5String(string src, int nonce); | ||
507 | //wiki: llSetPrimitiveParams(list rules) | ||
508 | void llSetPrimitiveParams(LSL_Types.list rules); | ||
509 | //wiki: llSetLinkPrimitiveParams(integer linknumber, list rules) | ||
510 | void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules); | ||
511 | //wiki: string llStringToBase64(string str) | ||
512 | string llStringToBase64(string str); | ||
513 | //wiki: string llBase64ToString(string str) | ||
514 | string llBase64ToString(string str); | ||
515 | //wiki: (deprecated) | ||
516 | void llXorBase64Strings(); | ||
517 | //wiki: llRemoteDataSetRegion() | ||
518 | void llRemoteDataSetRegion(); | ||
519 | //wiki: double llLog10(double val) | ||
520 | double llLog10(double val); | ||
521 | //wiki: double llLog(double val) | ||
522 | double llLog(double val); | ||
523 | //wiki: list llGetAnimationList(key id) | ||
524 | LSL_Types.list llGetAnimationList(string id); | ||
525 | //wiki: llSetParcelMusicURL(string url) | ||
526 | void llSetParcelMusicURL(string url); | ||
527 | //wiki: vector llGetRootPosition() | ||
528 | LSL_Types.Vector3 llGetRootPosition(); | ||
529 | //wiki: rotation llGetRootRotation() | ||
530 | LSL_Types.Quaternion llGetRootRotation(); | ||
531 | //wiki: string llGetObjectDesc() | ||
532 | string llGetObjectDesc(); | ||
533 | //wiki: llSetObjectDesc(string desc) | ||
534 | void llSetObjectDesc(string desc); | ||
535 | //wiki: key llGetCreator() | ||
536 | string llGetCreator(); | ||
537 | //wiki: string llGetTimestamp() | ||
538 | string llGetTimestamp(); | ||
539 | //wiki: llSetLinkAlpha(integer linknumber, double alpha, integer face) | ||
540 | void llSetLinkAlpha(int linknumber, double alpha, int face); | ||
541 | //wiki: integer llGetNumberOfPrims() | ||
542 | LSL_Types.LSLInteger llGetNumberOfPrims(); | ||
543 | //wiki: key llGetNumberOfNotecardLines(string name) | ||
544 | string llGetNumberOfNotecardLines(string name); | ||
545 | //wiki: list llGetBoundingBox(key object) | ||
546 | LSL_Types.list llGetBoundingBox(string obj); | ||
547 | //wiki: vector llGetGeometricCenter() | ||
548 | LSL_Types.Vector3 llGetGeometricCenter(); | ||
549 | //wiki: list llGetPrimitiveParams(list rules) | ||
550 | LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules); | ||
551 | //wiki: string llIntegerToBase64(integer number) | ||
552 | string llIntegerToBase64(int number); | ||
553 | //wiki integer llBase64ToInteger(string str) | ||
554 | LSL_Types.LSLInteger llBase64ToInteger(string str); | ||
555 | //wiki: double llGetGMTclock() | ||
556 | double llGetGMTclock(); | ||
557 | //wiki: string llGetSimulatorHostname() | ||
558 | string llGetSimulatorHostname(); | ||
559 | //llSetLocalRot(rotation rot) | ||
560 | void llSetLocalRot(LSL_Types.Quaternion rot); | ||
561 | //wiki: list llParseStringKeepNulls(string src, list separators, list spacers) | ||
562 | LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers); | ||
563 | //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param) | ||
564 | void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, | ||
565 | LSL_Types.Quaternion rot, int param); | ||
566 | |||
567 | //wiki: integer llGetObjectPermMask(integer mask) | ||
568 | LSL_Types.LSLInteger llGetObjectPermMask(int mask); | ||
569 | //wiki: llSetObjectPermMask(integer mask, integer value) | ||
570 | void llSetObjectPermMask(int mask, int value); | ||
571 | //wiki integer llGetInventoryPermMask(string item, integer mask) | ||
572 | LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask); | ||
573 | //wiki: llSetInventoryPermMask(string item, integer mask, integer value) | ||
574 | void llSetInventoryPermMask(string item, int mask, int value); | ||
575 | //wiki: key llGetInventoryCreator(string item) | ||
576 | string llGetInventoryCreator(string item); | ||
577 | //wiki: llOwnerSay(string msg) | ||
578 | void llOwnerSay(string msg); | ||
579 | //wiki: key llRequestSimulatorData(string simulator, integer data) | ||
580 | string llRequestSimulatorData(string simulator, int data); | ||
581 | //wiki: llForceMouselook(integer mouselook) | ||
582 | void llForceMouselook(int mouselook); | ||
583 | //wiki: double llGetObjectMass(key id) | ||
584 | double llGetObjectMass(string id); | ||
585 | LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end); | ||
586 | //wiki: llLoadURL(key avatar_id, string message, string url) | ||
587 | void llLoadURL(string avatar_id, string message, string url); | ||
588 | //wiki: llParcelMediaCommandList(list commandList) | ||
589 | void llParcelMediaCommandList(LSL_Types.list commandList); | ||
590 | void llParcelMediaQuery(); | ||
591 | //wiki integer llModPow(integer a, integer b, integer c) | ||
592 | LSL_Types.LSLInteger llModPow(int a, int b, int c); | ||
593 | //wiki: integer llGetInventoryType(string name) | ||
594 | LSL_Types.LSLInteger llGetInventoryType(string name); | ||
595 | //wiki: llSetPayPrice(integer price, list quick_pay_buttons) | ||
596 | void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons); | ||
597 | //wiki: vector llGetCameraPos() | ||
598 | LSL_Types.Vector3 llGetCameraPos(); | ||
599 | //wiki rotation llGetCameraRot() | ||
600 | LSL_Types.Quaternion llGetCameraRot(); | ||
601 | //wiki: (deprecated) | ||
602 | void llSetPrimURL(); | ||
603 | //wiki: (deprecated) | ||
604 | void llRefreshPrimURL(); | ||
605 | //wiki: string llEscapeURL(string url) | ||
606 | string llEscapeURL(string url); | ||
607 | //wiki: string llUnescapeURL(string url) | ||
608 | string llUnescapeURL(string url); | ||
609 | //wiki: llMapDestination(string simname, vector pos, vector look_at) | ||
610 | void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at); | ||
611 | //wiki: llAddToLandBanList(key avatar, double hours) | ||
612 | void llAddToLandBanList(string avatar, double hours); | ||
613 | //wiki: llRemoveFromLandPassList(key avatar) | ||
614 | void llRemoveFromLandPassList(string avatar); | ||
615 | //wiki: llRemoveFromLandBanList(key avatar) | ||
616 | void llRemoveFromLandBanList(string avatar); | ||
617 | //wiki: llSetCameraParams(list rules) | ||
618 | void llSetCameraParams(LSL_Types.list rules); | ||
619 | //wiki: llClearCameraParams() | ||
620 | void llClearCameraParams(); | ||
621 | //wiki: double llListStatistics(integer operation, list src) | ||
622 | double llListStatistics(int operation, LSL_Types.list src); | ||
623 | //wiki: integer llGetUnixTime() | ||
624 | LSL_Types.LSLInteger llGetUnixTime(); | ||
625 | //wiki: integer llGetParcelFlags(vector pos) | ||
626 | LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos); | ||
627 | //wiki: integer llGetRegionFlags() | ||
628 | LSL_Types.LSLInteger llGetRegionFlags(); | ||
629 | //wiki: string llXorBase64StringsCorrect(string str1, string str2) | ||
630 | string llXorBase64StringsCorrect(string str1, string str2); | ||
631 | string llHTTPRequest(string url, LSL_Types.list parameters, string body); | ||
632 | //wiki: llResetLandBanList() | ||
633 | void llResetLandBanList(); | ||
634 | //wiki: llResetLandPassList() | ||
635 | void llResetLandPassList(); | ||
636 | //wiki: integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide) | ||
637 | LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide); | ||
638 | //wiki: list llGetParcelPrimOwners(vector pos) | ||
639 | LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos); | ||
640 | //wiki: integer llGetObjectPrimCount(key object_id) | ||
641 | LSL_Types.LSLInteger llGetObjectPrimCount(string object_id); | ||
642 | //wiki: integer llGetParcelMaxPrims(vector pos, integer sim_wide) | ||
643 | LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide); | ||
644 | //wiki: llGetParcelDetails(vector pos, list params) | ||
645 | LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param); | ||
646 | //wiki: llSetLinkTexture(integer linknumber, string texture, integer face) | ||
647 | void llSetLinkTexture(int linknumber, string texture, int face); | ||
648 | //wiki: string llStringTrim(string src, int type) | ||
649 | string llStringTrim(string src, int type); | ||
650 | //wiki: LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) | ||
651 | LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args); | ||
652 | } | ||
653 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/IOSSL_ScriptCommands.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/IOSSL_ScriptCommands.cs new file mode 100644 index 0000000..82d4673 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/IOSSL_ScriptCommands.cs | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | ||
29 | { | ||
30 | public interface IOSSL_ScriptCommands | ||
31 | { | ||
32 | //OpenSim functions | ||
33 | string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); | ||
34 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | ||
35 | int timer, int alpha); | ||
36 | string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); | ||
37 | string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | ||
38 | int timer, int alpha); | ||
39 | double osTerrainGetHeight(int x, int y); | ||
40 | int osTerrainSetHeight(int x, int y, double val); | ||
41 | int osRegionRestart(double seconds); | ||
42 | void osRegionNotice(string msg); | ||
43 | bool osConsoleCommand(string Command); | ||
44 | void osSetParcelMediaURL(string url); | ||
45 | void osSetPrimFloatOnWater(int floatYN); | ||
46 | |||
47 | // Animation commands | ||
48 | void osAvatarPlayAnimation(string avatar, string animation); | ||
49 | void osAvatarStopAnimation(string avatar, string animation); | ||
50 | |||
51 | //texture draw functions | ||
52 | string osMovePen(string drawList, int x, int y); | ||
53 | string osDrawLine(string drawList, int startX, int startY, int endX, int endY); | ||
54 | string osDrawLine(string drawList, int endX, int endY); | ||
55 | string osDrawText(string drawList, string text); | ||
56 | string osDrawEllipse(string drawList, int width, int height); | ||
57 | string osDrawRectangle(string drawList, int width, int height); | ||
58 | string osDrawFilledRectangle(string drawList, int width, int height); | ||
59 | string osSetFontSize(string drawList, int fontSize); | ||
60 | string osSetPenSize(string drawList, int penSize); | ||
61 | string osSetPenColour(string drawList, string colour); | ||
62 | string osDrawImage(string drawList, int width, int height, string imageUrl); | ||
63 | void osSetStateEvents(int events); | ||
64 | |||
65 | double osList2Double(LSL_Types.list src, int index); | ||
66 | void osSetRegionWaterHeight(double height); | ||
67 | } | ||
68 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/IScript.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/IScript.cs new file mode 100644 index 0000000..e5d0b33 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/IScript.cs | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Reflection; | ||
29 | using System; | ||
30 | using System.Collections; | ||
31 | using System.Collections.Generic; | ||
32 | using OpenSim.Region.Environment.Interfaces; | ||
33 | |||
34 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | ||
35 | { | ||
36 | public interface IScript | ||
37 | { | ||
38 | Type Start(ILSL_ScriptCommands lsl, IOSSL_ScriptCommands ossl); | ||
39 | |||
40 | Dictionary<string, object> GetVars(); | ||
41 | void SetVars(Dictionary<string, object> vars); | ||
42 | void ResetVars(); | ||
43 | |||
44 | string State { get; set; } | ||
45 | } | ||
46 | } | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/LSL_Types.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/LSL_Types.cs new file mode 100644 index 0000000..2d5d2b8 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/LSL_Types.cs | |||
@@ -0,0 +1,1411 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Text.RegularExpressions; | ||
31 | |||
32 | namespace OpenSim.Region.ScriptEngine.XEngine.Script | ||
33 | { | ||
34 | [Serializable] | ||
35 | public partial class LSL_Types | ||
36 | { | ||
37 | // Types are kept is separate .dll to avoid having to add whatever .dll it is in it to script AppDomain | ||
38 | |||
39 | [Serializable] | ||
40 | public struct Vector3 | ||
41 | { | ||
42 | public double x; | ||
43 | public double y; | ||
44 | public double z; | ||
45 | |||
46 | #region Constructors | ||
47 | |||
48 | public Vector3(Vector3 vector) | ||
49 | { | ||
50 | x = (float)vector.x; | ||
51 | y = (float)vector.y; | ||
52 | z = (float)vector.z; | ||
53 | } | ||
54 | |||
55 | public Vector3(double X, double Y, double Z) | ||
56 | { | ||
57 | x = X; | ||
58 | y = Y; | ||
59 | z = Z; | ||
60 | } | ||
61 | |||
62 | public Vector3(string str) | ||
63 | { | ||
64 | str = str.Replace('<', ' '); | ||
65 | str = str.Replace('>', ' '); | ||
66 | string[] tmps = str.Split(new Char[] { ',', '<', '>' }); | ||
67 | if (tmps.Length < 3) | ||
68 | { | ||
69 | x=y=z=0; | ||
70 | return; | ||
71 | } | ||
72 | bool res; | ||
73 | res = Double.TryParse(tmps[0], out x); | ||
74 | res = res & Double.TryParse(tmps[1], out y); | ||
75 | res = res & Double.TryParse(tmps[2], out z); | ||
76 | } | ||
77 | |||
78 | #endregion | ||
79 | |||
80 | #region Overriders | ||
81 | |||
82 | public override string ToString() | ||
83 | { | ||
84 | string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z); | ||
85 | return s; | ||
86 | } | ||
87 | |||
88 | public static explicit operator LSLString(Vector3 vec) | ||
89 | { | ||
90 | string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); | ||
91 | return new LSLString(s); | ||
92 | } | ||
93 | |||
94 | public static explicit operator string(Vector3 vec) | ||
95 | { | ||
96 | string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); | ||
97 | return s; | ||
98 | } | ||
99 | |||
100 | public static explicit operator Vector3(string s) | ||
101 | { | ||
102 | return new Vector3(s); | ||
103 | } | ||
104 | |||
105 | public static bool operator ==(Vector3 lhs, Vector3 rhs) | ||
106 | { | ||
107 | return (lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z); | ||
108 | } | ||
109 | |||
110 | public static bool operator !=(Vector3 lhs, Vector3 rhs) | ||
111 | { | ||
112 | return !(lhs == rhs); | ||
113 | } | ||
114 | |||
115 | public override int GetHashCode() | ||
116 | { | ||
117 | return (x.GetHashCode() ^ y.GetHashCode() ^ z.GetHashCode()); | ||
118 | } | ||
119 | |||
120 | public override bool Equals(object o) | ||
121 | { | ||
122 | if (!(o is Vector3)) return false; | ||
123 | |||
124 | Vector3 vector = (Vector3)o; | ||
125 | |||
126 | return (x == vector.x && x == vector.x && z == vector.z); | ||
127 | } | ||
128 | |||
129 | #endregion | ||
130 | |||
131 | #region Vector & Vector Math | ||
132 | |||
133 | // Vector-Vector Math | ||
134 | public static Vector3 operator +(Vector3 lhs, Vector3 rhs) | ||
135 | { | ||
136 | return new Vector3(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); | ||
137 | } | ||
138 | |||
139 | public static Vector3 operator -(Vector3 lhs, Vector3 rhs) | ||
140 | { | ||
141 | return new Vector3(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); | ||
142 | } | ||
143 | |||
144 | public static Vector3 operator *(Vector3 lhs, Vector3 rhs) | ||
145 | { | ||
146 | return new Vector3(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); | ||
147 | } | ||
148 | |||
149 | public static Vector3 operator %(Vector3 v1, Vector3 v2) | ||
150 | { | ||
151 | //Cross product | ||
152 | Vector3 tv; | ||
153 | tv.x = (v1.y * v2.z) - (v1.z * v2.y); | ||
154 | tv.y = (v1.z * v2.x) - (v1.x * v2.z); | ||
155 | tv.z = (v1.x * v2.y) - (v1.y * v2.x); | ||
156 | return tv; | ||
157 | } | ||
158 | |||
159 | #endregion | ||
160 | |||
161 | #region Vector & Float Math | ||
162 | |||
163 | // Vector-Float and Float-Vector Math | ||
164 | public static Vector3 operator *(Vector3 vec, float val) | ||
165 | { | ||
166 | return new Vector3(vec.x * val, vec.y * val, vec.z * val); | ||
167 | } | ||
168 | |||
169 | public static Vector3 operator *(float val, Vector3 vec) | ||
170 | { | ||
171 | return new Vector3(vec.x * val, vec.y * val, vec.z * val); | ||
172 | } | ||
173 | |||
174 | public static Vector3 operator /(Vector3 v, float f) | ||
175 | { | ||
176 | v.x = v.x / f; | ||
177 | v.y = v.y / f; | ||
178 | v.z = v.z / f; | ||
179 | return v; | ||
180 | } | ||
181 | |||
182 | #endregion | ||
183 | |||
184 | #region Vector & Double Math | ||
185 | |||
186 | public static Vector3 operator *(Vector3 vec, double val) | ||
187 | { | ||
188 | return new Vector3(vec.x * val, vec.y * val, vec.z * val); | ||
189 | } | ||
190 | |||
191 | public static Vector3 operator *(double val, Vector3 vec) | ||
192 | { | ||
193 | return new Vector3(vec.x * val, vec.y * val, vec.z * val); | ||
194 | } | ||
195 | |||
196 | public static Vector3 operator /(Vector3 v, double f) | ||
197 | { | ||
198 | v.x = v.x / f; | ||
199 | v.y = v.y / f; | ||
200 | v.z = v.z / f; | ||
201 | return v; | ||
202 | } | ||
203 | |||
204 | #endregion | ||
205 | |||
206 | #region Vector & Rotation Math | ||
207 | |||
208 | // Vector-Rotation Math | ||
209 | public static Vector3 operator *(Vector3 v, Quaternion r) | ||
210 | { | ||
211 | Quaternion vq = new Quaternion(v.x, v.y, v.z, 0); | ||
212 | Quaternion nq = new Quaternion(-r.x, -r.y, -r.z, r.s); | ||
213 | |||
214 | // adapted for operator * computing "b * a" | ||
215 | Quaternion result = nq * (vq * r); | ||
216 | |||
217 | return new Vector3(result.x, result.y, result.z); | ||
218 | } | ||
219 | |||
220 | public static Vector3 operator /(Vector3 v, Quaternion r) | ||
221 | { | ||
222 | r.s = -r.s; | ||
223 | return v * r; | ||
224 | } | ||
225 | |||
226 | #endregion | ||
227 | |||
228 | #region Static Helper Functions | ||
229 | |||
230 | public static double Dot(Vector3 v1, Vector3 v2) | ||
231 | { | ||
232 | return (v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z); | ||
233 | } | ||
234 | |||
235 | public static Vector3 Cross(Vector3 v1, Vector3 v2) | ||
236 | { | ||
237 | return new Vector3 | ||
238 | ( | ||
239 | v1.y * v2.z - v1.z * v2.y, | ||
240 | v1.z * v2.x - v1.x * v2.z, | ||
241 | v1.x * v2.y - v1.y * v2.x | ||
242 | ); | ||
243 | } | ||
244 | |||
245 | public static double Mag(Vector3 v) | ||
246 | { | ||
247 | return Math.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z); | ||
248 | } | ||
249 | |||
250 | public static Vector3 Norm(Vector3 vector) | ||
251 | { | ||
252 | double mag = Mag(vector); | ||
253 | return new Vector3(vector.x / mag, vector.y / mag, vector.z / mag); | ||
254 | } | ||
255 | |||
256 | #endregion | ||
257 | } | ||
258 | |||
259 | [Serializable] | ||
260 | public struct Quaternion | ||
261 | { | ||
262 | public double x; | ||
263 | public double y; | ||
264 | public double z; | ||
265 | public double s; | ||
266 | |||
267 | #region Constructors | ||
268 | |||
269 | public Quaternion(Quaternion Quat) | ||
270 | { | ||
271 | x = (float)Quat.x; | ||
272 | y = (float)Quat.y; | ||
273 | z = (float)Quat.z; | ||
274 | s = (float)Quat.s; | ||
275 | if (x == 0 && y == 0 && z == 0 && s == 0) | ||
276 | s = 1; | ||
277 | } | ||
278 | |||
279 | public Quaternion(double X, double Y, double Z, double S) | ||
280 | { | ||
281 | x = X; | ||
282 | y = Y; | ||
283 | z = Z; | ||
284 | s = S; | ||
285 | if (x == 0 && y == 0 && z == 0 && s == 0) | ||
286 | s = 1; | ||
287 | } | ||
288 | |||
289 | public Quaternion(string str) | ||
290 | { | ||
291 | str = str.Replace('<', ' '); | ||
292 | str = str.Replace('>', ' '); | ||
293 | string[] tmps = str.Split(new Char[] { ',', '<', '>' }); | ||
294 | if (tmps.Length < 4) | ||
295 | { | ||
296 | x=y=z=s=0; | ||
297 | return; | ||
298 | } | ||
299 | bool res; | ||
300 | res = Double.TryParse(tmps[0], out x); | ||
301 | res = res & Double.TryParse(tmps[1], out y); | ||
302 | res = res & Double.TryParse(tmps[2], out z); | ||
303 | res = res & Double.TryParse(tmps[3], out s); | ||
304 | if (x == 0 && y == 0 && z == 0 && s == 0) | ||
305 | s = 1; | ||
306 | } | ||
307 | |||
308 | #endregion | ||
309 | |||
310 | #region Overriders | ||
311 | |||
312 | public override int GetHashCode() | ||
313 | { | ||
314 | return (x.GetHashCode() ^ y.GetHashCode() ^ z.GetHashCode() ^ s.GetHashCode()); | ||
315 | } | ||
316 | |||
317 | public override bool Equals(object o) | ||
318 | { | ||
319 | if (!(o is Quaternion)) return false; | ||
320 | |||
321 | Quaternion quaternion = (Quaternion)o; | ||
322 | |||
323 | return x == quaternion.x && y == quaternion.y && z == quaternion.z && s == quaternion.s; | ||
324 | } | ||
325 | |||
326 | public override string ToString() | ||
327 | { | ||
328 | string st=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s); | ||
329 | return st; | ||
330 | } | ||
331 | |||
332 | public static explicit operator string(Quaternion r) | ||
333 | { | ||
334 | string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); | ||
335 | return s; | ||
336 | } | ||
337 | |||
338 | public static explicit operator LSLString(Quaternion r) | ||
339 | { | ||
340 | string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); | ||
341 | return new LSLString(s); | ||
342 | } | ||
343 | |||
344 | public static explicit operator Quaternion(string s) | ||
345 | { | ||
346 | return new Quaternion(s); | ||
347 | } | ||
348 | |||
349 | public static bool operator ==(Quaternion lhs, Quaternion rhs) | ||
350 | { | ||
351 | // Return true if the fields match: | ||
352 | return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z && lhs.s == rhs.s; | ||
353 | } | ||
354 | |||
355 | public static bool operator !=(Quaternion lhs, Quaternion rhs) | ||
356 | { | ||
357 | return !(lhs == rhs); | ||
358 | } | ||
359 | |||
360 | #endregion | ||
361 | |||
362 | public static Quaternion operator +(Quaternion a, Quaternion b) | ||
363 | { | ||
364 | return new Quaternion(a.x + b.x, a.y + b.y, a.z + b.z, a.s + b.s); | ||
365 | } | ||
366 | |||
367 | public static Quaternion operator /(Quaternion a, Quaternion b) | ||
368 | { | ||
369 | b.s = -b.s; | ||
370 | return a * b; | ||
371 | } | ||
372 | |||
373 | public static Quaternion operator -(Quaternion a, Quaternion b) | ||
374 | { | ||
375 | return new Quaternion(a.x - b.x, a.y - b.y, a.z - b.z, a.s - b.s); | ||
376 | } | ||
377 | |||
378 | // using the equations below, we need to do "b * a" to be compatible with LSL | ||
379 | public static Quaternion operator *(Quaternion b, Quaternion a) | ||
380 | { | ||
381 | Quaternion c; | ||
382 | c.x = a.s * b.x + a.x * b.s + a.y * b.z - a.z * b.y; | ||
383 | c.y = a.s * b.y + a.y * b.s + a.z * b.x - a.x * b.z; | ||
384 | c.z = a.s * b.z + a.z * b.s + a.x * b.y - a.y * b.x; | ||
385 | c.s = a.s * b.s - a.x * b.x - a.y * b.y - a.z * b.z; | ||
386 | return c; | ||
387 | } | ||
388 | } | ||
389 | |||
390 | [Serializable] | ||
391 | public class list | ||
392 | { | ||
393 | private object[] m_data; | ||
394 | |||
395 | public list(params object[] args) | ||
396 | { | ||
397 | m_data = new object[args.Length]; | ||
398 | m_data = args; | ||
399 | } | ||
400 | |||
401 | public int Length | ||
402 | { | ||
403 | get { | ||
404 | if (m_data == null) | ||
405 | m_data=new Object[0]; | ||
406 | return m_data.Length; | ||
407 | } | ||
408 | } | ||
409 | |||
410 | public object[] Data | ||
411 | { | ||
412 | get { | ||
413 | if (m_data == null) | ||
414 | m_data=new Object[0]; | ||
415 | return m_data; | ||
416 | } | ||
417 | } | ||
418 | |||
419 | public static list operator +(list a, list b) | ||
420 | { | ||
421 | object[] tmp; | ||
422 | tmp = new object[a.Length + b.Length]; | ||
423 | a.Data.CopyTo(tmp, 0); | ||
424 | b.Data.CopyTo(tmp, a.Length); | ||
425 | return new list(tmp); | ||
426 | } | ||
427 | |||
428 | public void Add(object o) | ||
429 | { | ||
430 | object[] tmp; | ||
431 | tmp = new object[m_data.Length + 1]; | ||
432 | m_data.CopyTo(tmp, 0); | ||
433 | tmp[m_data.Length] = o; | ||
434 | m_data = tmp; | ||
435 | } | ||
436 | |||
437 | public bool Contains(object o) | ||
438 | { | ||
439 | bool ret = false; | ||
440 | foreach (object i in Data) | ||
441 | { | ||
442 | if (i == o) | ||
443 | { | ||
444 | ret = true; | ||
445 | break; | ||
446 | } | ||
447 | } | ||
448 | return ret; | ||
449 | } | ||
450 | |||
451 | public list DeleteSublist(int start, int end) | ||
452 | { | ||
453 | // Not an easy one | ||
454 | // If start <= end, remove that part | ||
455 | // if either is negative, count from the end of the array | ||
456 | // if the resulting start > end, remove all BUT that part | ||
457 | |||
458 | Object[] ret; | ||
459 | |||
460 | if (start < 0) | ||
461 | start=m_data.Length-start; | ||
462 | |||
463 | if (start < 0) | ||
464 | start=0; | ||
465 | |||
466 | if (end < 0) | ||
467 | end=m_data.Length-end; | ||
468 | if (end < 0) | ||
469 | end=0; | ||
470 | |||
471 | if (start > end) | ||
472 | { | ||
473 | if (end >= m_data.Length) | ||
474 | return new list(new Object[0]); | ||
475 | |||
476 | if (start >= m_data.Length) | ||
477 | start=m_data.Length-1; | ||
478 | |||
479 | return GetSublist(end, start); | ||
480 | } | ||
481 | |||
482 | // start >= 0 && end >= 0 here | ||
483 | if (start >= m_data.Length) | ||
484 | { | ||
485 | ret=new Object[m_data.Length]; | ||
486 | Array.Copy(m_data, 0, ret, 0, m_data.Length); | ||
487 | |||
488 | return new list(ret); | ||
489 | } | ||
490 | |||
491 | if (end >= m_data.Length) | ||
492 | end=m_data.Length-1; | ||
493 | |||
494 | // now, this makes the math easier | ||
495 | int remove=end+1-start; | ||
496 | |||
497 | ret=new Object[m_data.Length-remove]; | ||
498 | if (ret.Length == 0) | ||
499 | return new list(ret); | ||
500 | |||
501 | int src; | ||
502 | int dest=0; | ||
503 | |||
504 | for (src = 0; src < m_data.Length; src++) | ||
505 | { | ||
506 | if (src < start || src > end) | ||
507 | ret[dest++]=m_data[src]; | ||
508 | } | ||
509 | |||
510 | return new list(ret); | ||
511 | } | ||
512 | |||
513 | public list GetSublist(int start, int end) | ||
514 | { | ||
515 | |||
516 | object[] ret; | ||
517 | |||
518 | // Take care of neg start or end's | ||
519 | // NOTE that either index may still be negative after | ||
520 | // adding the length, so we must take additional | ||
521 | // measures to protect against this. Note also that | ||
522 | // after normalisation the negative indices are no | ||
523 | // longer relative to the end of the list. | ||
524 | |||
525 | if (start < 0) | ||
526 | { | ||
527 | start = m_data.Length + start; | ||
528 | } | ||
529 | |||
530 | if (end < 0) | ||
531 | { | ||
532 | end = m_data.Length + end; | ||
533 | } | ||
534 | |||
535 | // The conventional case is start <= end | ||
536 | // NOTE that the case of an empty list is | ||
537 | // dealt with by the initial test. Start | ||
538 | // less than end is taken to be the most | ||
539 | // common case. | ||
540 | |||
541 | if (start <= end) | ||
542 | { | ||
543 | |||
544 | // Start sublist beyond length | ||
545 | // Also deals with start AND end still negative | ||
546 | if (start >= m_data.Length || end < 0) | ||
547 | { | ||
548 | return new list(); | ||
549 | } | ||
550 | |||
551 | // Sublist extends beyond the end of the supplied list | ||
552 | if (end >= m_data.Length) | ||
553 | { | ||
554 | end = m_data.Length - 1; | ||
555 | } | ||
556 | |||
557 | // Sublist still starts before the beginning of the list | ||
558 | if (start < 0) | ||
559 | { | ||
560 | start = 0; | ||
561 | } | ||
562 | |||
563 | ret = new object[end - start + 1]; | ||
564 | |||
565 | Array.Copy(m_data, start, ret, 0, end - start + 1); | ||
566 | |||
567 | return new list(ret); | ||
568 | |||
569 | } | ||
570 | |||
571 | // Deal with the segmented case: 0->end + start->EOL | ||
572 | |||
573 | else | ||
574 | { | ||
575 | |||
576 | list result = null; | ||
577 | |||
578 | // If end is negative, then prefix list is empty | ||
579 | if (end < 0) | ||
580 | { | ||
581 | result = new list(); | ||
582 | // If start is still negative, then the whole of | ||
583 | // the existing list is returned. This case is | ||
584 | // only admitted if end is also still negative. | ||
585 | if (start < 0) | ||
586 | { | ||
587 | return this; | ||
588 | } | ||
589 | |||
590 | } | ||
591 | else | ||
592 | { | ||
593 | result = GetSublist(0,end); | ||
594 | } | ||
595 | |||
596 | // If start is outside of list, then just return | ||
597 | // the prefix, whatever it is. | ||
598 | if (start >= m_data.Length) | ||
599 | { | ||
600 | return result; | ||
601 | } | ||
602 | |||
603 | return result + GetSublist(start, Data.Length); | ||
604 | |||
605 | } | ||
606 | } | ||
607 | |||
608 | public list Sort(int stride, int ascending) | ||
609 | { | ||
610 | if (Data.Length == 0) | ||
611 | return new list(); // Don't even bother | ||
612 | |||
613 | string[] keys; | ||
614 | |||
615 | if (stride == 1) // The simple case | ||
616 | { | ||
617 | Object[] ret=new Object[Data.Length]; | ||
618 | |||
619 | Array.Copy(Data, 0, ret, 0, Data.Length); | ||
620 | |||
621 | keys=new string[Data.Length]; | ||
622 | |||
623 | for (int k = 0; k < Data.Length; k++) | ||
624 | keys[k] = Data[k].ToString(); | ||
625 | |||
626 | Array.Sort(keys, ret); | ||
627 | |||
628 | if (ascending == 0) | ||
629 | Array.Reverse(ret); | ||
630 | return new list(ret); | ||
631 | } | ||
632 | |||
633 | int src=0; | ||
634 | |||
635 | int len=(Data.Length+stride-1)/stride; | ||
636 | |||
637 | keys=new string[len]; | ||
638 | Object[][] vals=new Object[len][]; | ||
639 | |||
640 | int i; | ||
641 | |||
642 | while (src < Data.Length) | ||
643 | { | ||
644 | Object[] o=new Object[stride]; | ||
645 | |||
646 | for (i = 0; i < stride; i++) | ||
647 | { | ||
648 | if (src < Data.Length) | ||
649 | o[i]=Data[src++]; | ||
650 | else | ||
651 | { | ||
652 | o[i]=new Object(); | ||
653 | src++; | ||
654 | } | ||
655 | } | ||
656 | |||
657 | int idx=src/stride-1; | ||
658 | keys[idx]=o[0].ToString(); | ||
659 | vals[idx]=o; | ||
660 | } | ||
661 | |||
662 | Array.Sort(keys, vals); | ||
663 | if (ascending == 0) | ||
664 | { | ||
665 | Array.Reverse(vals); | ||
666 | } | ||
667 | |||
668 | Object[] sorted=new Object[stride*vals.Length]; | ||
669 | |||
670 | for (i = 0; i < vals.Length; i++) | ||
671 | for (int j = 0; j < stride; j++) | ||
672 | sorted[i*stride+j] = vals[i][j]; | ||
673 | |||
674 | return new list(sorted); | ||
675 | } | ||
676 | |||
677 | #region CSV Methods | ||
678 | |||
679 | public static list FromCSV(string csv) | ||
680 | { | ||
681 | return new list(csv.Split(',')); | ||
682 | } | ||
683 | |||
684 | public string ToCSV() | ||
685 | { | ||
686 | string ret = ""; | ||
687 | foreach (object o in this.Data) | ||
688 | { | ||
689 | if (ret == "") | ||
690 | { | ||
691 | ret = o.ToString(); | ||
692 | } | ||
693 | else | ||
694 | { | ||
695 | ret = ret + ", " + o.ToString(); | ||
696 | } | ||
697 | } | ||
698 | return ret; | ||
699 | } | ||
700 | |||
701 | private string ToSoup() | ||
702 | { | ||
703 | string output; | ||
704 | output = String.Empty; | ||
705 | if (m_data.Length == 0) | ||
706 | { | ||
707 | return String.Empty; | ||
708 | } | ||
709 | foreach (object o in m_data) | ||
710 | { | ||
711 | output = output + o.ToString(); | ||
712 | } | ||
713 | return output; | ||
714 | } | ||
715 | |||
716 | public static explicit operator String(list l) | ||
717 | { | ||
718 | return l.ToSoup(); | ||
719 | } | ||
720 | |||
721 | public static explicit operator LSLString(list l) | ||
722 | { | ||
723 | return new LSLString(l.ToSoup()); | ||
724 | } | ||
725 | |||
726 | public override string ToString() | ||
727 | { | ||
728 | return ToSoup(); | ||
729 | } | ||
730 | |||
731 | #endregion | ||
732 | |||
733 | #region Statistic Methods | ||
734 | |||
735 | public double Min() | ||
736 | { | ||
737 | double minimum = double.PositiveInfinity; | ||
738 | double entry; | ||
739 | for (int i = 0; i < Data.Length; i++) | ||
740 | { | ||
741 | if (double.TryParse(Data[i].ToString(), out entry)) | ||
742 | { | ||
743 | if (entry < minimum) minimum = entry; | ||
744 | } | ||
745 | } | ||
746 | return minimum; | ||
747 | } | ||
748 | |||
749 | public double Max() | ||
750 | { | ||
751 | double maximum = double.NegativeInfinity; | ||
752 | double entry; | ||
753 | for (int i = 0; i < Data.Length; i++) | ||
754 | { | ||
755 | if (double.TryParse(Data[i].ToString(), out entry)) | ||
756 | { | ||
757 | if (entry > maximum) maximum = entry; | ||
758 | } | ||
759 | } | ||
760 | return maximum; | ||
761 | } | ||
762 | |||
763 | public double Range() | ||
764 | { | ||
765 | return (this.Max() / this.Min()); | ||
766 | } | ||
767 | |||
768 | public int NumericLength() | ||
769 | { | ||
770 | int count = 0; | ||
771 | double entry; | ||
772 | for (int i = 0; i < Data.Length; i++) | ||
773 | { | ||
774 | if (double.TryParse(Data[i].ToString(), out entry)) | ||
775 | { | ||
776 | count++; | ||
777 | } | ||
778 | } | ||
779 | return count; | ||
780 | } | ||
781 | |||
782 | public static list ToDoubleList(list src) | ||
783 | { | ||
784 | list ret = new list(); | ||
785 | double entry; | ||
786 | for (int i = 0; i < src.Data.Length - 1; i++) | ||
787 | { | ||
788 | if (double.TryParse(src.Data[i].ToString(), out entry)) | ||
789 | { | ||
790 | ret.Add(entry); | ||
791 | } | ||
792 | } | ||
793 | return ret; | ||
794 | } | ||
795 | |||
796 | public double Sum() | ||
797 | { | ||
798 | double sum = 0; | ||
799 | double entry; | ||
800 | for (int i = 0; i < Data.Length; i++) | ||
801 | { | ||
802 | if (double.TryParse(Data[i].ToString(), out entry)) | ||
803 | { | ||
804 | sum = sum + entry; | ||
805 | } | ||
806 | } | ||
807 | return sum; | ||
808 | } | ||
809 | |||
810 | public double SumSqrs() | ||
811 | { | ||
812 | double sum = 0; | ||
813 | double entry; | ||
814 | for (int i = 0; i < Data.Length; i++) | ||
815 | { | ||
816 | if (double.TryParse(Data[i].ToString(), out entry)) | ||
817 | { | ||
818 | sum = sum + Math.Pow(entry, 2); | ||
819 | } | ||
820 | } | ||
821 | return sum; | ||
822 | } | ||
823 | |||
824 | public double Mean() | ||
825 | { | ||
826 | return (this.Sum() / this.NumericLength()); | ||
827 | } | ||
828 | |||
829 | public void NumericSort() | ||
830 | { | ||
831 | IComparer Numeric = new NumericComparer(); | ||
832 | Array.Sort(Data, Numeric); | ||
833 | } | ||
834 | |||
835 | public void AlphaSort() | ||
836 | { | ||
837 | IComparer Alpha = new AlphaCompare(); | ||
838 | Array.Sort(Data, Alpha); | ||
839 | } | ||
840 | |||
841 | public double Median() | ||
842 | { | ||
843 | return Qi(0.5); | ||
844 | } | ||
845 | |||
846 | public double GeometricMean() | ||
847 | { | ||
848 | double ret = 1.0; | ||
849 | list nums = ToDoubleList(this); | ||
850 | for (int i = 0; i < nums.Data.Length; i++) | ||
851 | { | ||
852 | ret *= (double)nums.Data[i]; | ||
853 | } | ||
854 | return Math.Exp(Math.Log(ret) / (double)nums.Data.Length); | ||
855 | } | ||
856 | |||
857 | public double HarmonicMean() | ||
858 | { | ||
859 | double ret = 0.0; | ||
860 | list nums = ToDoubleList(this); | ||
861 | for (int i = 0; i < nums.Data.Length; i++) | ||
862 | { | ||
863 | ret += 1.0 / (double)nums.Data[i]; | ||
864 | } | ||
865 | return ((double)nums.Data.Length / ret); | ||
866 | } | ||
867 | |||
868 | public double Variance() | ||
869 | { | ||
870 | double s = 0; | ||
871 | list num = ToDoubleList(this); | ||
872 | for (int i = 0; i < num.Data.Length; i++) | ||
873 | { | ||
874 | s += Math.Pow((double)num.Data[i], 2); | ||
875 | } | ||
876 | return (s - num.Data.Length * Math.Pow(num.Mean(), 2)) / (num.Data.Length - 1); | ||
877 | } | ||
878 | |||
879 | public double StdDev() | ||
880 | { | ||
881 | return Math.Sqrt(this.Variance()); | ||
882 | } | ||
883 | |||
884 | public double Qi(double i) | ||
885 | { | ||
886 | list j = this; | ||
887 | j.NumericSort(); | ||
888 | |||
889 | if (Math.Ceiling(this.Length * i) == this.Length * i) | ||
890 | { | ||
891 | return (double)((double)j.Data[(int)(this.Length * i - 1)] + (double)j.Data[(int)(this.Length * i)]) / 2; | ||
892 | } | ||
893 | else | ||
894 | { | ||
895 | return (double)j.Data[((int)(Math.Ceiling(this.Length * i))) - 1]; | ||
896 | } | ||
897 | } | ||
898 | |||
899 | #endregion | ||
900 | |||
901 | public string ToPrettyString() | ||
902 | { | ||
903 | string output; | ||
904 | if (m_data.Length == 0) | ||
905 | { | ||
906 | return "[]"; | ||
907 | } | ||
908 | output = "["; | ||
909 | foreach (object o in m_data) | ||
910 | { | ||
911 | if (o is String) | ||
912 | { | ||
913 | output = output + "\"" + o + "\", "; | ||
914 | } | ||
915 | else | ||
916 | { | ||
917 | output = output + o.ToString() + ", "; | ||
918 | } | ||
919 | } | ||
920 | output = output.Substring(0, output.Length - 2); | ||
921 | output = output + "]"; | ||
922 | return output; | ||
923 | } | ||
924 | |||
925 | public class AlphaCompare : IComparer | ||
926 | { | ||
927 | int IComparer.Compare(object x, object y) | ||
928 | { | ||
929 | return string.Compare(x.ToString(), y.ToString()); | ||
930 | } | ||
931 | } | ||
932 | |||
933 | public class NumericComparer : IComparer | ||
934 | { | ||
935 | int IComparer.Compare(object x, object y) | ||
936 | { | ||
937 | double a; | ||
938 | double b; | ||
939 | if (!double.TryParse(x.ToString(), out a)) | ||
940 | { | ||
941 | a = 0.0; | ||
942 | } | ||
943 | if (!double.TryParse(y.ToString(), out b)) | ||
944 | { | ||
945 | b = 0.0; | ||
946 | } | ||
947 | if (a < b) | ||
948 | { | ||
949 | return -1; | ||
950 | } | ||
951 | else if (a == b) | ||
952 | { | ||
953 | return 0; | ||
954 | } | ||
955 | else | ||
956 | { | ||
957 | return 1; | ||
958 | } | ||
959 | } | ||
960 | } | ||
961 | |||
962 | } | ||
963 | |||
964 | // | ||
965 | // BELOW IS WORK IN PROGRESS... IT WILL CHANGE, SO DON'T USE YET! :) | ||
966 | // | ||
967 | |||
968 | public struct StringTest | ||
969 | { | ||
970 | // Our own little string | ||
971 | internal string actualString; | ||
972 | public static implicit operator bool(StringTest mString) | ||
973 | { | ||
974 | if (mString.actualString.Length == 0) | ||
975 | return true; | ||
976 | return false; | ||
977 | } | ||
978 | public override string ToString() | ||
979 | { | ||
980 | return actualString; | ||
981 | } | ||
982 | |||
983 | } | ||
984 | |||
985 | [Serializable] | ||
986 | public struct key | ||
987 | { | ||
988 | public string value; | ||
989 | |||
990 | #region Constructors | ||
991 | public key(string s) | ||
992 | { | ||
993 | value = s; | ||
994 | } | ||
995 | |||
996 | #endregion | ||
997 | |||
998 | #region Methods | ||
999 | |||
1000 | static public bool Parse2Key(string s) | ||
1001 | { | ||
1002 | Regex isuuid = new Regex(@"^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$", RegexOptions.Compiled); | ||
1003 | if (isuuid.IsMatch(s)) | ||
1004 | { | ||
1005 | return true; | ||
1006 | } | ||
1007 | else | ||
1008 | { | ||
1009 | return false; | ||
1010 | } | ||
1011 | } | ||
1012 | |||
1013 | #endregion | ||
1014 | |||
1015 | #region Operators | ||
1016 | |||
1017 | static public implicit operator Boolean(key k) | ||
1018 | { | ||
1019 | if (k.value.Length == 0) | ||
1020 | { | ||
1021 | return false; | ||
1022 | } | ||
1023 | |||
1024 | if (k.value == "00000000-0000-0000-0000-000000000000") | ||
1025 | { | ||
1026 | return false; | ||
1027 | } | ||
1028 | Regex isuuid = new Regex(@"^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$", RegexOptions.Compiled); | ||
1029 | if (isuuid.IsMatch(k.value)) | ||
1030 | { | ||
1031 | return true; | ||
1032 | } | ||
1033 | else | ||
1034 | { | ||
1035 | return false; | ||
1036 | } | ||
1037 | } | ||
1038 | |||
1039 | static public implicit operator key(string s) | ||
1040 | { | ||
1041 | return new key(s); | ||
1042 | } | ||
1043 | |||
1044 | static public implicit operator String(key k) | ||
1045 | { | ||
1046 | return k.value; | ||
1047 | } | ||
1048 | |||
1049 | public static bool operator ==(key k1, key k2) | ||
1050 | { | ||
1051 | return k1.value == k2.value; | ||
1052 | } | ||
1053 | public static bool operator !=(key k1, key k2) | ||
1054 | { | ||
1055 | return k1.value != k2.value; | ||
1056 | } | ||
1057 | |||
1058 | #endregion | ||
1059 | |||
1060 | #region Overriders | ||
1061 | |||
1062 | public override bool Equals(object o) | ||
1063 | { | ||
1064 | return o.ToString() == value; | ||
1065 | } | ||
1066 | |||
1067 | public override int GetHashCode() | ||
1068 | { | ||
1069 | return value.GetHashCode(); | ||
1070 | } | ||
1071 | |||
1072 | #endregion | ||
1073 | } | ||
1074 | |||
1075 | [Serializable] | ||
1076 | public struct LSLString | ||
1077 | { | ||
1078 | public string m_string; | ||
1079 | #region Constructors | ||
1080 | public LSLString(string s) | ||
1081 | { | ||
1082 | m_string = s; | ||
1083 | } | ||
1084 | |||
1085 | public LSLString(int i) | ||
1086 | { | ||
1087 | m_string=i.ToString(); | ||
1088 | } | ||
1089 | |||
1090 | public LSLString(double d) | ||
1091 | { | ||
1092 | string s=String.Format("{0:0.000000}", d); | ||
1093 | m_string=s; | ||
1094 | } | ||
1095 | |||
1096 | #endregion | ||
1097 | |||
1098 | #region Operators | ||
1099 | static public implicit operator Boolean(LSLString s) | ||
1100 | { | ||
1101 | if (s.m_string.Length == 0) | ||
1102 | { | ||
1103 | return false; | ||
1104 | } | ||
1105 | else | ||
1106 | { | ||
1107 | return true; | ||
1108 | } | ||
1109 | } | ||
1110 | |||
1111 | |||
1112 | |||
1113 | static public implicit operator String(LSLString s) | ||
1114 | { | ||
1115 | return s.m_string; | ||
1116 | } | ||
1117 | |||
1118 | static public implicit operator LSLString(string s) | ||
1119 | { | ||
1120 | return new LSLString(s); | ||
1121 | } | ||
1122 | |||
1123 | public static string ToString(LSLString s) | ||
1124 | { | ||
1125 | return s.m_string; | ||
1126 | } | ||
1127 | |||
1128 | public override string ToString() | ||
1129 | { | ||
1130 | return m_string; | ||
1131 | } | ||
1132 | |||
1133 | public static bool operator ==(LSLString s1, string s2) | ||
1134 | { | ||
1135 | return s1.m_string == s2; | ||
1136 | } | ||
1137 | |||
1138 | public static bool operator !=(LSLString s1, string s2) | ||
1139 | { | ||
1140 | return s1.m_string != s2; | ||
1141 | } | ||
1142 | |||
1143 | public static explicit operator double(LSLString s) | ||
1144 | { | ||
1145 | return Convert.ToDouble(s.m_string); | ||
1146 | } | ||
1147 | |||
1148 | public static explicit operator LSLInteger(LSLString s) | ||
1149 | { | ||
1150 | return new LSLInteger(Convert.ToInt32(s.m_string)); | ||
1151 | } | ||
1152 | |||
1153 | public static explicit operator LSLString(int i) | ||
1154 | { | ||
1155 | return new LSLString(i); | ||
1156 | } | ||
1157 | |||
1158 | public static explicit operator LSLString(double d) | ||
1159 | { | ||
1160 | return new LSLString(d); | ||
1161 | } | ||
1162 | |||
1163 | public static implicit operator Vector3(LSLString s) | ||
1164 | { | ||
1165 | return new Vector3(s.m_string); | ||
1166 | } | ||
1167 | |||
1168 | #endregion | ||
1169 | |||
1170 | #region Overriders | ||
1171 | public override bool Equals(object o) | ||
1172 | { | ||
1173 | return m_string == o.ToString(); | ||
1174 | } | ||
1175 | |||
1176 | public override int GetHashCode() | ||
1177 | { | ||
1178 | return m_string.GetHashCode(); | ||
1179 | } | ||
1180 | |||
1181 | #endregion | ||
1182 | |||
1183 | #region " Standard string functions " | ||
1184 | //Clone,CompareTo,Contains | ||
1185 | //CopyTo,EndsWith,Equals,GetEnumerator,GetHashCode,GetType,GetTypeCode | ||
1186 | //IndexOf,IndexOfAny,Insert,IsNormalized,LastIndexOf,LastIndexOfAny | ||
1187 | //Length,Normalize,PadLeft,PadRight,Remove,Replace,Split,StartsWith,Substring,ToCharArray,ToLowerInvariant | ||
1188 | //ToString,ToUpper,ToUpperInvariant,Trim,TrimEnd,TrimStart | ||
1189 | public bool Contains(string value) { return m_string.Contains(value); } | ||
1190 | public int IndexOf(string value) { return m_string.IndexOf(value); } | ||
1191 | public int Length { get { return m_string.Length; } } | ||
1192 | |||
1193 | |||
1194 | #endregion | ||
1195 | } | ||
1196 | |||
1197 | [Serializable] | ||
1198 | public struct LSLInteger | ||
1199 | { | ||
1200 | public int value; | ||
1201 | |||
1202 | #region Constructors | ||
1203 | public LSLInteger(int i) | ||
1204 | { | ||
1205 | value = i; | ||
1206 | } | ||
1207 | |||
1208 | public LSLInteger(double d) | ||
1209 | { | ||
1210 | value = (int)d; | ||
1211 | } | ||
1212 | |||
1213 | public LSLInteger(Object o) | ||
1214 | { | ||
1215 | if(!(o is Int32)) | ||
1216 | value=0; | ||
1217 | else | ||
1218 | value = (int)o; | ||
1219 | } | ||
1220 | |||
1221 | public LSLInteger(string s) | ||
1222 | { | ||
1223 | value = int.Parse(s); | ||
1224 | } | ||
1225 | |||
1226 | #endregion | ||
1227 | |||
1228 | static public implicit operator int(LSLInteger i) | ||
1229 | { | ||
1230 | return i.value; | ||
1231 | } | ||
1232 | |||
1233 | static public implicit operator uint(LSLInteger i) | ||
1234 | { | ||
1235 | return (uint)i.value; | ||
1236 | } | ||
1237 | |||
1238 | static public explicit operator LSLString(LSLInteger i) | ||
1239 | { | ||
1240 | return new LSLString(i.ToString()); | ||
1241 | } | ||
1242 | |||
1243 | static public explicit operator string(LSLInteger i) | ||
1244 | { | ||
1245 | return i.ToString(); | ||
1246 | } | ||
1247 | |||
1248 | static public implicit operator Boolean(LSLInteger i) | ||
1249 | { | ||
1250 | if (i.value == 0) | ||
1251 | { | ||
1252 | return false; | ||
1253 | } | ||
1254 | else | ||
1255 | { | ||
1256 | return true; | ||
1257 | } | ||
1258 | } | ||
1259 | |||
1260 | static public implicit operator LSLInteger(int i) | ||
1261 | { | ||
1262 | return new LSLInteger(i); | ||
1263 | } | ||
1264 | |||
1265 | static public explicit operator LSLInteger(string s) | ||
1266 | { | ||
1267 | return new LSLInteger(int.Parse(s)); | ||
1268 | } | ||
1269 | |||
1270 | static public implicit operator LSLInteger(double d) | ||
1271 | { | ||
1272 | return new LSLInteger(d); | ||
1273 | } | ||
1274 | |||
1275 | static public bool operator ==(LSLInteger i1, LSLInteger i2) | ||
1276 | { | ||
1277 | bool ret = i1.value == i2.value; | ||
1278 | return ret; | ||
1279 | } | ||
1280 | |||
1281 | static public bool operator !=(LSLInteger i1, LSLInteger i2) | ||
1282 | { | ||
1283 | bool ret = i1.value != i2.value; | ||
1284 | return ret; | ||
1285 | } | ||
1286 | |||
1287 | static public LSLInteger operator &(LSLInteger i1, LSLInteger i2) | ||
1288 | { | ||
1289 | int ret = i1.value & i2.value; | ||
1290 | return ret; | ||
1291 | } | ||
1292 | |||
1293 | public static LSLInteger operator ++(LSLInteger i) | ||
1294 | { | ||
1295 | i.value++; | ||
1296 | return i; | ||
1297 | } | ||
1298 | |||
1299 | |||
1300 | public static LSLInteger operator --(LSLInteger i) | ||
1301 | { | ||
1302 | i.value--; | ||
1303 | return i; | ||
1304 | } | ||
1305 | |||
1306 | static public implicit operator System.Double(LSLInteger i) | ||
1307 | { | ||
1308 | return (double)i.value; | ||
1309 | } | ||
1310 | |||
1311 | public static bool operator true(LSLInteger i) | ||
1312 | { | ||
1313 | return i.value != 0; | ||
1314 | } | ||
1315 | |||
1316 | public static bool operator false(LSLInteger i) | ||
1317 | { | ||
1318 | return i.value == 0; | ||
1319 | } | ||
1320 | |||
1321 | #region Overriders | ||
1322 | |||
1323 | public override string ToString() | ||
1324 | { | ||
1325 | return this.value.ToString(); | ||
1326 | } | ||
1327 | |||
1328 | public override bool Equals(object o) | ||
1329 | { | ||
1330 | if(o is Int32) | ||
1331 | { | ||
1332 | return value == (Int32)o; | ||
1333 | } | ||
1334 | if(o is LSLInteger) | ||
1335 | { | ||
1336 | return value == ((LSLInteger)o).value; | ||
1337 | } | ||
1338 | return false; | ||
1339 | } | ||
1340 | |||
1341 | public override int GetHashCode() | ||
1342 | { | ||
1343 | return value.GetHashCode(); | ||
1344 | } | ||
1345 | |||
1346 | #endregion | ||
1347 | } | ||
1348 | |||
1349 | [Serializable] | ||
1350 | public struct LSLFloat | ||
1351 | { | ||
1352 | public double value; | ||
1353 | |||
1354 | #region Constructors | ||
1355 | public LSLFloat(int i) | ||
1356 | { | ||
1357 | this.value = (double)i; | ||
1358 | } | ||
1359 | |||
1360 | public LSLFloat(double d) | ||
1361 | { | ||
1362 | this.value = d; | ||
1363 | } | ||
1364 | |||
1365 | #endregion | ||
1366 | |||
1367 | #region Operators | ||
1368 | |||
1369 | static public implicit operator Double(LSLFloat f) | ||
1370 | { | ||
1371 | return f.value; | ||
1372 | } | ||
1373 | |||
1374 | //static public implicit operator System.Int32(LSLFloat f) | ||
1375 | //{ | ||
1376 | // return (int)f.value; | ||
1377 | //} | ||
1378 | |||
1379 | |||
1380 | static public implicit operator Boolean(LSLFloat f) | ||
1381 | { | ||
1382 | if (f.value == 0) | ||
1383 | { | ||
1384 | return false; | ||
1385 | } | ||
1386 | else | ||
1387 | { | ||
1388 | return true; | ||
1389 | } | ||
1390 | } | ||
1391 | |||
1392 | static public implicit operator LSLFloat(int i) | ||
1393 | { | ||
1394 | return new LSLFloat(i); | ||
1395 | } | ||
1396 | |||
1397 | static public implicit operator LSLFloat(double d) | ||
1398 | { | ||
1399 | return new LSLFloat(d); | ||
1400 | } | ||
1401 | #endregion | ||
1402 | |||
1403 | #region Overriders | ||
1404 | public override string ToString() | ||
1405 | { | ||
1406 | return this.value.ToString(); | ||
1407 | } | ||
1408 | #endregion | ||
1409 | } | ||
1410 | } | ||
1411 | } | ||