IObject.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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.Drawing;
  29. using OpenMetaverse;
  30. namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
  31. {
  32. public interface IObject
  33. {
  34. bool Exists { get; }
  35. uint LocalID { get; }
  36. UUID GlobalID { get; }
  37. IObject[] Children { get; }
  38. /// <summary>
  39. /// Equals 'this' if we have no parent. Ergo, Root.Children.Count will always return the total number of items in the linkset.
  40. /// </summary>
  41. IObject Root { get; }
  42. IObjectFace[] Faces { get; }
  43. Vector3 Scale { get; set; }
  44. Quaternion Rotation { get; set; }
  45. Vector3 SitTarget { get; set; }
  46. String SitTargetText { get; set; }
  47. String TouchText { get; set; }
  48. String Text { get; set; }
  49. bool IsPhysical { get; set; } // SetStatus(PHYSICS)
  50. bool IsPhantom { get; set; } // SetStatus(PHANTOM)
  51. bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X)
  52. bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y)
  53. bool IsRotationLockedZ { get; set; } // SetStatus(!ROTATE_Z)
  54. bool IsSandboxed { get; set; } // SetStatus(SANDBOX)
  55. bool IsImmotile { get; set; } // SetStatus(BLOCK_GRAB)
  56. bool IsAlwaysReturned { get; set; } // SetStatus(!DIE_AT_EDGE)
  57. bool IsTemporary { get; set; } // TEMP_ON_REZ
  58. bool IsFlexible { get; set; }
  59. PrimType PrimShape { get; set; }
  60. // TODO:
  61. // PrimHole
  62. // Repeats, Offsets, Cut/Dimple/ProfileCut
  63. // Hollow, Twist, HoleSize,
  64. // Taper[A+B], Shear[A+B], Revolutions,
  65. // RadiusOffset, Skew
  66. Material Material { get; set; }
  67. }
  68. public enum Material
  69. {
  70. Default,
  71. Glass,
  72. Metal,
  73. Plastic,
  74. Wood,
  75. Rubber,
  76. Stone,
  77. Flesh
  78. }
  79. public enum PrimType
  80. {
  81. NotPrimitive = 255,
  82. Box = 0,
  83. Cylinder = 1,
  84. Prism = 2,
  85. Sphere = 3,
  86. Torus = 4,
  87. Tube = 5,
  88. Ring = 6,
  89. Sculpt = 7
  90. }
  91. public enum TextureMapping
  92. {
  93. Default,
  94. Planar
  95. }
  96. public interface IObjectFace
  97. {
  98. Color Color { get; set; }
  99. UUID Texture { get; set; }
  100. TextureMapping Mapping { get; set; } // SetPrimParms(PRIM_TEXGEN)
  101. bool Bright { get; set; } // SetPrimParms(FULLBRIGHT)
  102. double Bloom { get; set; } // SetPrimParms(GLOW)
  103. bool Shiny { get; set; } // SetPrimParms(SHINY)
  104. bool BumpMap { get; set; } // SetPrimParms(BUMPMAP) [DEPRECIATE IN FAVOUR OF UUID?]
  105. }
  106. }