aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-08-02 16:40:50 +0000
committerMW2007-08-02 16:40:50 +0000
commit5c28f3c3a23fee918bc1acd4aa3cf40953f4d0e6 (patch)
tree88d1e5f0bdaf837699fc807dc7bc46117e53dbeb
parentChanged a couple of method in PermissionManager from private to protected to ... (diff)
downloadopensim-SC_OLD-5c28f3c3a23fee918bc1acd4aa3cf40953f4d0e6.zip
opensim-SC_OLD-5c28f3c3a23fee918bc1acd4aa3cf40953f4d0e6.tar.gz
opensim-SC_OLD-5c28f3c3a23fee918bc1acd4aa3cf40953f4d0e6.tar.bz2
opensim-SC_OLD-5c28f3c3a23fee918bc1acd4aa3cf40953f4d0e6.tar.xz
Some more work on SceneObject/ Primitive rewrites (slowly getting there)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs35
-rw-r--r--OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs103
2 files changed, 127 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
index f932b70..e43329d 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
+++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
@@ -107,6 +107,41 @@ namespace OpenSim.Region.Environment.Scenes
107 return null; 107 return null;
108 } 108 }
109 109
110 /// <summary>
111 /// Does this group contain the child prim
112 /// should be able to remove these methods once we have a entity index in scene
113 /// </summary>
114 /// <param name="primID"></param>
115 /// <returns></returns>
116 public bool HasChildPrim(LLUUID primID)
117 {
118 AllNewSceneObjectPart2 childPart = null;
119 if (this.m_parts.ContainsKey(primID))
120 {
121 childPart = this.m_parts[primID];
122 return true;
123 }
124 return false;
125 }
126
127 /// <summary>
128 /// Does this group contain the child prim
129 /// should be able to remove these methods once we have a entity index in scene
130 /// </summary>
131 /// <param name="localID"></param>
132 /// <returns></returns>
133 public bool HasChildPrim(uint localID)
134 {
135 foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
136 {
137 if (part.LocalID == localID)
138 {
139 return true;
140 }
141 }
142 return false;
143 }
144
110 public void TriggerTainted() 145 public void TriggerTainted()
111 { 146 {
112 if (OnPrimCountTainted != null) 147 if (OnPrimCountTainted != null)
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
index a5d5cde..c4b4b43 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
+++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
@@ -14,10 +14,6 @@ namespace OpenSim.Region.Environment.Scenes
14 { 14 {
15 private const uint FULL_MASK_PERMISSIONS = 2147483647; 15 private const uint FULL_MASK_PERMISSIONS = 2147483647;
16 16
17 public string SitName = "";
18 public string TouchName = "";
19 public string Text = "";
20
21 public LLUUID CreatorID; 17 public LLUUID CreatorID;
22 public LLUUID OwnerID; 18 public LLUUID OwnerID;
23 public LLUUID GroupID; 19 public LLUUID GroupID;
@@ -36,6 +32,11 @@ namespace OpenSim.Region.Environment.Scenes
36 32
37 protected AllNewSceneObjectGroup2 m_parentGroup; 33 protected AllNewSceneObjectGroup2 m_parentGroup;
38 34
35 /// <summary>
36 /// Only used internally to schedule client updates
37 /// </summary>
38 private byte m_updateFlag;
39
39 #region Properties 40 #region Properties
40 41
41 protected LLUUID m_uuid; 42 protected LLUUID m_uuid;
@@ -194,6 +195,37 @@ namespace OpenSim.Region.Environment.Scenes
194 } 195 }
195 } 196 }
196 197
198 private string m_text = "";
199 public string Text
200 {
201 get { return m_text; }
202 set
203 {
204 m_text = value;
205 ScheduleFullUpdate();
206 }
207 }
208
209 private string m_sitName = "";
210 public string SitName
211 {
212 get { return m_sitName; }
213 set
214 {
215 m_sitName = value;
216 }
217 }
218
219 private string m_touchName = "";
220 public string TouchName
221 {
222 get { return m_touchName; }
223 set
224 {
225 m_touchName = value;
226 }
227 }
228
197 public PrimitiveBaseShape Shape 229 public PrimitiveBaseShape Shape
198 { 230 {
199 get 231 get
@@ -243,6 +275,26 @@ namespace OpenSim.Region.Environment.Scenes
243 } 275 }
244 #endregion 276 #endregion
245 277
278 #region Update Scheduling
279 private void ClearUpdateSchedule()
280 {
281 m_updateFlag = 0;
282 }
283
284 private void ScheduleFullUpdate()
285 {
286 m_updateFlag = 2;
287 }
288
289 private void ScheduleTerseUpdate()
290 {
291 if (m_updateFlag < 1)
292 {
293 m_updateFlag = 1;
294 }
295 }
296 #endregion
297
246 #region Shape 298 #region Shape
247 /// <summary> 299 /// <summary>
248 /// 300 ///
@@ -281,6 +333,7 @@ namespace OpenSim.Region.Environment.Scenes
281 } 333 }
282 #endregion 334 #endregion
283 335
336 #region ExtraParams
284 public void UpdateExtraParam(ushort type, bool inUse, byte[] data) 337 public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
285 { 338 {
286 this.m_Shape.ExtraParams = new byte[data.Length + 7]; 339 this.m_Shape.ExtraParams = new byte[data.Length + 7];
@@ -298,7 +351,7 @@ namespace OpenSim.Region.Environment.Scenes
298 351
299 //this.ScheduleFullUpdate(); 352 //this.ScheduleFullUpdate();
300 } 353 }
301 354 #endregion
302 355
303 #region Texture 356 #region Texture
304 /// <summary> 357 /// <summary>
@@ -311,10 +364,12 @@ namespace OpenSim.Region.Environment.Scenes
311 } 364 }
312 #endregion 365 #endregion
313 366
367 #region ParticleSystem
314 public void AddNewParticleSystem(libsecondlife.Primitive.ParticleSystem pSystem) 368 public void AddNewParticleSystem(libsecondlife.Primitive.ParticleSystem pSystem)
315 { 369 {
316 this.m_particleSystem = pSystem.GetBytes(); 370 this.m_particleSystem = pSystem.GetBytes();
317 } 371 }
372 #endregion
318 373
319 #region Position 374 #region Position
320 /// <summary> 375 /// <summary>
@@ -342,15 +397,41 @@ namespace OpenSim.Region.Environment.Scenes
342 /// <param name="scale"></param> 397 /// <param name="scale"></param>
343 public void Resize(LLVector3 scale) 398 public void Resize(LLVector3 scale)
344 { 399 {
345 LLVector3 offset = (scale - this.m_Shape.Scale);
346 offset.X /= 2;
347 offset.Y /= 2;
348 offset.Z /= 2;
349
350 this.OffsetPosition += offset;
351 this.m_Shape.Scale = scale; 400 this.m_Shape.Scale = scale;
352 } 401 }
353 #endregion 402 #endregion
403
404 #region Client Update Methods
405 /// <summary>
406 ///
407 /// </summary>
408 /// <param name="remoteClient"></param>
409 public void SendFullUpdateToClient(IClientAPI remoteClient)
410 {
411 LLVector3 lPos;
412 lPos = OffsetPosition;
413 LLQuaternion lRot;
414 lRot = RotationOffset;
415
416 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_Shape, lPos, lRot, this.ObjectFlags, m_uuid,
417 OwnerID, m_text, ParentID, this.m_particleSystem);
418 }
419
420 /// <summary>
421 ///
422 /// </summary>
423 /// <param name="RemoteClient"></param>
424 public void SendTerseUpdateToClient(IClientAPI remoteClient)
425 {
426 LLVector3 lPos;
427 lPos = this.OffsetPosition;
428 LLQuaternion mRot = this.RotationOffset;
429
430 remoteClient.SendPrimTerseUpdate(m_regionHandle, 64096, LocalID, lPos, mRot);
431 }
432
433
434 #endregion
354 } 435 }
355} 436}
356 437