aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs57
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
3 files changed, 86 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
index 1a3bcbb..6df5cc2 100644
--- a/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
+++ b/OpenSim/Region/Framework/Interfaces/IDynamicTextureManager.cs
@@ -25,6 +25,8 @@
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
28using System;
29using System.Drawing;
28using System.IO; 30using System.IO;
29using OpenMetaverse; 31using OpenMetaverse;
30 32
@@ -33,7 +35,14 @@ namespace OpenSim.Region.Framework.Interfaces
33 public interface IDynamicTextureManager 35 public interface IDynamicTextureManager
34 { 36 {
35 void RegisterRender(string handleType, IDynamicTextureRender render); 37 void RegisterRender(string handleType, IDynamicTextureRender render);
36 void ReturnData(UUID id, byte[] data, bool isReuseable); 38
39 /// <summary>
40 /// Used by IDynamicTextureRender implementations to return renders
41 /// </summary>
42 /// <param name='id'></param>
43 /// <param name='data'></param>
44 /// <param name='isReuseable'></param>
45 void ReturnData(UUID id, IDynamicTexture texture);
37 46
38 UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams, 47 UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, string extraParams,
39 int updateTimer); 48 int updateTimer);
@@ -125,11 +134,53 @@ namespace OpenSim.Region.Framework.Interfaces
125// /// <param name='extraParams'></param> 134// /// <param name='extraParams'></param>
126// bool AlwaysIdenticalConversion(string bodyData, string extraParams); 135// bool AlwaysIdenticalConversion(string bodyData, string extraParams);
127 136
128 byte[] ConvertUrl(string url, string extraParams); 137 IDynamicTexture ConvertUrl(string url, string extraParams);
129 byte[] ConvertData(string bodyData, string extraParams); 138 IDynamicTexture ConvertData(string bodyData, string extraParams);
139
130 bool AsyncConvertUrl(UUID id, string url, string extraParams); 140 bool AsyncConvertUrl(UUID id, string url, string extraParams);
131 bool AsyncConvertData(UUID id, string bodyData, string extraParams); 141 bool AsyncConvertData(UUID id, string bodyData, string extraParams);
142
132 void GetDrawStringSize(string text, string fontName, int fontSize, 143 void GetDrawStringSize(string text, string fontName, int fontSize,
133 out double xSize, out double ySize); 144 out double xSize, out double ySize);
134 } 145 }
146
147 public interface IDynamicTexture
148 {
149 /// <summary>
150 /// Input commands used to generate this data.
151 /// </summary>
152 /// <remarks>
153 /// Null if input commands were not used.
154 /// </remarks>
155 string InputCommands { get; }
156
157 /// <summary>
158 /// Uri used to generate this data.
159 /// </summary>
160 /// <remarks>
161 /// Null if a uri was not used.
162 /// </remarks>
163 Uri InputUri { get; }
164
165 /// <summary>
166 /// Extra input params used to generate this data.
167 /// </summary>
168 string InputParams { get; }
169
170 /// <summary>
171 /// Texture data.
172 /// </summary>
173 byte[] Data { get; }
174
175 /// <summary>
176 /// Size of texture.
177 /// </summary>
178 Size Size { get; }
179
180 /// <summary>
181 /// Signal whether the texture is reuseable (i.e. whether the same input data will always generate the same
182 /// texture).
183 /// </summary>
184 bool IsReuseable { get; }
185 }
135} 186}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8fb6c3b..d94d5ef 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4811,6 +4811,18 @@ namespace OpenSim.Region.Framework.Scenes
4811 } 4811 }
4812 4812
4813 /// <summary> 4813 /// <summary>
4814 /// Attempt to get the SOG via its UUID
4815 /// </summary>
4816 /// <param name="fullID"></param>
4817 /// <param name="sog"></param>
4818 /// <returns></returns>
4819 public bool TryGetSceneObjectGroup(UUID fullID, out SceneObjectGroup sog)
4820 {
4821 sog = GetSceneObjectGroup(fullID);
4822 return sog != null;
4823 }
4824
4825 /// <summary>
4814 /// Get a prim by name from the scene (will return the first 4826 /// Get a prim by name from the scene (will return the first
4815 /// found, if there are more than one prim with the same name) 4827 /// found, if there are more than one prim with the same name)
4816 /// </summary> 4828 /// </summary>
@@ -4842,6 +4854,18 @@ namespace OpenSim.Region.Framework.Scenes
4842 } 4854 }
4843 4855
4844 /// <summary> 4856 /// <summary>
4857 /// Attempt to get a prim via its UUID
4858 /// </summary>
4859 /// <param name="fullID"></param>
4860 /// <param name="sop"></param>
4861 /// <returns></returns>
4862 public bool TryGetSceneObjectPart(UUID fullID, out SceneObjectPart sop)
4863 {
4864 sop = GetSceneObjectPart(fullID);
4865 return sop != null;
4866 }
4867
4868 /// <summary>
4845 /// Get a scene object group that contains the prim with the given local id 4869 /// Get a scene object group that contains the prim with the given local id
4846 /// </summary> 4870 /// </summary>
4847 /// <param name="localID"></param> 4871 /// <param name="localID"></param>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3e8c7e5..0176921 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3631,13 +3631,16 @@ namespace OpenSim.Region.Framework.Scenes
3631 public List<SceneObjectGroup> GetAttachments(uint attachmentPoint) 3631 public List<SceneObjectGroup> GetAttachments(uint attachmentPoint)
3632 { 3632 {
3633 List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(); 3633 List<SceneObjectGroup> attachments = new List<SceneObjectGroup>();
3634 3634
3635 lock (m_attachments) 3635 if (attachmentPoint >= 0)
3636 { 3636 {
3637 foreach (SceneObjectGroup so in m_attachments) 3637 lock (m_attachments)
3638 { 3638 {
3639 if (attachmentPoint == so.AttachmentPoint) 3639 foreach (SceneObjectGroup so in m_attachments)
3640 attachments.Add(so); 3640 {
3641 if (attachmentPoint == so.AttachmentPoint)
3642 attachments.Add(so);
3643 }
3641 } 3644 }
3642 } 3645 }
3643 3646