OSSL_Stub.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  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. using System;
  28. using System.Runtime.Remoting.Lifetime;
  29. using System.Threading;
  30. using System.Reflection;
  31. using System.Collections;
  32. using System.Collections.Generic;
  33. using OpenSim.Framework;
  34. using OpenSim.Region.Framework.Interfaces;
  35. using OpenSim.Region.ScriptEngine.Interfaces;
  36. using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
  37. using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
  38. using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
  39. using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
  40. using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  41. using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
  42. using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  43. using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
  44. using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
  45. using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
  46. namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
  47. {
  48. public partial class ScriptBaseClass : MarshalByRefObject
  49. {
  50. public IOSSL_Api m_OSSL_Functions;
  51. public void ApiTypeOSSL(IScriptApi api)
  52. {
  53. if (!(api is IOSSL_Api))
  54. return;
  55. m_OSSL_Functions = (IOSSL_Api)api;
  56. Prim = new OSSLPrim(this);
  57. }
  58. public void osSetRegionWaterHeight(double height)
  59. {
  60. m_OSSL_Functions.osSetRegionWaterHeight(height);
  61. }
  62. public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
  63. {
  64. m_OSSL_Functions.osSetRegionSunSettings(useEstateSun, sunFixed, sunHour);
  65. }
  66. public void osSetEstateSunSettings(bool sunFixed, double sunHour)
  67. {
  68. m_OSSL_Functions.osSetEstateSunSettings(sunFixed, sunHour);
  69. }
  70. public double osGetCurrentSunHour()
  71. {
  72. return m_OSSL_Functions.osGetCurrentSunHour();
  73. }
  74. public double osGetSunParam(string param)
  75. {
  76. return m_OSSL_Functions.osGetSunParam(param);
  77. }
  78. // Deprecated
  79. public double osSunGetParam(string param)
  80. {
  81. return m_OSSL_Functions.osSunGetParam(param);
  82. }
  83. public void osSetSunParam(string param, double value)
  84. {
  85. m_OSSL_Functions.osSetSunParam(param, value);
  86. }
  87. // Deprecated
  88. public void osSunSetParam(string param, double value)
  89. {
  90. m_OSSL_Functions.osSunSetParam(param, value);
  91. }
  92. public string osWindActiveModelPluginName()
  93. {
  94. return m_OSSL_Functions.osWindActiveModelPluginName();
  95. }
  96. public void osSetWindParam(string plugin, string param, LSL_Float value)
  97. {
  98. m_OSSL_Functions.osSetWindParam(plugin, param, value);
  99. }
  100. public LSL_Float osGetWindParam(string plugin, string param)
  101. {
  102. return m_OSSL_Functions.osGetWindParam(plugin, param);
  103. }
  104. public void osParcelJoin(vector pos1, vector pos2)
  105. {
  106. m_OSSL_Functions.osParcelJoin(pos1,pos2);
  107. }
  108. public void osParcelSubdivide(vector pos1, vector pos2)
  109. {
  110. m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
  111. }
  112. public void osSetParcelDetails(vector pos, LSL_List rules)
  113. {
  114. m_OSSL_Functions.osSetParcelDetails(pos, rules);
  115. }
  116. // Deprecated
  117. public void osParcelSetDetails(vector pos, LSL_List rules)
  118. {
  119. m_OSSL_Functions.osParcelSetDetails(pos,rules);
  120. }
  121. public double osList2Double(LSL_Types.list src, int index)
  122. {
  123. return m_OSSL_Functions.osList2Double(src, index);
  124. }
  125. public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
  126. int timer)
  127. {
  128. return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer);
  129. }
  130. public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
  131. int timer)
  132. {
  133. return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
  134. }
  135. public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
  136. int timer, int alpha)
  137. {
  138. return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha);
  139. }
  140. public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
  141. int timer, int alpha)
  142. {
  143. return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha);
  144. }
  145. public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
  146. bool blend, int disp, int timer, int alpha, int face)
  147. {
  148. return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams,
  149. blend, disp, timer, alpha, face);
  150. }
  151. public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
  152. bool blend, int disp, int timer, int alpha, int face)
  153. {
  154. return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams,
  155. blend, disp, timer, alpha, face);
  156. }
  157. public LSL_Float osGetTerrainHeight(int x, int y)
  158. {
  159. return m_OSSL_Functions.osGetTerrainHeight(x, y);
  160. }
  161. // Deprecated
  162. public LSL_Float osTerrainGetHeight(int x, int y)
  163. {
  164. return m_OSSL_Functions.osTerrainGetHeight(x, y);
  165. }
  166. public LSL_Integer osSetTerrainHeight(int x, int y, double val)
  167. {
  168. return m_OSSL_Functions.osSetTerrainHeight(x, y, val);
  169. }
  170. // Deprecated
  171. public LSL_Integer osTerrainSetHeight(int x, int y, double val)
  172. {
  173. return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
  174. }
  175. public void osTerrainFlush()
  176. {
  177. m_OSSL_Functions.osTerrainFlush();
  178. }
  179. public int osRegionRestart(double seconds)
  180. {
  181. return m_OSSL_Functions.osRegionRestart(seconds);
  182. }
  183. public void osRegionNotice(string msg)
  184. {
  185. m_OSSL_Functions.osRegionNotice(msg);
  186. }
  187. public bool osConsoleCommand(string Command)
  188. {
  189. return m_OSSL_Functions.osConsoleCommand(Command);
  190. }
  191. public void osSetParcelMediaURL(string url)
  192. {
  193. m_OSSL_Functions.osSetParcelMediaURL(url);
  194. }
  195. public void osSetParcelSIPAddress(string SIPAddress)
  196. {
  197. m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
  198. }
  199. public void osSetPrimFloatOnWater(int floatYN)
  200. {
  201. m_OSSL_Functions.osSetPrimFloatOnWater(floatYN);
  202. }
  203. // Teleport Functions
  204. public void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
  205. {
  206. m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat);
  207. }
  208. public void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat)
  209. {
  210. m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat);
  211. }
  212. public void osTeleportAgent(string agent, vector position, vector lookat)
  213. {
  214. m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
  215. }
  216. public void osTeleportOwner(string regionName, vector position, vector lookat)
  217. {
  218. m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
  219. }
  220. public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
  221. {
  222. m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
  223. }
  224. public void osTeleportOwner(vector position, vector lookat)
  225. {
  226. m_OSSL_Functions.osTeleportOwner(position, lookat);
  227. }
  228. // Avatar info functions
  229. public string osGetAgentIP(string agent)
  230. {
  231. return m_OSSL_Functions.osGetAgentIP(agent);
  232. }
  233. public LSL_List osGetAgents()
  234. {
  235. return m_OSSL_Functions.osGetAgents();
  236. }
  237. // Animation Functions
  238. public void osAvatarPlayAnimation(string avatar, string animation)
  239. {
  240. m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation);
  241. }
  242. public void osAvatarStopAnimation(string avatar, string animation)
  243. {
  244. m_OSSL_Functions.osAvatarStopAnimation(avatar, animation);
  245. }
  246. //Texture Draw functions
  247. public string osMovePen(string drawList, int x, int y)
  248. {
  249. return m_OSSL_Functions.osMovePen(drawList, x, y);
  250. }
  251. public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
  252. {
  253. return m_OSSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
  254. }
  255. public string osDrawLine(string drawList, int endX, int endY)
  256. {
  257. return m_OSSL_Functions.osDrawLine(drawList, endX, endY);
  258. }
  259. public string osDrawText(string drawList, string text)
  260. {
  261. return m_OSSL_Functions.osDrawText(drawList, text);
  262. }
  263. public string osDrawEllipse(string drawList, int width, int height)
  264. {
  265. return m_OSSL_Functions.osDrawEllipse(drawList, width, height);
  266. }
  267. public string osDrawRectangle(string drawList, int width, int height)
  268. {
  269. return m_OSSL_Functions.osDrawRectangle(drawList, width, height);
  270. }
  271. public string osDrawFilledRectangle(string drawList, int width, int height)
  272. {
  273. return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height);
  274. }
  275. public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
  276. {
  277. return m_OSSL_Functions.osDrawPolygon(drawList, x, y);
  278. }
  279. public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
  280. {
  281. return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
  282. }
  283. public string osSetFontSize(string drawList, int fontSize)
  284. {
  285. return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
  286. }
  287. public string osSetFontName(string drawList, string fontName)
  288. {
  289. return m_OSSL_Functions.osSetFontName(drawList, fontName);
  290. }
  291. public string osSetPenSize(string drawList, int penSize)
  292. {
  293. return m_OSSL_Functions.osSetPenSize(drawList, penSize);
  294. }
  295. public string osSetPenCap(string drawList, string direction, string type)
  296. {
  297. return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
  298. }
  299. public string osSetPenColor(string drawList, string color)
  300. {
  301. return m_OSSL_Functions.osSetPenColor(drawList, color);
  302. }
  303. // Deprecated
  304. public string osSetPenColour(string drawList, string colour)
  305. {
  306. return m_OSSL_Functions.osSetPenColour(drawList, colour);
  307. }
  308. public string osDrawImage(string drawList, int width, int height, string imageUrl)
  309. {
  310. return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl);
  311. }
  312. public vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
  313. {
  314. return m_OSSL_Functions.osGetDrawStringSize(contentType, text, fontName, fontSize);
  315. }
  316. public void osSetStateEvents(int events)
  317. {
  318. m_OSSL_Functions.osSetStateEvents(events);
  319. }
  320. public string osGetScriptEngineName()
  321. {
  322. return m_OSSL_Functions.osGetScriptEngineName();
  323. }
  324. public string osGetSimulatorVersion()
  325. {
  326. return m_OSSL_Functions.osGetSimulatorVersion();
  327. }
  328. public Hashtable osParseJSON(string JSON)
  329. {
  330. return m_OSSL_Functions.osParseJSON(JSON);
  331. }
  332. public void osMessageObject(key objectUUID,string message)
  333. {
  334. m_OSSL_Functions.osMessageObject(objectUUID,message);
  335. }
  336. public void osMakeNotecard(string notecardName, LSL_Types.list contents)
  337. {
  338. m_OSSL_Functions.osMakeNotecard(notecardName, contents);
  339. }
  340. public string osGetNotecardLine(string name, int line)
  341. {
  342. return m_OSSL_Functions.osGetNotecardLine(name, line);
  343. }
  344. public string osGetNotecard(string name)
  345. {
  346. return m_OSSL_Functions.osGetNotecard(name);
  347. }
  348. public int osGetNumberOfNotecardLines(string name)
  349. {
  350. return m_OSSL_Functions.osGetNumberOfNotecardLines(name);
  351. }
  352. public string osAvatarName2Key(string firstname, string lastname)
  353. {
  354. return m_OSSL_Functions.osAvatarName2Key(firstname, lastname);
  355. }
  356. public string osKey2Name(string id)
  357. {
  358. return m_OSSL_Functions.osKey2Name(id);
  359. }
  360. public string osGetGridNick()
  361. {
  362. return m_OSSL_Functions.osGetGridNick();
  363. }
  364. public string osGetGridName()
  365. {
  366. return m_OSSL_Functions.osGetGridName();
  367. }
  368. public string osGetGridLoginURI()
  369. {
  370. return m_OSSL_Functions.osGetGridLoginURI();
  371. }
  372. public LSL_String osFormatString(string str, LSL_List strings)
  373. {
  374. return m_OSSL_Functions.osFormatString(str, strings);
  375. }
  376. public LSL_List osMatchString(string src, string pattern, int start)
  377. {
  378. return m_OSSL_Functions.osMatchString(src, pattern, start);
  379. }
  380. // Information about data loaded into the region
  381. public string osLoadedCreationDate()
  382. {
  383. return m_OSSL_Functions.osLoadedCreationDate();
  384. }
  385. public string osLoadedCreationTime()
  386. {
  387. return m_OSSL_Functions.osLoadedCreationTime();
  388. }
  389. public string osLoadedCreationID()
  390. {
  391. return m_OSSL_Functions.osLoadedCreationID();
  392. }
  393. public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
  394. {
  395. return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules);
  396. }
  397. public key osNpcCreate(string user, string name, vector position, key cloneFrom)
  398. {
  399. return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom);
  400. }
  401. public key osNpcSaveAppearance(key npc, string notecard)
  402. {
  403. return m_OSSL_Functions.osNpcSaveAppearance(npc, notecard);
  404. }
  405. public void osNpcLoadAppearance(key npc, string notecard)
  406. {
  407. m_OSSL_Functions.osNpcLoadAppearance(npc, notecard);
  408. }
  409. public vector osNpcGetPos(LSL_Key npc)
  410. {
  411. return m_OSSL_Functions.osNpcGetPos(npc);
  412. }
  413. public void osNpcMoveTo(key npc, vector position)
  414. {
  415. m_OSSL_Functions.osNpcMoveTo(npc, position);
  416. }
  417. public void osNpcMoveToTarget(key npc, vector target, int options)
  418. {
  419. m_OSSL_Functions.osNpcMoveToTarget(npc, target, options);
  420. }
  421. public rotation osNpcGetRot(key npc)
  422. {
  423. return m_OSSL_Functions.osNpcGetRot(npc);
  424. }
  425. public void osNpcSetRot(key npc, rotation rot)
  426. {
  427. m_OSSL_Functions.osNpcSetRot(npc, rot);
  428. }
  429. public void osNpcStopMoveToTarget(LSL_Key npc)
  430. {
  431. m_OSSL_Functions.osNpcStopMoveToTarget(npc);
  432. }
  433. public void osNpcSay(key npc, string message)
  434. {
  435. m_OSSL_Functions.osNpcSay(npc, message);
  436. }
  437. public void osNpcRemove(key npc)
  438. {
  439. m_OSSL_Functions.osNpcRemove(npc);
  440. }
  441. public LSL_Key osOwnerSaveAppearance(string notecard)
  442. {
  443. return m_OSSL_Functions.osOwnerSaveAppearance(notecard);
  444. }
  445. public LSL_Key osAgentSaveAppearance(LSL_Key agentId, string notecard)
  446. {
  447. return m_OSSL_Functions.osAgentSaveAppearance(agentId, notecard);
  448. }
  449. public OSSLPrim Prim;
  450. [Serializable]
  451. public class OSSLPrim
  452. {
  453. internal ScriptBaseClass OSSL;
  454. public OSSLPrim(ScriptBaseClass bc)
  455. {
  456. OSSL = bc;
  457. Position = new OSSLPrim_Position(this);
  458. Rotation = new OSSLPrim_Rotation(this);
  459. }
  460. public OSSLPrim_Position Position;
  461. public OSSLPrim_Rotation Rotation;
  462. private TextStruct _text;
  463. public TextStruct Text
  464. {
  465. get { return _text; }
  466. set
  467. {
  468. _text = value;
  469. OSSL.llSetText(_text.Text, _text.color, _text.alpha);
  470. }
  471. }
  472. [Serializable]
  473. public struct TextStruct
  474. {
  475. public string Text;
  476. public LSL_Types.Vector3 color;
  477. public double alpha;
  478. }
  479. }
  480. [Serializable]
  481. public class OSSLPrim_Position
  482. {
  483. private OSSLPrim prim;
  484. private LSL_Types.Vector3 Position;
  485. public OSSLPrim_Position(OSSLPrim _prim)
  486. {
  487. prim = _prim;
  488. }
  489. private void Load()
  490. {
  491. Position = prim.OSSL.llGetPos();
  492. }
  493. private void Save()
  494. {
  495. if (Position.x > ((int)Constants.RegionSize - 1))
  496. Position.x = ((int)Constants.RegionSize - 1);
  497. if (Position.x < 0)
  498. Position.x = 0;
  499. if (Position.y > ((int)Constants.RegionSize - 1))
  500. Position.y = ((int)Constants.RegionSize - 1);
  501. if (Position.y < 0)
  502. Position.y = 0;
  503. if (Position.z > 768)
  504. Position.z = 768;
  505. if (Position.z < 0)
  506. Position.z = 0;
  507. prim.OSSL.llSetPos(Position);
  508. }
  509. public double x
  510. {
  511. get
  512. {
  513. Load();
  514. return Position.x;
  515. }
  516. set
  517. {
  518. Load();
  519. Position.x = value;
  520. Save();
  521. }
  522. }
  523. public double y
  524. {
  525. get
  526. {
  527. Load();
  528. return Position.y;
  529. }
  530. set
  531. {
  532. Load();
  533. Position.y = value;
  534. Save();
  535. }
  536. }
  537. public double z
  538. {
  539. get
  540. {
  541. Load();
  542. return Position.z;
  543. }
  544. set
  545. {
  546. Load();
  547. Position.z = value;
  548. Save();
  549. }
  550. }
  551. }
  552. [Serializable]
  553. public class OSSLPrim_Rotation
  554. {
  555. private OSSLPrim prim;
  556. private LSL_Types.Quaternion Rotation;
  557. public OSSLPrim_Rotation(OSSLPrim _prim)
  558. {
  559. prim = _prim;
  560. }
  561. private void Load()
  562. {
  563. Rotation = prim.OSSL.llGetRot();
  564. }
  565. private void Save()
  566. {
  567. prim.OSSL.llSetRot(Rotation);
  568. }
  569. public double x
  570. {
  571. get
  572. {
  573. Load();
  574. return Rotation.x;
  575. }
  576. set
  577. {
  578. Load();
  579. Rotation.x = value;
  580. Save();
  581. }
  582. }
  583. public double y
  584. {
  585. get
  586. {
  587. Load();
  588. return Rotation.y;
  589. }
  590. set
  591. {
  592. Load();
  593. Rotation.y = value;
  594. Save();
  595. }
  596. }
  597. public double z
  598. {
  599. get
  600. {
  601. Load();
  602. return Rotation.z;
  603. }
  604. set
  605. {
  606. Load();
  607. Rotation.z = value;
  608. Save();
  609. }
  610. }
  611. public double s
  612. {
  613. get
  614. {
  615. Load();
  616. return Rotation.s;
  617. }
  618. set
  619. {
  620. Load();
  621. Rotation.s = value;
  622. Save();
  623. }
  624. }
  625. }
  626. public key osGetMapTexture()
  627. {
  628. return m_OSSL_Functions.osGetMapTexture();
  629. }
  630. public key osGetRegionMapTexture(string regionName)
  631. {
  632. return m_OSSL_Functions.osGetRegionMapTexture(regionName);
  633. }
  634. public LSL_List osGetRegionStats()
  635. {
  636. return m_OSSL_Functions.osGetRegionStats();
  637. }
  638. /// <summary>
  639. /// Returns the amount of memory in use by the Simulator Daemon.
  640. /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware)
  641. /// </summary>
  642. /// <returns></returns>
  643. public LSL_Integer osGetSimulatorMemory()
  644. {
  645. return m_OSSL_Functions.osGetSimulatorMemory();
  646. }
  647. public void osKickAvatar(string FirstName,string SurName,string alert)
  648. {
  649. m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
  650. }
  651. public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
  652. {
  653. m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
  654. }
  655. public void osCauseDamage(string avatar, double damage)
  656. {
  657. m_OSSL_Functions.osCauseDamage(avatar, damage);
  658. }
  659. public void osCauseHealing(string avatar, double healing)
  660. {
  661. m_OSSL_Functions.osCauseHealing(avatar, healing);
  662. }
  663. public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
  664. {
  665. return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
  666. }
  667. public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
  668. {
  669. m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
  670. }
  671. public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
  672. {
  673. m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
  674. }
  675. public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
  676. {
  677. m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
  678. }
  679. public LSL_List osGetAvatarList()
  680. {
  681. return m_OSSL_Functions.osGetAvatarList();
  682. }
  683. public LSL_String osUnixTimeToTimestamp(long time)
  684. {
  685. return m_OSSL_Functions.osUnixTimeToTimestamp(time);
  686. }
  687. }
  688. }