diff options
author | Adam Frisby | 2009-04-11 10:21:04 +0000 |
---|---|---|
committer | Adam Frisby | 2009-04-11 10:21:04 +0000 |
commit | b8619386eb31a2bf3f460e464d0237f6bee5f56f (patch) | |
tree | e9a1f1559e04e3f3597aa8ed6ef37c6a63254ca2 /OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs | |
parent | Correct Opensim.ini.example to reflect the default settings for clouds. (diff) | |
download | opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.zip opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.tar.gz opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.tar.bz2 opensim-SC_OLD-b8619386eb31a2bf3f460e464d0237f6bee5f56f.tar.xz |
* Minor MRM Cleanup
* Interfaces now live in Interfaces subdirectory.
* Namespace does not yet reflect this change.
* Final namespace for MRMs will probably sit somewhere around OpenSim.Extend.MRM[?]
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs (renamed from OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs) | 446 |
1 files changed, 223 insertions, 223 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index dc2e3fa..e17b716 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs | |||
@@ -1,223 +1,223 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSimulator Project nor the | 12 | * * Neither the name of the OpenSimulator Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Drawing; | 29 | using System.Drawing; |
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; | 31 | using OpenSim.Region.OptionalModules.Scripting.Minimodule.Object; |
32 | 32 | ||
33 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 33 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
34 | { | 34 | { |
35 | public class TouchEventArgs : EventArgs | 35 | public class TouchEventArgs : EventArgs |
36 | { | 36 | { |
37 | public IAvatar Avatar; | 37 | public IAvatar Avatar; |
38 | 38 | ||
39 | public Vector3 TouchBiNormal; | 39 | public Vector3 TouchBiNormal; |
40 | public Vector3 TouchNormal; | 40 | public Vector3 TouchNormal; |
41 | public Vector3 TouchPosition; | 41 | public Vector3 TouchPosition; |
42 | 42 | ||
43 | public Vector2 TouchUV; | 43 | public Vector2 TouchUV; |
44 | public Vector2 TouchST; | 44 | public Vector2 TouchST; |
45 | 45 | ||
46 | public int TouchMaterialIndex; | 46 | public int TouchMaterialIndex; |
47 | } | 47 | } |
48 | 48 | ||
49 | public delegate void OnTouchDelegate(IObject sender, TouchEventArgs e); | 49 | public delegate void OnTouchDelegate(IObject sender, TouchEventArgs e); |
50 | 50 | ||
51 | public interface IObject : IEntity | 51 | public interface IObject : IEntity |
52 | { | 52 | { |
53 | #region Events | 53 | #region Events |
54 | 54 | ||
55 | event OnTouchDelegate OnTouch; | 55 | event OnTouchDelegate OnTouch; |
56 | 56 | ||
57 | #endregion | 57 | #endregion |
58 | 58 | ||
59 | /// <summary> | 59 | /// <summary> |
60 | /// Returns whether or not this object is still in the world. | 60 | /// Returns whether or not this object is still in the world. |
61 | /// Eg, if you store an IObject reference, however the object | 61 | /// Eg, if you store an IObject reference, however the object |
62 | /// is deleted before you use it, it will throw a NullReference | 62 | /// is deleted before you use it, it will throw a NullReference |
63 | /// exception. 'Exists' allows you to check the object is still | 63 | /// exception. 'Exists' allows you to check the object is still |
64 | /// in play before utilizing it. | 64 | /// in play before utilizing it. |
65 | /// </summary> | 65 | /// </summary> |
66 | /// <example> | 66 | /// <example> |
67 | /// IObject deleteMe = World.Objects[0]; | 67 | /// IObject deleteMe = World.Objects[0]; |
68 | /// | 68 | /// |
69 | /// if (deleteMe.Exists) { | 69 | /// if (deleteMe.Exists) { |
70 | /// deleteMe.Say("Hello, I still exist!"); | 70 | /// deleteMe.Say("Hello, I still exist!"); |
71 | /// } | 71 | /// } |
72 | /// | 72 | /// |
73 | /// World.Objects.Remove(deleteMe); | 73 | /// World.Objects.Remove(deleteMe); |
74 | /// | 74 | /// |
75 | /// if (!deleteMe.Exists) { | 75 | /// if (!deleteMe.Exists) { |
76 | /// Host.Console.Info("I was deleted"); | 76 | /// Host.Console.Info("I was deleted"); |
77 | /// } | 77 | /// } |
78 | /// </example> | 78 | /// </example> |
79 | /// <remarks> | 79 | /// <remarks> |
80 | /// Objects should be near-guarunteed to exist for any event which | 80 | /// Objects should be near-guarunteed to exist for any event which |
81 | /// passes them as an argument. Storing an object for a longer period | 81 | /// passes them as an argument. Storing an object for a longer period |
82 | /// of time however will limit their reliability. | 82 | /// of time however will limit their reliability. |
83 | /// | 83 | /// |
84 | /// It is a good practice to use Try/Catch blocks handling for | 84 | /// It is a good practice to use Try/Catch blocks handling for |
85 | /// NullReferenceException, when accessing remote objects. | 85 | /// NullReferenceException, when accessing remote objects. |
86 | /// </remarks> | 86 | /// </remarks> |
87 | bool Exists { get; } | 87 | bool Exists { get; } |
88 | 88 | ||
89 | /// <summary> | 89 | /// <summary> |
90 | /// The local region-unique ID for this object. | 90 | /// The local region-unique ID for this object. |
91 | /// </summary> | 91 | /// </summary> |
92 | uint LocalID { get; } | 92 | uint LocalID { get; } |
93 | 93 | ||
94 | /// <summary> | 94 | /// <summary> |
95 | /// The description assigned to this object. | 95 | /// The description assigned to this object. |
96 | /// </summary> | 96 | /// </summary> |
97 | String Description { get; set; } | 97 | String Description { get; set; } |
98 | 98 | ||
99 | /// <summary> | 99 | /// <summary> |
100 | /// Returns the root object of a linkset. If this object is the root, it will return itself. | 100 | /// Returns the root object of a linkset. If this object is the root, it will return itself. |
101 | /// </summary> | 101 | /// </summary> |
102 | IObject Root { get; } | 102 | IObject Root { get; } |
103 | 103 | ||
104 | /// <summary> | 104 | /// <summary> |
105 | /// Returns a collection of objects which are linked to the current object. Does not include the root object. | 105 | /// Returns a collection of objects which are linked to the current object. Does not include the root object. |
106 | /// </summary> | 106 | /// </summary> |
107 | IObject[] Children { get; } | 107 | IObject[] Children { get; } |
108 | 108 | ||
109 | /// <summary> | 109 | /// <summary> |
110 | /// Returns a list of materials attached to this object. Each may contain unique texture | 110 | /// Returns a list of materials attached to this object. Each may contain unique texture |
111 | /// and other visual information. For primitive based objects, this correlates with | 111 | /// and other visual information. For primitive based objects, this correlates with |
112 | /// Object Faces. For mesh based objects, this correlates with Materials. | 112 | /// Object Faces. For mesh based objects, this correlates with Materials. |
113 | /// </summary> | 113 | /// </summary> |
114 | IObjectMaterial[] Materials { get; } | 114 | IObjectMaterial[] Materials { get; } |
115 | 115 | ||
116 | /// <summary> | 116 | /// <summary> |
117 | /// The bounding box of the object. Primitive and Mesh objects alike are scaled to fit within these bounds. | 117 | /// The bounding box of the object. Primitive and Mesh objects alike are scaled to fit within these bounds. |
118 | /// </summary> | 118 | /// </summary> |
119 | Vector3 Scale { get; set; } | 119 | Vector3 Scale { get; set; } |
120 | 120 | ||
121 | /// <summary> | 121 | /// <summary> |
122 | /// The rotation of the object relative to the Scene | 122 | /// The rotation of the object relative to the Scene |
123 | /// </summary> | 123 | /// </summary> |
124 | Quaternion WorldRotation { get; set; } | 124 | Quaternion WorldRotation { get; set; } |
125 | 125 | ||
126 | /// <summary> | 126 | /// <summary> |
127 | /// The rotation of the object relative to a parent object | 127 | /// The rotation of the object relative to a parent object |
128 | /// If root, works the same as WorldRotation | 128 | /// If root, works the same as WorldRotation |
129 | /// </summary> | 129 | /// </summary> |
130 | Quaternion OffsetRotation { get; set; } | 130 | Quaternion OffsetRotation { get; set; } |
131 | 131 | ||
132 | /// <summary> | 132 | /// <summary> |
133 | /// The position of the object relative to a parent object | 133 | /// The position of the object relative to a parent object |
134 | /// If root, works the same as WorldPosition | 134 | /// If root, works the same as WorldPosition |
135 | /// </summary> | 135 | /// </summary> |
136 | Vector3 OffsetPosition { get; set; } | 136 | Vector3 OffsetPosition { get; set; } |
137 | 137 | ||
138 | Vector3 SitTarget { get; set; } | 138 | Vector3 SitTarget { get; set; } |
139 | String SitTargetText { get; set; } | 139 | String SitTargetText { get; set; } |
140 | 140 | ||
141 | String TouchText { get; set; } | 141 | String TouchText { get; set; } |
142 | 142 | ||
143 | /// <summary> | 143 | /// <summary> |
144 | /// Text to be associated with this object, in the | 144 | /// Text to be associated with this object, in the |
145 | /// Second Life(r) viewer, this is shown above the | 145 | /// Second Life(r) viewer, this is shown above the |
146 | /// object. | 146 | /// object. |
147 | /// </summary> | 147 | /// </summary> |
148 | String Text { get; set; } | 148 | String Text { get; set; } |
149 | 149 | ||
150 | bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X) | 150 | bool IsRotationLockedX { get; set; } // SetStatus(!ROTATE_X) |
151 | bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y) | 151 | bool IsRotationLockedY { get; set; } // SetStatus(!ROTATE_Y) |
152 | bool IsRotationLockedZ { get; set; } // SetStatus(!ROTATE_Z) | 152 | bool IsRotationLockedZ { get; set; } // SetStatus(!ROTATE_Z) |
153 | bool IsSandboxed { get; set; } // SetStatus(SANDBOX) | 153 | bool IsSandboxed { get; set; } // SetStatus(SANDBOX) |
154 | bool IsImmotile { get; set; } // SetStatus(BLOCK_GRAB) | 154 | bool IsImmotile { get; set; } // SetStatus(BLOCK_GRAB) |
155 | bool IsAlwaysReturned { get; set; } // SetStatus(!DIE_AT_EDGE) | 155 | bool IsAlwaysReturned { get; set; } // SetStatus(!DIE_AT_EDGE) |
156 | bool IsTemporary { get; set; } // TEMP_ON_REZ | 156 | bool IsTemporary { get; set; } // TEMP_ON_REZ |
157 | 157 | ||
158 | bool IsFlexible { get; set; } | 158 | bool IsFlexible { get; set; } |
159 | 159 | ||
160 | PrimType PrimShape { get; set; } | 160 | PrimType PrimShape { get; set; } |
161 | // TODO: | 161 | // TODO: |
162 | // PrimHole | 162 | // PrimHole |
163 | // Repeats, Offsets, Cut/Dimple/ProfileCut | 163 | // Repeats, Offsets, Cut/Dimple/ProfileCut |
164 | // Hollow, Twist, HoleSize, | 164 | // Hollow, Twist, HoleSize, |
165 | // Taper[A+B], Shear[A+B], Revolutions, | 165 | // Taper[A+B], Shear[A+B], Revolutions, |
166 | // RadiusOffset, Skew | 166 | // RadiusOffset, Skew |
167 | 167 | ||
168 | PhysicsMaterial PhysicsMaterial { get; set; } | 168 | PhysicsMaterial PhysicsMaterial { get; set; } |
169 | 169 | ||
170 | IObjectPhysics Physics { get; } | 170 | IObjectPhysics Physics { get; } |
171 | 171 | ||
172 | 172 | ||
173 | /// <summary> | 173 | /// <summary> |
174 | /// Causes the object to speak to its surroundings, | 174 | /// Causes the object to speak to its surroundings, |
175 | /// equivilent to LSL/OSSL llSay | 175 | /// equivilent to LSL/OSSL llSay |
176 | /// </summary> | 176 | /// </summary> |
177 | /// <param name="msg">The message to send to the user</param> | 177 | /// <param name="msg">The message to send to the user</param> |
178 | void Say(string msg); | 178 | void Say(string msg); |
179 | 179 | ||
180 | } | 180 | } |
181 | 181 | ||
182 | public enum PhysicsMaterial | 182 | public enum PhysicsMaterial |
183 | { | 183 | { |
184 | Default, | 184 | Default, |
185 | Glass, | 185 | Glass, |
186 | Metal, | 186 | Metal, |
187 | Plastic, | 187 | Plastic, |
188 | Wood, | 188 | Wood, |
189 | Rubber, | 189 | Rubber, |
190 | Stone, | 190 | Stone, |
191 | Flesh | 191 | Flesh |
192 | } | 192 | } |
193 | 193 | ||
194 | public enum PrimType | 194 | public enum PrimType |
195 | { | 195 | { |
196 | NotPrimitive = 255, | 196 | NotPrimitive = 255, |
197 | Box = 0, | 197 | Box = 0, |
198 | Cylinder = 1, | 198 | Cylinder = 1, |
199 | Prism = 2, | 199 | Prism = 2, |
200 | Sphere = 3, | 200 | Sphere = 3, |
201 | Torus = 4, | 201 | Torus = 4, |
202 | Tube = 5, | 202 | Tube = 5, |
203 | Ring = 6, | 203 | Ring = 6, |
204 | Sculpt = 7 | 204 | Sculpt = 7 |
205 | } | 205 | } |
206 | 206 | ||
207 | public enum TextureMapping | 207 | public enum TextureMapping |
208 | { | 208 | { |
209 | Default, | 209 | Default, |
210 | Planar | 210 | Planar |
211 | } | 211 | } |
212 | 212 | ||
213 | public interface IObjectMaterial | 213 | public interface IObjectMaterial |
214 | { | 214 | { |
215 | Color Color { get; set; } | 215 | Color Color { get; set; } |
216 | UUID Texture { get; set; } | 216 | UUID Texture { get; set; } |
217 | TextureMapping Mapping { get; set; } // SetPrimParms(PRIM_TEXGEN) | 217 | TextureMapping Mapping { get; set; } // SetPrimParms(PRIM_TEXGEN) |
218 | bool Bright { get; set; } // SetPrimParms(FULLBRIGHT) | 218 | bool Bright { get; set; } // SetPrimParms(FULLBRIGHT) |
219 | double Bloom { get; set; } // SetPrimParms(GLOW) | 219 | double Bloom { get; set; } // SetPrimParms(GLOW) |
220 | bool Shiny { get; set; } // SetPrimParms(SHINY) | 220 | bool Shiny { get; set; } // SetPrimParms(SHINY) |
221 | bool BumpMap { get; set; } // SetPrimParms(BUMPMAP) [DEPRECIATE IN FAVOUR OF UUID?] | 221 | bool BumpMap { get; set; } // SetPrimParms(BUMPMAP) [DEPRECIATE IN FAVOUR OF UUID?] |
222 | } | 222 | } |
223 | } | 223 | } |