clockwerk-opensim-stable – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 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 OpenSimulator 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.Framework;
35 using OpenSim.Region.Framework.Interfaces;
36 using OpenSim.Region.ScriptEngine.Interfaces;
37 using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
38 using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
39 using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
40 using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
41 using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
42 using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
43 using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
44 using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
45 using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
46 using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
47  
48 namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
49 {
50 public partial class ScriptBaseClass : MarshalByRefObject
51 {
52 public IOSSL_Api m_OSSL_Functions;
53  
54 public void ApiTypeOSSL(IScriptApi api)
55 {
56 if (!(api is IOSSL_Api))
57 return;
58  
59 m_OSSL_Functions = (IOSSL_Api)api;
60  
61 Prim = new OSSLPrim(this);
62 }
63  
64 public void osSetRegionWaterHeight(double height)
65 {
66 m_OSSL_Functions.osSetRegionWaterHeight(height);
67 }
68  
69 public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
70 {
71 m_OSSL_Functions.osSetRegionSunSettings(useEstateSun, sunFixed, sunHour);
72 }
73  
74 public void osSetEstateSunSettings(bool sunFixed, double sunHour)
75 {
76 m_OSSL_Functions.osSetEstateSunSettings(sunFixed, sunHour);
77 }
78  
79 public double osGetCurrentSunHour()
80 {
81 return m_OSSL_Functions.osGetCurrentSunHour();
82 }
83  
84 public double osGetSunParam(string param)
85 {
86 return m_OSSL_Functions.osGetSunParam(param);
87 }
88 // Deprecated
89 public double osSunGetParam(string param)
90 {
91 return m_OSSL_Functions.osSunGetParam(param);
92 }
93  
94 public void osSetSunParam(string param, double value)
95 {
96 m_OSSL_Functions.osSetSunParam(param, value);
97 }
98 // Deprecated
99 public void osSunSetParam(string param, double value)
100 {
101 m_OSSL_Functions.osSunSetParam(param, value);
102 }
103  
104 public string osWindActiveModelPluginName()
105 {
106 return m_OSSL_Functions.osWindActiveModelPluginName();
107 }
108  
109 public void osSetWindParam(string plugin, string param, LSL_Float value)
110 {
111 m_OSSL_Functions.osSetWindParam(plugin, param, value);
112 }
113  
114 public LSL_Float osGetWindParam(string plugin, string param)
115 {
116 return m_OSSL_Functions.osGetWindParam(plugin, param);
117 }
118  
119 public void osParcelJoin(vector pos1, vector pos2)
120 {
121 m_OSSL_Functions.osParcelJoin(pos1,pos2);
122 }
123  
124 public void osParcelSubdivide(vector pos1, vector pos2)
125 {
126 m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
127 }
128  
129 public void osSetParcelDetails(vector pos, LSL_List rules)
130 {
131 m_OSSL_Functions.osSetParcelDetails(pos, rules);
132 }
133 // Deprecated
134 public void osParcelSetDetails(vector pos, LSL_List rules)
135 {
136 m_OSSL_Functions.osParcelSetDetails(pos,rules);
137 }
138  
139 public double osList2Double(LSL_Types.list src, int index)
140 {
141 return m_OSSL_Functions.osList2Double(src, index);
142 }
143  
144 public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
145 int timer)
146 {
147 return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer);
148 }
149  
150 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
151 int timer)
152 {
153 return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
154 }
155  
156 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
157 int timer, int alpha)
158 {
159 return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha);
160 }
161  
162 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
163 int timer, int alpha)
164 {
165 return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha);
166 }
167  
168 public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
169 bool blend, int disp, int timer, int alpha, int face)
170 {
171 return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams,
172 blend, disp, timer, alpha, face);
173 }
174  
175 public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
176 bool blend, int disp, int timer, int alpha, int face)
177 {
178 return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams,
179 blend, disp, timer, alpha, face);
180 }
181  
182 public LSL_Float osGetTerrainHeight(int x, int y)
183 {
184 return m_OSSL_Functions.osGetTerrainHeight(x, y);
185 }
186 // Deprecated
187 public LSL_Float osTerrainGetHeight(int x, int y)
188 {
189 return m_OSSL_Functions.osTerrainGetHeight(x, y);
190 }
191  
192 public LSL_Integer osSetTerrainHeight(int x, int y, double val)
193 {
194 return m_OSSL_Functions.osSetTerrainHeight(x, y, val);
195 }
196 // Deprecated
197 public LSL_Integer osTerrainSetHeight(int x, int y, double val)
198 {
199 return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
200 }
201  
202 public void osTerrainFlush()
203 {
204 m_OSSL_Functions.osTerrainFlush();
205 }
206  
207 public int osRegionRestart(double seconds)
208 {
209 return m_OSSL_Functions.osRegionRestart(seconds);
210 }
211  
212 public void osRegionNotice(string msg)
213 {
214 m_OSSL_Functions.osRegionNotice(msg);
215 }
216  
217 public bool osConsoleCommand(string Command)
218 {
219 return m_OSSL_Functions.osConsoleCommand(Command);
220 }
221  
222 public void osSetParcelMediaURL(string url)
223 {
224 m_OSSL_Functions.osSetParcelMediaURL(url);
225 }
226  
227 public void osSetParcelSIPAddress(string SIPAddress)
228 {
229 m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
230 }
231  
232 public void osSetPrimFloatOnWater(int floatYN)
233 {
234 m_OSSL_Functions.osSetPrimFloatOnWater(floatYN);
235 }
236  
237 // Teleport Functions
238  
239 public void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
240 {
241 m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat);
242 }
243  
244 public void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat)
245 {
246 m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat);
247 }
248  
249 public void osTeleportAgent(string agent, vector position, vector lookat)
250 {
251 m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
252 }
253  
254 public void osTeleportOwner(string regionName, vector position, vector lookat)
255 {
256 m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
257 }
258  
259 public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
260 {
261 m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
262 }
263  
264 public void osTeleportOwner(vector position, vector lookat)
265 {
266 m_OSSL_Functions.osTeleportOwner(position, lookat);
267 }
268  
269 // Avatar info functions
270 public string osGetAgentIP(string agent)
271 {
272 return m_OSSL_Functions.osGetAgentIP(agent);
273 }
274  
275 public LSL_List osGetAgents()
276 {
277 return m_OSSL_Functions.osGetAgents();
278 }
279  
280 // Animation Functions
281  
282 public void osAvatarPlayAnimation(string avatar, string animation)
283 {
284 m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation);
285 }
286  
287 public void osAvatarStopAnimation(string avatar, string animation)
288 {
289 m_OSSL_Functions.osAvatarStopAnimation(avatar, animation);
290 }
291  
292 #region Attachment commands
293  
294 public void osForceAttachToAvatar(int attachmentPoint)
295 {
296 m_OSSL_Functions.osForceAttachToAvatar(attachmentPoint);
297 }
298  
299 public void osForceAttachToAvatarFromInventory(string itemName, int attachmentPoint)
300 {
301 m_OSSL_Functions.osForceAttachToAvatarFromInventory(itemName, attachmentPoint);
302 }
303  
304 public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint)
305 {
306 m_OSSL_Functions.osForceAttachToOtherAvatarFromInventory(rawAvatarId, itemName, attachmentPoint);
307 }
308  
309 public void osForceDetachFromAvatar()
310 {
311 m_OSSL_Functions.osForceDetachFromAvatar();
312 }
313  
314 public LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints)
315 {
316 return m_OSSL_Functions.osGetNumberOfAttachments(avatar, attachmentPoints);
317 }
318  
319 public void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags)
320 {
321 m_OSSL_Functions.osMessageAttachments(avatar, message, attachmentPoints, flags);
322 }
323  
324 #endregion
325  
326 // Texture Draw functions
327  
328 public string osMovePen(string drawList, int x, int y)
329 {
330 return m_OSSL_Functions.osMovePen(drawList, x, y);
331 }
332  
333 public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
334 {
335 return m_OSSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
336 }
337  
338 public string osDrawLine(string drawList, int endX, int endY)
339 {
340 return m_OSSL_Functions.osDrawLine(drawList, endX, endY);
341 }
342  
343 public string osDrawText(string drawList, string text)
344 {
345 return m_OSSL_Functions.osDrawText(drawList, text);
346 }
347  
348 public string osDrawEllipse(string drawList, int width, int height)
349 {
350 return m_OSSL_Functions.osDrawEllipse(drawList, width, height);
351 }
352  
353 public string osDrawRectangle(string drawList, int width, int height)
354 {
355 return m_OSSL_Functions.osDrawRectangle(drawList, width, height);
356 }
357  
358 public string osDrawFilledRectangle(string drawList, int width, int height)
359 {
360 return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height);
361 }
362  
363 public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
364 {
365 return m_OSSL_Functions.osDrawPolygon(drawList, x, y);
366 }
367  
368 public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
369 {
370 return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
371 }
372  
373 public string osSetFontSize(string drawList, int fontSize)
374 {
375 return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
376 }
377  
378 public string osSetFontName(string drawList, string fontName)
379 {
380 return m_OSSL_Functions.osSetFontName(drawList, fontName);
381 }
382  
383 public string osSetPenSize(string drawList, int penSize)
384 {
385 return m_OSSL_Functions.osSetPenSize(drawList, penSize);
386 }
387  
388 public string osSetPenCap(string drawList, string direction, string type)
389 {
390 return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
391 }
392  
393 public string osSetPenColor(string drawList, string color)
394 {
395 return m_OSSL_Functions.osSetPenColor(drawList, color);
396 }
397 // Deprecated
398 public string osSetPenColour(string drawList, string colour)
399 {
400 return m_OSSL_Functions.osSetPenColour(drawList, colour);
401 }
402  
403 public string osDrawImage(string drawList, int width, int height, string imageUrl)
404 {
405 return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl);
406 }
407  
408 public vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
409 {
410 return m_OSSL_Functions.osGetDrawStringSize(contentType, text, fontName, fontSize);
411 }
412  
413 public void osSetStateEvents(int events)
414 {
415 m_OSSL_Functions.osSetStateEvents(events);
416 }
417  
418 public string osGetScriptEngineName()
419 {
420 return m_OSSL_Functions.osGetScriptEngineName();
421 }
422  
423 public string osGetPhysicsEngineType()
424 {
425 return m_OSSL_Functions.osGetPhysicsEngineType();
426 }
427  
428 public string osGetSimulatorVersion()
429 {
430 return m_OSSL_Functions.osGetSimulatorVersion();
431 }
432  
433 public Hashtable osParseJSON(string JSON)
434 {
435 return m_OSSL_Functions.osParseJSON(JSON);
436 }
437  
438 public Object osParseJSONNew(string JSON)
439 {
440 return m_OSSL_Functions.osParseJSONNew(JSON);
441 }
442  
443 public void osMessageObject(key objectUUID,string message)
444 {
445 m_OSSL_Functions.osMessageObject(objectUUID,message);
446 }
447  
448 public void osMakeNotecard(string notecardName, LSL_Types.list contents)
449 {
450 m_OSSL_Functions.osMakeNotecard(notecardName, contents);
451 }
452  
453 public string osGetNotecardLine(string name, int line)
454 {
455 return m_OSSL_Functions.osGetNotecardLine(name, line);
456 }
457  
458 public string osGetNotecard(string name)
459 {
460 return m_OSSL_Functions.osGetNotecard(name);
461 }
462  
463 public int osGetNumberOfNotecardLines(string name)
464 {
465 return m_OSSL_Functions.osGetNumberOfNotecardLines(name);
466 }
467  
468 public string osAvatarName2Key(string firstname, string lastname)
469 {
470 return m_OSSL_Functions.osAvatarName2Key(firstname, lastname);
471 }
472  
473 public string osKey2Name(string id)
474 {
475 return m_OSSL_Functions.osKey2Name(id);
476 }
477  
478 public string osGetGridNick()
479 {
480 return m_OSSL_Functions.osGetGridNick();
481 }
482  
483 public string osGetGridName()
484 {
485 return m_OSSL_Functions.osGetGridName();
486 }
487  
488 public string osGetGridLoginURI()
489 {
490 return m_OSSL_Functions.osGetGridLoginURI();
491 }
492  
493 public string osGetGridHomeURI()
494 {
495 return m_OSSL_Functions.osGetGridHomeURI();
496 }
497  
498 public string osGetGridGatekeeperURI()
499 {
500 return m_OSSL_Functions.osGetGridGatekeeperURI();
501 }
502  
503 public string osGetGridCustom(string key)
504 {
505 return m_OSSL_Functions.osGetGridCustom(key);
506 }
507  
508 public LSL_String osFormatString(string str, LSL_List strings)
509 {
510 return m_OSSL_Functions.osFormatString(str, strings);
511 }
512  
513 public LSL_List osMatchString(string src, string pattern, int start)
514 {
515 return m_OSSL_Functions.osMatchString(src, pattern, start);
516 }
517  
518 public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
519 {
520 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
521 }
522  
523  
524 // Information about data loaded into the region
525 public string osLoadedCreationDate()
526 {
527 return m_OSSL_Functions.osLoadedCreationDate();
528 }
529  
530 public string osLoadedCreationTime()
531 {
532 return m_OSSL_Functions.osLoadedCreationTime();
533 }
534  
535 public string osLoadedCreationID()
536 {
537 return m_OSSL_Functions.osLoadedCreationID();
538 }
539  
540 public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
541 {
542 return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules);
543 }
544  
545 public LSL_Integer osIsNpc(LSL_Key npc)
546 {
547 return m_OSSL_Functions.osIsNpc(npc);
548 }
549  
550 public key osNpcCreate(string user, string name, vector position, key cloneFrom)
551 {
552 return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom);
553 }
554  
555 public key osNpcCreate(string user, string name, vector position, key cloneFrom, int options)
556 {
557 return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom, options);
558 }
559  
560 public key osNpcSaveAppearance(key npc, string notecard)
561 {
562 return m_OSSL_Functions.osNpcSaveAppearance(npc, notecard);
563 }
564  
565 public void osNpcLoadAppearance(key npc, string notecard)
566 {
567 m_OSSL_Functions.osNpcLoadAppearance(npc, notecard);
568 }
569  
570 public LSL_Key osNpcGetOwner(LSL_Key npc)
571 {
572 return m_OSSL_Functions.osNpcGetOwner(npc);
573 }
574  
575 public vector osNpcGetPos(LSL_Key npc)
576 {
577 return m_OSSL_Functions.osNpcGetPos(npc);
578 }
579  
580 public void osNpcMoveTo(key npc, vector position)
581 {
582 m_OSSL_Functions.osNpcMoveTo(npc, position);
583 }
584  
585 public void osNpcMoveToTarget(key npc, vector target, int options)
586 {
587 m_OSSL_Functions.osNpcMoveToTarget(npc, target, options);
588 }
589  
590 public rotation osNpcGetRot(key npc)
591 {
592 return m_OSSL_Functions.osNpcGetRot(npc);
593 }
594  
595 public void osNpcSetRot(key npc, rotation rot)
596 {
597 m_OSSL_Functions.osNpcSetRot(npc, rot);
598 }
599  
600 public void osNpcStopMoveToTarget(LSL_Key npc)
601 {
602 m_OSSL_Functions.osNpcStopMoveToTarget(npc);
603 }
604  
605 public void osNpcSay(key npc, string message)
606 {
607 m_OSSL_Functions.osNpcSay(npc, message);
608 }
609  
610 public void osNpcSay(key npc, int channel, string message)
611 {
612 m_OSSL_Functions.osNpcSay(npc, channel, message);
613 }
614  
615  
616 public void osNpcShout(key npc, int channel, string message)
617 {
618 m_OSSL_Functions.osNpcShout(npc, channel, message);
619 }
620  
621 public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
622 {
623 m_OSSL_Functions.osNpcSit(npc, target, options);
624 }
625  
626 public void osNpcStand(LSL_Key npc)
627 {
628 m_OSSL_Functions.osNpcStand(npc);
629 }
630  
631 public void osNpcRemove(key npc)
632 {
633 m_OSSL_Functions.osNpcRemove(npc);
634 }
635  
636 public void osNpcPlayAnimation(LSL_Key npc, string animation)
637 {
638 m_OSSL_Functions.osNpcPlayAnimation(npc, animation);
639 }
640  
641 public void osNpcStopAnimation(LSL_Key npc, string animation)
642 {
643 m_OSSL_Functions.osNpcStopAnimation(npc, animation);
644 }
645  
646 public void osNpcWhisper(key npc, int channel, string message)
647 {
648 m_OSSL_Functions.osNpcWhisper(npc, channel, message);
649 }
650  
651 public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
652 {
653 m_OSSL_Functions.osNpcTouch(npcLSL_Key, object_key, link_num);
654 }
655  
656 public LSL_Key osOwnerSaveAppearance(string notecard)
657 {
658 return m_OSSL_Functions.osOwnerSaveAppearance(notecard);
659 }
660  
661 public LSL_Key osAgentSaveAppearance(LSL_Key agentId, string notecard)
662 {
663 return m_OSSL_Functions.osAgentSaveAppearance(agentId, notecard);
664 }
665  
666 public OSSLPrim Prim;
667  
668 [Serializable]
669 public class OSSLPrim
670 {
671 internal ScriptBaseClass OSSL;
672 public OSSLPrim(ScriptBaseClass bc)
673 {
674 OSSL = bc;
675 Position = new OSSLPrim_Position(this);
676 Rotation = new OSSLPrim_Rotation(this);
677 }
678  
679 public OSSLPrim_Position Position;
680 public OSSLPrim_Rotation Rotation;
681 private TextStruct _text;
682 public TextStruct Text
683 {
684 get { return _text; }
685 set
686 {
687 _text = value;
688 OSSL.llSetText(_text.Text, _text.color, _text.alpha);
689 }
690 }
691  
692 [Serializable]
693 public struct TextStruct
694 {
695 public string Text;
696 public LSL_Types.Vector3 color;
697 public double alpha;
698 }
699 }
700  
701 [Serializable]
702 public class OSSLPrim_Position
703 {
704 private OSSLPrim prim;
705 private LSL_Types.Vector3 Position;
706 public OSSLPrim_Position(OSSLPrim _prim)
707 {
708 prim = _prim;
709 }
710 private void Load()
711 {
712 Position = prim.OSSL.llGetPos();
713 }
714 private void Save()
715 {
716 if (Position.x > ((int)Constants.RegionSize - 1))
717 Position.x = ((int)Constants.RegionSize - 1);
718 if (Position.x < 0)
719 Position.x = 0;
720 if (Position.y > ((int)Constants.RegionSize - 1))
721 Position.y = ((int)Constants.RegionSize - 1);
722 if (Position.y < 0)
723 Position.y = 0;
724 if (Position.z > 768)
725 Position.z = 768;
726 if (Position.z < 0)
727 Position.z = 0;
728 prim.OSSL.llSetPos(Position);
729 }
730  
731 public double x
732 {
733 get
734 {
735 Load();
736 return Position.x;
737 }
738 set
739 {
740 Load();
741 Position.x = value;
742 Save();
743 }
744 }
745 public double y
746 {
747 get
748 {
749 Load();
750 return Position.y;
751 }
752 set
753 {
754 Load();
755 Position.y = value;
756 Save();
757 }
758 }
759 public double z
760 {
761 get
762 {
763 Load();
764 return Position.z;
765 }
766 set
767 {
768 Load();
769 Position.z = value;
770 Save();
771 }
772 }
773 }
774  
775 [Serializable]
776 public class OSSLPrim_Rotation
777 {
778 private OSSLPrim prim;
779 private LSL_Types.Quaternion Rotation;
780 public OSSLPrim_Rotation(OSSLPrim _prim)
781 {
782 prim = _prim;
783 }
784 private void Load()
785 {
786 Rotation = prim.OSSL.llGetRot();
787 }
788 private void Save()
789 {
790 prim.OSSL.llSetRot(Rotation);
791 }
792  
793 public double x
794 {
795 get
796 {
797 Load();
798 return Rotation.x;
799 }
800 set
801 {
802 Load();
803 Rotation.x = value;
804 Save();
805 }
806 }
807 public double y
808 {
809 get
810 {
811 Load();
812 return Rotation.y;
813 }
814 set
815 {
816 Load();
817 Rotation.y = value;
818 Save();
819 }
820 }
821 public double z
822 {
823 get
824 {
825 Load();
826 return Rotation.z;
827 }
828 set
829 {
830 Load();
831 Rotation.z = value;
832 Save();
833 }
834 }
835 public double s
836 {
837 get
838 {
839 Load();
840 return Rotation.s;
841 }
842 set
843 {
844 Load();
845 Rotation.s = value;
846 Save();
847 }
848 }
849 }
850  
851 public key osGetMapTexture()
852 {
853 return m_OSSL_Functions.osGetMapTexture();
854 }
855  
856 public key osGetRegionMapTexture(string regionName)
857 {
858 return m_OSSL_Functions.osGetRegionMapTexture(regionName);
859 }
860  
861 public LSL_List osGetRegionStats()
862 {
863 return m_OSSL_Functions.osGetRegionStats();
864 }
865  
866 /// <summary>
867 /// Returns the amount of memory in use by the Simulator Daemon.
868 /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware)
869 /// </summary>
870 /// <returns></returns>
871 public LSL_Integer osGetSimulatorMemory()
872 {
873 return m_OSSL_Functions.osGetSimulatorMemory();
874 }
875  
876 public void osKickAvatar(string FirstName,string SurName,string alert)
877 {
878 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
879 }
880  
881 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
882 {
883 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
884 }
885  
886 public LSL_Float osGetHealth(string avatar)
887 {
888 return m_OSSL_Functions.osGetHealth(avatar);
889 }
890  
891 public void osCauseDamage(string avatar, double damage)
892 {
893 m_OSSL_Functions.osCauseDamage(avatar, damage);
894 }
895  
896 public void osCauseHealing(string avatar, double healing)
897 {
898 m_OSSL_Functions.osCauseHealing(avatar, healing);
899 }
900  
901 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
902 {
903 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
904 }
905  
906 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
907 {
908 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
909 }
910  
911 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
912 {
913 m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
914 }
915  
916 public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
917 {
918 m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
919 }
920  
921 public LSL_List osGetAvatarList()
922 {
923 return m_OSSL_Functions.osGetAvatarList();
924 }
925  
926 public LSL_String osUnixTimeToTimestamp(long time)
927 {
928 return m_OSSL_Functions.osUnixTimeToTimestamp(time);
929 }
930  
931 public LSL_String osGetInventoryDesc(string item)
932 {
933 return m_OSSL_Functions.osGetInventoryDesc(item);
934 }
935  
936 public LSL_Integer osInviteToGroup(LSL_Key agentId)
937 {
938 return m_OSSL_Functions.osInviteToGroup(agentId);
939 }
940  
941 public LSL_Integer osEjectFromGroup(LSL_Key agentId)
942 {
943 return m_OSSL_Functions.osEjectFromGroup(agentId);
944 }
945  
946 public void osSetTerrainTexture(int level, LSL_Key texture)
947 {
948 m_OSSL_Functions.osSetTerrainTexture(level, texture);
949 }
950  
951 public void osSetTerrainTextureHeight(int corner, double low, double high)
952 {
953 m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
954 }
955  
956 public LSL_Integer osIsUUID(string thing)
957 {
958 return m_OSSL_Functions.osIsUUID(thing);
959 }
960  
961 public LSL_Float osMin(double a, double b)
962 {
963 return m_OSSL_Functions.osMin(a, b);
964 }
965  
966 public LSL_Float osMax(double a, double b)
967 {
968 return m_OSSL_Functions.osMax(a, b);
969 }
970  
971 public LSL_Key osGetRezzingObject()
972 {
973 return m_OSSL_Functions.osGetRezzingObject();
974 }
975  
976 public void osSetContentType(LSL_Key id, string type)
977 {
978 m_OSSL_Functions.osSetContentType(id,type);
979 }
980  
981 public void osDropAttachment()
982 {
983 m_OSSL_Functions.osDropAttachment();
984 }
985  
986 public void osForceDropAttachment()
987 {
988 m_OSSL_Functions.osForceDropAttachment();
989 }
990  
991 public void osDropAttachmentAt(vector pos, rotation rot)
992 {
993 m_OSSL_Functions.osDropAttachmentAt(pos, rot);
994 }
995  
996 public void osForceDropAttachmentAt(vector pos, rotation rot)
997 {
998 m_OSSL_Functions.osForceDropAttachmentAt(pos, rot);
999 }
1000  
1001 public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
1002 {
1003 return m_OSSL_Functions.osListenRegex(channelID, name, ID, msg, regexBitfield);
1004 }
1005  
1006 public LSL_Integer osRegexIsMatch(string input, string pattern)
1007 {
1008 return m_OSSL_Functions.osRegexIsMatch(input, pattern);
1009 }
1010 }
1011 }