aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ContentManagementSystem
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs38
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs23
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs28
14 files changed, 155 insertions, 184 deletions
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
index f99bfc5..dd592dd 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class AuraMetaEntity : PointMetaEntity 55 public class AuraMetaEntity : PointMetaEntity
@@ -59,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
59 #region Constructors 57 #region Constructors
60 58
61 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency. 59 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency.
62 public AuraMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) 60 public AuraMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
63 : base(scene, LocalId, groupPos, transparency) 61 : base(scene, LocalId, groupPos, transparency)
64 { 62 {
65 SetAura(color, scale); 63 SetAura(color, scale);
66 } 64 }
67 65
68 public AuraMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) 66 public AuraMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
69 : base(scene, uuid, LocalId, groupPos, transparency) 67 : base(scene, uuid, LocalId, groupPos, transparency)
70 { 68 {
71 SetAura(color, scale); 69 SetAura(color, scale);
@@ -75,7 +73,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
75 73
76 #region Private Methods 74 #region Private Methods
77 75
78 private float Average(LLVector3 values) 76 private float Average(Vector3 values)
79 { 77 {
80 return (values.X + values.Y + values.Z)/3f; 78 return (values.X + values.Y + values.Z)/3f;
81 } 79 }
@@ -84,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
84 82
85 #region Public Methods 83 #region Public Methods
86 84
87 public void SetAura(LLVector3 color, LLVector3 scale) 85 public void SetAura(Vector3 color, Vector3 scale)
88 { 86 {
89 SetAura(color, Average(scale) * 2.0f); 87 SetAura(color, Average(scale) * 2.0f);
90 } 88 }
91 89
92 public void SetAura(LLVector3 color, float radius) 90 public void SetAura(Vector3 color, float radius)
93 { 91 {
94 SceneObjectPart From = m_Entity.RootPart; 92 SceneObjectPart From = m_Entity.RootPart;
95 93
@@ -110,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
110 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags); 108 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags);
111 } 109 }
112 110
113 public void SetAura(SceneObjectPart From, LLVector3 color, float radius, float burstRadius, float age, float burstRate, libsecondlife.Primitive.ParticleSystem.SourcePattern patternFlags) 111 public void SetAura(SceneObjectPart From, Vector3 color, float radius, float burstRadius, float age, float burstRate, Primitive.ParticleSystem.SourcePattern patternFlags)
114 { 112 {
115 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 113 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
116 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 114 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
@@ -139,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
139 prules.PartAcceleration.Y = 0.0f; 137 prules.PartAcceleration.Y = 0.0f;
140 prules.PartAcceleration.Z = 0.0f; 138 prules.PartAcceleration.Z = 0.0f;
141 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN 139 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN
142 //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank 140 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
143 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE 141 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE
144 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT 142 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT
145 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS 143 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS
@@ -160,4 +158,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 158
161 #endregion Public Methods 159 #endregion Public Methods
162 } 160 }
163} \ No newline at end of file 161}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
index 9e39088..b27bbc0 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,21 +50,19 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class BeamMetaEntity : PointMetaEntity 55 public class BeamMetaEntity : PointMetaEntity
58 { 56 {
59 #region Constructors 57 #region Constructors
60 58
61 public BeamMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) 59 public BeamMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
62 : base(scene, LocalId, groupPos, transparency) 60 : base(scene, LocalId, groupPos, transparency)
63 { 61 {
64 SetBeamToUUID(To, color); 62 SetBeamToUUID(To, color);
65 } 63 }
66 64
67 public BeamMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) 65 public BeamMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
68 : base(scene, uuid, LocalId, groupPos, transparency) 66 : base(scene, uuid, LocalId, groupPos, transparency)
69 { 67 {
70 SetBeamToUUID(To, color); 68 SetBeamToUUID(To, color);
@@ -74,13 +72,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
74 72
75 #region Public Methods 73 #region Public Methods
76 74
77 public void SetBeamToUUID(SceneObjectPart To, LLVector3 color) 75 public void SetBeamToUUID(SceneObjectPart To, Vector3 color)
78 { 76 {
79 SceneObjectPart From = m_Entity.RootPart; 77 SceneObjectPart From = m_Entity.RootPart;
80 //Scale size of particles to distance objects are apart (for better visibility) 78 //Scale size of particles to distance objects are apart (for better visibility)
81 LLVector3 FromPos = From.GetWorldPosition(); 79 Vector3 FromPos = From.GetWorldPosition();
82 LLVector3 ToPos = From.GetWorldPosition(); 80 Vector3 ToPos = From.GetWorldPosition();
83// LLUUID toUUID = To.UUID; 81 UUID toUUID = To.UUID;
84 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + 82 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) +
85 Math.Pow(FromPos.X-ToPos.Y, 2) + 83 Math.Pow(FromPos.X-ToPos.Y, 2) +
86 Math.Pow(FromPos.X-ToPos.Z, 2) 84 Math.Pow(FromPos.X-ToPos.Z, 2)
@@ -94,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
94 SetBeamToUUID(From, To, color, rate, scale, speed); 92 SetBeamToUUID(From, To, color, rate, scale, speed);
95 } 93 }
96 94
97 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, LLVector3 color, float rate, float scale, float speed) 95 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed)
98 { 96 {
99 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 97 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
100 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 98 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
@@ -118,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
118 prules.PartAcceleration.Y = 0.0f; 116 prules.PartAcceleration.Y = 0.0f;
119 prules.PartAcceleration.Z = 0.0f; 117 prules.PartAcceleration.Z = 0.0f;
120 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN 118 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN
121 //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank 119 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
122 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE 120 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE
123 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT 121 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT
124 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS 122 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS
@@ -138,4 +136,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
138 136
139 #endregion Public Methods 137 #endregion Public Methods
140 } 138 }
141} \ No newline at end of file 139}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
index 6ccb646..072de5e 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
@@ -39,7 +39,7 @@ using System.Collections.Generic;
39using System.Diagnostics; 39using System.Diagnostics;
40using System.Threading; 40using System.Threading;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 /// <summary> 54 /// <summary>
@@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 /// <summary> 264 /// <summary>
267 /// Only called by the MainLoop. 265 /// Only called by the MainLoop.
268 /// </summary> 266 /// </summary>
269 private void UndoDid(CMModel model, CMView view, LLUUID uuid) 267 private void UndoDid(CMModel model, CMView view, UUID uuid)
270 { 268 {
271 if ((m_state & State.SHOWING_CHANGES) > 0) 269 if ((m_state & State.SHOWING_CHANGES) > 0)
272 { 270 {
@@ -289,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
289 m_WorkQueue.Enqueue(moreWork); 287 m_WorkQueue.Enqueue(moreWork);
290 } 288 }
291 289
292 protected void ObjectDuplicated(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID) 290 protected void ObjectDuplicated(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID)
293 { 291 {
294 Work moreWork = new Work(); 292 Work moreWork = new Work();
295 moreWork.Type = WorkType.OBJECTDUPLICATED; 293 moreWork.Type = WorkType.OBJECTDUPLICATED;
@@ -298,8 +296,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
298 m_log.Debug("[CONTENT MANAGEMENT] dup queue"); 296 m_log.Debug("[CONTENT MANAGEMENT] dup queue");
299 } 297 }
300 298
301 protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 299 protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
302 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 300 UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
303 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) 301 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates)
304 { 302 {
305 Work moreWork = new Work(); 303 Work moreWork = new Work();
@@ -318,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
318 m_log.Debug("[CONTENT MANAGEMENT] new client"); 316 m_log.Debug("[CONTENT MANAGEMENT] new client");
319 } 317 }
320 318
321 protected void OnUnDid(IClientAPI remoteClient, LLUUID primId) 319 protected void OnUnDid(IClientAPI remoteClient, UUID primId)
322 { 320 {
323 Work moreWork = new Work(); 321 Work moreWork = new Work();
324 moreWork.Type = WorkType.UNDODID; 322 moreWork.Type = WorkType.UNDODID;
@@ -405,7 +403,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
405 /// <summary> 403 /// <summary>
406 /// 404 ///
407 /// </summary> 405 /// </summary>
408 protected void StopManaging(LLUUID clientUUID) 406 protected void StopManaging(UUID clientUUID)
409 { 407 {
410 foreach(Object sceneobj in m_sceneList.Values) 408 foreach(Object sceneobj in m_sceneList.Values)
411 { 409 {
@@ -433,7 +431,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
433 } 431 }
434 } 432 }
435 433
436 protected void UpdateMultiplePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 434 protected void UpdateMultiplePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
437 { 435 {
438 Work moreWork = new Work(); 436 Work moreWork = new Work();
439 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 437 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -442,7 +440,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
442 m_log.Debug("[CONTENT MANAGEMENT] pos"); 440 m_log.Debug("[CONTENT MANAGEMENT] pos");
443 } 441 }
444 442
445 protected void UpdateMultipleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 443 protected void UpdateMultipleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
446 { 444 {
447 Work moreWork = new Work(); 445 Work moreWork = new Work();
448 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 446 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -451,7 +449,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
451 m_log.Debug("[CONTENT MANAGEMENT] rot"); 449 m_log.Debug("[CONTENT MANAGEMENT] rot");
452 } 450 }
453 451
454 protected void UpdateMultipleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 452 protected void UpdateMultipleScale(uint localID, Vector3 scale, IClientAPI remoteClient)
455 { 453 {
456 Work moreWork = new Work(); 454 Work moreWork = new Work();
457 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 455 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -460,8 +458,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
460 m_log.Debug("[CONTENT MANAGEMENT]scale"); 458 m_log.Debug("[CONTENT MANAGEMENT]scale");
461 } 459 }
462 460
463 protected void UpdateNewParts(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, 461 protected void UpdateNewParts(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape,
464 byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 462 byte bypassRaycast, Vector3 RayStart, UUID RayTargetID,
465 byte RayEndIsIntersection) 463 byte RayEndIsIntersection)
466 { 464 {
467 Work moreWork = new Work(); 465 Work moreWork = new Work();
@@ -471,7 +469,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
471 m_log.Debug("[CONTENT MANAGEMENT] new parts"); 469 m_log.Debug("[CONTENT MANAGEMENT] new parts");
472 } 470 }
473 471
474 protected void UpdateSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 472 protected void UpdateSinglePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
475 { 473 {
476 Work moreWork = new Work(); 474 Work moreWork = new Work();
477 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 475 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -483,7 +481,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
483 /// <summary> 481 /// <summary>
484 /// 482 ///
485 /// </summary> 483 /// </summary>
486 protected void UpdateSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 484 protected void UpdateSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
487 { 485 {
488 Work moreWork = new Work(); 486 Work moreWork = new Work();
489 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 487 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -492,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
492 m_log.Debug("[CONTENT MANAGEMENT] rot"); 490 m_log.Debug("[CONTENT MANAGEMENT] rot");
493 } 491 }
494 492
495 protected void UpdateSingleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 493 protected void UpdateSingleScale(uint localID, Vector3 scale, IClientAPI remoteClient)
496 { 494 {
497 Work moreWork = new Work(); 495 Work moreWork = new Work();
498 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 496 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -723,7 +721,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
723 public Object Data2; //Just more space for holding data. 721 public Object Data2; //Just more space for holding data.
724 public uint LocalId; //Convenient 722 public uint LocalId; //Convenient
725 public WorkType Type; 723 public WorkType Type;
726 public LLUUID UUID; //Convenient 724 public UUID UUID; //Convenient
727 725
728 #endregion Fields 726 #endregion Fields
729 } 727 }
@@ -745,4 +743,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
745 743
746 #endregion Other 744 #endregion Other
747 } 745 }
748} \ No newline at end of file 746}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
index 454429c..996badf 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
@@ -40,7 +40,7 @@ using System.Collections;
40using System.Collections.Generic; 40using System.Collections.Generic;
41using System.Threading; 41using System.Threading;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -52,8 +52,6 @@ using OpenSim.Region.Physics.Manager;
52 52
53using log4net; 53using log4net;
54 54
55using Axiom.Math;
56
57namespace OpenSim.Region.Environment.Modules.ContentManagement 55namespace OpenSim.Region.Environment.Modules.ContentManagement
58{ 56{
59 public class CMEntityCollection 57 public class CMEntityCollection
@@ -63,12 +61,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
63 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 61 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
64 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or 62 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or
65 // old versions of deleted SceneObjectGroups will be stored in this hash table. 63 // old versions of deleted SceneObjectGroups will be stored in this hash table.
66 // The LLUUID keys are from the SceneObjectGroup RootPart UUIDs 64 // The UUID keys are from the SceneObjectGroup RootPart UUIDs
67 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //LLUUID to ContentManagementEntity 65 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //UUID to ContentManagementEntity
68 66
69 // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable 67 // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable
70 // The LLUUID keys are from the SceneObjectPart that they are supposed to be on. 68 // The UUID keys are from the SceneObjectPart that they are supposed to be on.
71 protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //LLUUID to AuraMetaEntity 69 protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //UUID to AuraMetaEntity
72 70
73 #endregion Fields 71 #endregion Fields
74 72
@@ -151,7 +149,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
151 part.ParentGroup.Scene.PrimIDAllocate(), 149 part.ParentGroup.Scene.PrimIDAllocate(),
152 part.GetWorldPosition(), 150 part.GetWorldPosition(),
153 MetaEntity.TRANSLUCENT, 151 MetaEntity.TRANSLUCENT,
154 new LLVector3(0,254,0), 152 new Vector3(0,254,0),
155 part.Scale 153 part.Scale
156 ); 154 );
157 m_NewlyCreatedEntityAura.Add(part.UUID, ent); 155 m_NewlyCreatedEntityAura.Add(part.UUID, ent);
@@ -175,7 +173,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
175 return ent; 173 return ent;
176 } 174 }
177 175
178 public bool RemoveEntity(LLUUID uuid) 176 public bool RemoveEntity(UUID uuid)
179 { 177 {
180 if (!m_CMEntityHash.ContainsKey(uuid)) 178 if (!m_CMEntityHash.ContainsKey(uuid))
181 return false; 179 return false;
@@ -183,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
183 return true; 181 return true;
184 } 182 }
185 183
186 public bool RemoveNewlyCreatedEntityAura(LLUUID uuid) 184 public bool RemoveNewlyCreatedEntityAura(UUID uuid)
187 { 185 {
188 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid)) 186 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid))
189 return false; 187 return false;
@@ -193,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
193 191
194 #endregion Public Methods 192 #endregion Public Methods
195 } 193 }
196} \ No newline at end of file 194}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
index 92ae0d7..e1b4129 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
@@ -39,7 +39,7 @@ using System.Collections;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Diagnostics; 40using System.Diagnostics;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class CMModel 54 public class CMModel
@@ -133,14 +131,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
133 m_MetaEntityCollection.ClearAll(); 131 m_MetaEntityCollection.ClearAll();
134 } 132 }
135 133
136 public ContentManagementEntity FindMetaEntityAffectedByUndo(LLUUID uuid) 134 public ContentManagementEntity FindMetaEntityAffectedByUndo(UUID uuid)
137 { 135 {
138 ContentManagementEntity ent = GetMetaGroupByPrim(uuid); 136 ContentManagementEntity ent = GetMetaGroupByPrim(uuid);
139 return ent; 137 return ent;
140 } 138 }
141 139
142 //-------------------------------- HELPERS --------------------------------------------------------------------// 140 //-------------------------------- HELPERS --------------------------------------------------------------------//
143 public ContentManagementEntity GetMetaGroupByPrim(LLUUID uuid) 141 public ContentManagementEntity GetMetaGroupByPrim(UUID uuid)
144 { 142 {
145 foreach (Object ent in m_MetaEntityCollection.Entities.Values) 143 foreach (Object ent in m_MetaEntityCollection.Entities.Values)
146 { 144 {
@@ -194,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
194 SceneObjectGroup temp = null; 192 SceneObjectGroup temp = null;
195 System.Collections.Hashtable deleteListUUIDs = new Hashtable(); 193 System.Collections.Hashtable deleteListUUIDs = new Hashtable();
196// Dictionary<LLUUID, EntityBase> SearchList = new Dictionary<LLUUID,EntityBase>(); 194// Dictionary<LLUUID, EntityBase> SearchList = new Dictionary<LLUUID,EntityBase>();
197 Dictionary<LLUUID, EntityBase> ReplacementList = new Dictionary<LLUUID,EntityBase>(); 195 Dictionary<UUID, EntityBase> ReplacementList = new Dictionary<UUID,EntityBase>();
198 int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID); 196 int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID);
199// EntityBase[] searchArray; 197// EntityBase[] searchArray;
200 198
@@ -255,14 +253,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
255 break; 253 break;
256 } 254 }
257 255
258 foreach(LLUUID uuid in deleteListUUIDs.Keys) 256 foreach(UUID uuid in deleteListUUIDs.Keys)
259 { 257 {
260 try 258 try
261 { 259 {
262 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. 260 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles.
263 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); 261 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]);
264 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); 262 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor);
265 scene.SendKillObject(scene.Entities[uuid].LocalId); 263 scene.SendKiPrimitive(scene.Entities[uuid].LocalId);
266 scene.m_innerScene.DeleteSceneObject(uuid, false); 264 scene.m_innerScene.DeleteSceneObject(uuid, false);
267 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(); 265 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup();
268 } 266 }
@@ -284,7 +282,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
284 if (!(ent is SceneObjectGroup)) 282 if (!(ent is SceneObjectGroup))
285 continue; 283 continue;
286 284
287 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Phantom) == 0) 285 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0)
288 ((SceneObjectGroup)ent).ApplyPhysics(true); 286 ((SceneObjectGroup)ent).ApplyPhysics(true);
289 ((SceneObjectGroup)ent).AttachToBackup(); 287 ((SceneObjectGroup)ent).AttachToBackup();
290 ((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected. 288 ((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected.
@@ -346,7 +344,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
346 { 344 {
347 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) 345 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
348 { 346 {
349 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new LLVector3(0,254,0), part.Scale); 347 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new Vector3(0,254,0), part.Scale);
350 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition(); 348 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition();
351 auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]); 349 auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]);
352 } 350 }
@@ -356,4 +354,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
356 354
357 #endregion Public Methods 355 #endregion Public Methods
358 } 356 }
359} \ No newline at end of file 357}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
index fca2830..90ef6ef 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections; 39using System.Collections;
40using System.Collections.Generic; 40using System.Collections.Generic;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class CMView 54 public class CMView
@@ -136,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
136 SendSimChatMessage(scene, menu); 134 SendSimChatMessage(scene, menu);
137 } 135 }
138 136
139 public void DisplayMetaEntity(LLUUID uuid) 137 public void DisplayMetaEntity(UUID uuid)
140 { 138 {
141 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid); 139 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid);
142 if (group != null) 140 if (group != null)
@@ -199,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
199 197
200 public void SendSimChatMessage(Scene scene, string message) 198 public void SendSimChatMessage(Scene scene, string message)
201 { 199 {
202 scene.SimChat(Helpers.StringToField(message), 200 scene.SimChat(Utils.StringToBytes(message),
203 ChatTypeEnum.Broadcast, 0, new LLVector3(0,0,0), "Content Manager", LLUUID.Zero, false); 201 ChatTypeEnum.Broadcast, 0, new Vector3(0,0,0), "Content Manager", UUID.Zero, false);
204 } 202 }
205 203
206 #endregion Public Methods 204 #endregion Public Methods
207 } 205 }
208} \ No newline at end of file 206}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
index 8e0dd33..819ff87 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
@@ -38,7 +38,7 @@ using System;
38using System.Collections.Generic; 38using System.Collections.Generic;
39using System.Drawing; 39using System.Drawing;
40 40
41using libsecondlife; 41using OpenMetaverse;
42 42
43using Nini.Config; 43using Nini.Config;
44 44
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class ContentManagementEntity : MetaEntity 54 public class ContentManagementEntity : MetaEntity
@@ -64,8 +62,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
64 62
65 #region Fields 63 #region Fields
66 64
67 protected Dictionary<LLUUID, AuraMetaEntity> m_AuraEntities = new Dictionary<LLUUID, AuraMetaEntity>(); 65 protected Dictionary<UUID, AuraMetaEntity> m_AuraEntities = new Dictionary<UUID, AuraMetaEntity>();
68 protected Dictionary<LLUUID, BeamMetaEntity> m_BeamEntities = new Dictionary<LLUUID, BeamMetaEntity>(); 66 protected Dictionary<UUID, BeamMetaEntity> m_BeamEntities = new Dictionary<UUID, BeamMetaEntity>();
69 67
70 // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different. 68 // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different.
71 // This can come in handy. 69 // This can come in handy.
@@ -108,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
108 /// <summary> 106 /// <summary>
109 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid. 107 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid.
110 /// </summary> 108 /// </summary>
111 private bool ContainsKey(List<EntityBase> list, LLUUID uuid) 109 private bool ContainsKey(List<EntityBase> list, UUID uuid)
112 { 110 {
113 foreach( EntityBase part in list) 111 foreach( EntityBase part in list)
114 if (part.UUID == uuid) 112 if (part.UUID == uuid)
@@ -116,7 +114,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
116 return false; 114 return false;
117 } 115 }
118 116
119 private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List<EntityBase> list, LLUUID uuid) 117 private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List<EntityBase> list, UUID uuid)
120 { 118 {
121 foreach (EntityBase ent in list) 119 foreach (EntityBase ent in list)
122 { 120 {
@@ -150,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
150 // if already displaying a red aura over part, make sure its red 148 // if already displaying a red aura over part, make sure its red
151 if (m_AuraEntities.ContainsKey(part.UUID)) 149 if (m_AuraEntities.ContainsKey(part.UUID))
152 { 150 {
153 m_AuraEntities[part.UUID].SetAura(new LLVector3(254,0,0), part.Scale); 151 m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
154 } 152 }
155 else 153 else
156 { 154 {
@@ -158,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
158 m_Entity.Scene.PrimIDAllocate(), 156 m_Entity.Scene.PrimIDAllocate(),
159 part.GetWorldPosition(), 157 part.GetWorldPosition(),
160 MetaEntity.TRANSLUCENT, 158 MetaEntity.TRANSLUCENT,
161 new LLVector3(254,0,0), 159 new Vector3(254,0,0),
162 part.Scale 160 part.Scale
163 ); 161 );
164 m_AuraEntities.Add(part.UUID, auraGroup); 162 m_AuraEntities.Add(part.UUID, auraGroup);
@@ -189,7 +187,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
189 /// <summary> 187 /// <summary>
190 /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID. 188 /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID.
191 /// </summary> 189 /// </summary>
192 public bool HasChildPrim(LLUUID uuid) 190 public bool HasChildPrim(UUID uuid)
193 { 191 {
194 if (m_UnchangedEntity.Children.ContainsKey(uuid)) 192 if (m_UnchangedEntity.Children.ContainsKey(uuid))
195 return true; 193 return true;
@@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 m_UnchangedEntity.RootPart.GetWorldPosition(), 264 m_UnchangedEntity.RootPart.GetWorldPosition(),
267 MetaEntity.TRANSLUCENT, 265 MetaEntity.TRANSLUCENT,
268 sceneEntityPart, 266 sceneEntityPart,
269 new LLVector3(0,0,254) 267 new Vector3(0,0,254)
270 ); 268 );
271 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup); 269 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
272 } 270 }
@@ -280,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
280 m_Entity.Scene.PrimIDAllocate(), 278 m_Entity.Scene.PrimIDAllocate(),
281 UnchangedPart.GetWorldPosition(), 279 UnchangedPart.GetWorldPosition(),
282 MetaEntity.TRANSLUCENT, 280 MetaEntity.TRANSLUCENT,
283 new LLVector3(0,0,254), 281 new Vector3(0,0,254),
284 UnchangedPart.Scale 282 UnchangedPart.Scale
285 ); 283 );
286 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 284 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
@@ -314,7 +312,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
314 m_Entity.Scene.PrimIDAllocate(), 312 m_Entity.Scene.PrimIDAllocate(),
315 UnchangedPart.GetWorldPosition(), 313 UnchangedPart.GetWorldPosition(),
316 MetaEntity.TRANSLUCENT, 314 MetaEntity.TRANSLUCENT,
317 new LLVector3(254,0,0), 315 new Vector3(254,0,0),
318 UnchangedPart.Scale 316 UnchangedPart.Scale
319 ); 317 );
320 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 318 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
@@ -386,4 +384,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
386 384
387 #endregion Public Methods 385 #endregion Public Methods
388 } 386 }
389} \ No newline at end of file 387}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
index d5423e0..85eb927 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
@@ -36,7 +36,7 @@ using System;
36using System.Collections.Generic; 36using System.Collections.Generic;
37using System.Threading; 37using System.Threading;
38 38
39using libsecondlife; 39using OpenMetaverse;
40 40
41using Nini.Config; 41using Nini.Config;
42 42
@@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager;
48 48
49using log4net; 49using log4net;
50 50
51using Axiom.Math;
52
53namespace OpenSim.Region.Environment.Modules.ContentManagement 51namespace OpenSim.Region.Environment.Modules.ContentManagement
54{ 52{
55 public class ContentManagementModule : IRegionModule 53 public class ContentManagementModule : IRegionModule
@@ -162,4 +160,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
162 160
163 #endregion Public Methods 161 #endregion Public Methods
164 } 162 }
165} \ No newline at end of file 163}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
index c675365..66d279a 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
@@ -40,7 +40,7 @@ using Slash = System.IO.Path;
40using System.Reflection; 40using System.Reflection;
41using System.Xml; 41using System.Xml;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -53,8 +53,6 @@ using OpenSim.Region.Physics.Manager;
53 53
54using log4net; 54using log4net;
55 55
56using Axiom.Math;
57
58namespace OpenSim.Region.Environment.Modules.ContentManagement 56namespace OpenSim.Region.Environment.Modules.ContentManagement
59{ 57{
60 public class FileSystemDatabase : IContentDatabase 58 public class FileSystemDatabase : IContentDatabase
@@ -70,8 +68,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
70 #region Fields 68 #region Fields
71 69
72 private string m_repodir = null; 70 private string m_repodir = null;
73 private Dictionary<LLUUID, Scene> m_scenes = new Dictionary<LLUUID, Scene>(); 71 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
74 private Dictionary<LLUUID, IRegionSerialiser> m_serialiser = new Dictionary<LLUUID, IRegionSerialiser>(); 72 private Dictionary<UUID, IRegionSerialiser> m_serialiser = new Dictionary<UUID, IRegionSerialiser>();
75 73
76 #endregion Fields 74 #endregion Fields
77 75
@@ -92,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
92 if (!Directory.Exists(m_repodir)) 90 if (!Directory.Exists(m_repodir))
93 Directory.CreateDirectory(m_repodir); 91 Directory.CreateDirectory(m_repodir);
94 92
95 foreach (LLUUID region in m_scenes.Keys) 93 foreach (UUID region in m_scenes.Keys)
96 { 94 {
97 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; 95 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
98 if (!Directory.Exists(scenedir)) 96 if (!Directory.Exists(scenedir))
@@ -104,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
104 private void SetupSerialiser() 102 private void SetupSerialiser()
105 { 103 {
106 if (m_serialiser.Count == 0) 104 if (m_serialiser.Count == 0)
107 foreach(LLUUID region in m_scenes.Keys) 105 foreach(UUID region in m_scenes.Keys)
108 m_serialiser.Add(region, 106 m_serialiser.Add(region,
109 m_scenes[region].RequestModuleInterface<IRegionSerialiser>() 107 m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
110 ); 108 );
@@ -114,12 +112,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
114 112
115 #region Public Methods 113 #region Public Methods
116 114
117 public int GetMostRecentRevision(LLUUID regionid) 115 public int GetMostRecentRevision(UUID regionid)
118 { 116 {
119 return NumOfRegionRev(regionid); 117 return NumOfRegionRev(regionid);
120 } 118 }
121 119
122 public string GetRegionObjectHeightMap(LLUUID regionid) 120 public string GetRegionObjectHeightMap(UUID regionid)
123 { 121 {
124 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 122 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
125 Slash.DirectorySeparatorChar + "heightmap.r32"; 123 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -131,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
131 return result; 129 return result;
132 } 130 }
133 131
134 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 132 public string GetRegionObjectHeightMap(UUID regionid, int revision)
135 { 133 {
136 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 134 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
137 Slash.DirectorySeparatorChar + "heightmap.r32"; 135 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -143,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
143 return result; 141 return result;
144 } 142 }
145 143
146 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 144 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
147 { 145 {
148 System.Collections.ArrayList objectList = new System.Collections.ArrayList(); 146 System.Collections.ArrayList objectList = new System.Collections.ArrayList();
149 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + 147 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
@@ -169,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
169 return null; 167 return null;
170 } 168 }
171 169
172 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 170 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
173 { 171 {
174 int revision = NumOfRegionRev(regionid); 172 int revision = NumOfRegionRev(regionid);
175 m_log.Info("[FSDB]: found revisions:" + revision); 173 m_log.Info("[FSDB]: found revisions:" + revision);
@@ -215,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
215 m_scenes.Add(scene.RegionInfo.RegionID, scene); 213 m_scenes.Add(scene.RegionInfo.RegionID, scene);
216 } 214 }
217 215
218 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID regionid) 216 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
219 { 217 {
220 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>(); 218 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>();
221 219
@@ -244,7 +242,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
244 return revisionDict; 242 return revisionDict;
245 } 243 }
246 244
247 public int NumOfRegionRev(LLUUID regionid) 245 public int NumOfRegionRev(UUID regionid)
248 { 246 {
249 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 247 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
250 m_log.Info("[FSDB]: Reading scene dir: " + scenedir); 248 m_log.Info("[FSDB]: Reading scene dir: " + scenedir);
@@ -261,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
261 CreateDirectory(); 259 CreateDirectory();
262 } 260 }
263 261
264 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 262 public void SaveRegion(UUID regionid, string regionName, string logMessage)
265 { 263 {
266 m_log.Info("[FSDB]: ..............................."); 264 m_log.Info("[FSDB]: ...............................");
267 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 265 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
@@ -311,4 +309,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
311 309
312 #endregion Public Methods 310 #endregion Public Methods
313 } 311 }
314} \ No newline at end of file 312}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
index 6417a0f..9fd542c 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
@@ -41,7 +41,7 @@ using Slash = System.IO.Path;
41using System.Reflection; 41using System.Reflection;
42using System.Xml; 42using System.Xml;
43 43
44using libsecondlife; 44using OpenMetaverse;
45 45
46using Nini.Config; 46using Nini.Config;
47 47
@@ -54,8 +54,6 @@ using OpenSim.Region.Physics.Manager;
54 54
55using log4net; 55using log4net;
56 56
57using Axiom.Math;
58
59namespace OpenSim.Region.Environment.Modules.ContentManagement 57namespace OpenSim.Region.Environment.Modules.ContentManagement
60{ 58{
61 /// <summary> 59 /// <summary>
@@ -73,57 +71,57 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
73 71
74 #region Public Methods 72 #region Public Methods
75 73
76 public SceneObjectGroup GetMostRecentObjectRevision(LLUUID id) 74 public SceneObjectGroup GetMostRecentObjectRevision(UUID id)
77 { 75 {
78 return null; 76 return null;
79 } 77 }
80 78
81 public int GetMostRecentRevision(LLUUID regionid) 79 public int GetMostRecentRevision(UUID regionid)
82 { 80 {
83 return 0; 81 return 0;
84 } 82 }
85 83
86 public SceneObjectGroup GetObjectRevision(LLUUID id, int revision) 84 public SceneObjectGroup GetObjectRevision(UUID id, int revision)
87 { 85 {
88 return null; 86 return null;
89 } 87 }
90 88
91 public System.Collections.ArrayList GetObjectsFromRegion(LLUUID regionid, int revision) 89 public System.Collections.ArrayList GetObjectsFromRegion(UUID regionid, int revision)
92 { 90 {
93 return null; 91 return null;
94 } 92 }
95 93
96 public string GetRegionObjectHeightMap(LLUUID regionid) 94 public string GetRegionObjectHeightMap(UUID regionid)
97 { 95 {
98 return null; 96 return null;
99 } 97 }
100 98
101 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 99 public string GetRegionObjectHeightMap(UUID regionid, int revision)
102 { 100 {
103 return null; 101 return null;
104 } 102 }
105 103
106 public string GetRegionObjectXML(LLUUID regionid) 104 public string GetRegionObjectXML(UUID regionid)
107 { 105 {
108 return null; 106 return null;
109 } 107 }
110 108
111 public string GetRegionObjectXML(LLUUID regionid, int revision) 109 public string GetRegionObjectXML(UUID regionid, int revision)
112 { 110 {
113 return null; 111 return null;
114 } 112 }
115 113
116 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 114 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
117 { 115 {
118 return null; 116 return null;
119 } 117 }
120 118
121 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 119 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
122 { 120 {
123 return null; 121 return null;
124 } 122 }
125 123
126 public bool InRepository(LLUUID id) 124 public bool InRepository(UUID id)
127 { 125 {
128 return false; 126 return false;
129 } 127 }
@@ -132,22 +130,22 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
132 { 130 {
133 } 131 }
134 132
135 public System.Collections.Generic.SortedDictionary<string, string> ListOfObjectRevisions(LLUUID id) 133 public System.Collections.Generic.SortedDictionary<string, string> ListOfObjectRevisions(UUID id)
136 { 134 {
137 return null; 135 return null;
138 } 136 }
139 137
140 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID id) 138 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID id)
141 { 139 {
142 return null; 140 return null;
143 } 141 }
144 142
145 public int NumOfObjectRev(LLUUID id) 143 public int NumOfObjectRev(UUID id)
146 { 144 {
147 return 0; 145 return 0;
148 } 146 }
149 147
150 public int NumOfRegionRev(LLUUID regionid) 148 public int NumOfRegionRev(UUID regionid)
151 { 149 {
152 return 0; 150 return 0;
153 } 151 }
@@ -160,10 +158,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 { 158 {
161 } 159 }
162 160
163 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 161 public void SaveRegion(UUID regionid, string regionName, string logMessage)
164 { 162 {
165 } 163 }
166 164
167 #endregion Public Methods 165 #endregion Public Methods
168 } 166 }
169} \ No newline at end of file 167}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
index 6a940d3..638172b 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
@@ -36,11 +36,8 @@
36#endregion Header 36#endregion Header
37 37
38using System; 38using System;
39 39using OpenMetaverse;
40using libsecondlife;
41
42using OpenSim.Region.Environment.Scenes; 40using OpenSim.Region.Environment.Scenes;
43
44using Nini.Config; 41using Nini.Config;
45 42
46namespace OpenSim.Region.Environment.Modules.ContentManagement 43namespace OpenSim.Region.Environment.Modules.ContentManagement
@@ -52,18 +49,18 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
52 /// <summary> 49 /// <summary>
53 /// Returns the most recent revision number of a region. 50 /// Returns the most recent revision number of a region.
54 /// </summary> 51 /// </summary>
55 int GetMostRecentRevision(LLUUID regionid); 52 int GetMostRecentRevision(UUID regionid);
56 53
57 string GetRegionObjectHeightMap(LLUUID regionid); 54 string GetRegionObjectHeightMap(UUID regionid);
58 55
59 string GetRegionObjectHeightMap(LLUUID regionid, int revision); 56 string GetRegionObjectHeightMap(UUID regionid, int revision);
60 57
61 /// <summary> 58 /// <summary>
62 /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region. 59 /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region.
63 /// </summary> 60 /// </summary>
64 System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid); 61 System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid);
65 62
66 System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision); 63 System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision);
67 64
68 /// <summary> 65 /// <summary>
69 /// Similar to the IRegionModule function. This is the function to be called before attempting to interface with the database. 66 /// Similar to the IRegionModule function. This is the function to be called before attempting to interface with the database.
@@ -75,12 +72,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
75 /// <summary> 72 /// <summary>
76 /// Returns a list of the revision numbers and corresponding log messages for a given region. 73 /// Returns a list of the revision numbers and corresponding log messages for a given region.
77 /// </summary> 74 /// </summary>
78 System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID id); 75 System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID id);
79 76
80 /// <summary> 77 /// <summary>
81 /// Returns the total number of revisions saved for a specific region. 78 /// Returns the total number of revisions saved for a specific region.
82 /// </summary> 79 /// </summary>
83 int NumOfRegionRev(LLUUID regionid); 80 int NumOfRegionRev(UUID regionid);
84 81
85 /// <summary> 82 /// <summary>
86 /// Should be called once after Initialise has been called. 83 /// Should be called once after Initialise has been called.
@@ -90,8 +87,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
90 /// <summary> 87 /// <summary>
91 /// Saves the Region terrain map and objects within the region as xml to the database. 88 /// Saves the Region terrain map and objects within the region as xml to the database.
92 /// </summary> 89 /// </summary>
93 void SaveRegion(LLUUID regionid, string regionName, string logMessage); 90 void SaveRegion(UUID regionid, string regionName, string logMessage);
94 91
95 #endregion Methods 92 #endregion Methods
96 } 93 }
97} \ No newline at end of file 94}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
index 4823bfd..5a6dbc8 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class MetaEntity 55 public class MetaEntity
@@ -109,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
109 107
110 #region Public Properties 108 #region Public Properties
111 109
112 public Dictionary<LLUUID, SceneObjectPart> Children 110 public Dictionary<UUID, SceneObjectPart> Children
113 { 111 {
114 get { return m_Entity.Children; } 112 get { return m_Entity.Children; }
115 set { m_Entity.Children = value; } 113 set { m_Entity.Children = value; }
@@ -142,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
142 get { return m_Entity.Scene; } 140 get { return m_Entity.Scene; }
143 } 141 }
144 142
145 public LLUUID UUID 143 public UUID UUID
146 { 144 {
147 get { return m_Entity.UUID; } 145 get { return m_Entity.UUID; }
148 set { m_Entity.UUID = value; } 146 set { m_Entity.UUID = value; }
@@ -161,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
161 protected void Initialize(bool physics) 159 protected void Initialize(bool physics)
162 { 160 {
163 //make new uuids 161 //make new uuids
164 Dictionary<LLUUID, SceneObjectPart> parts = new Dictionary<LLUUID, SceneObjectPart>(); 162 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
165 foreach(SceneObjectPart part in m_Entity.Children.Values) 163 foreach(SceneObjectPart part in m_Entity.Children.Values)
166 { 164 {
167 part.ResetIDs(part.LinkNum); 165 part.ResetIDs(part.LinkNum);
@@ -191,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
191 //This is important because we are not IN any database. 189 //This is important because we are not IN any database.
192 //m_Entity.FakeDeleteGroup(); 190 //m_Entity.FakeDeleteGroup();
193 foreach( SceneObjectPart part in m_Entity.Children.Values) 191 foreach( SceneObjectPart part in m_Entity.Children.Values)
194 client.SendKillObject(m_Entity.RegionHandle, part.LocalId); 192 client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
195 } 193 }
196 194
197 /// <summary> 195 /// <summary>
@@ -201,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
201 { 199 {
202 foreach( SceneObjectPart part in m_Entity.Children.Values) 200 foreach( SceneObjectPart part in m_Entity.Children.Values)
203 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) 201 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
204 { controller.SendKillObject(m_Entity.RegionHandle, part.LocalId); } 202 { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
205 ); 203 );
206 } 204 }
207 205
@@ -237,12 +235,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
237 /// </param> 235 /// </param>
238 public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount) 236 public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount)
239 { 237 {
240 LLObject.TextureEntry tex = null; 238 Primitive.TextureEntry tex = null;
241 LLColor texcolor; 239 Color4 texcolor;
242 try 240 try
243 { 241 {
244 tex = part.Shape.Textures; 242 tex = part.Shape.Textures;
245 texcolor = new LLColor(); 243 texcolor = new Color4();
246 } 244 }
247 catch(Exception) 245 catch(Exception)
248 { 246 {
@@ -280,4 +278,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
280 278
281 #endregion Public Methods 279 #endregion Public Methods
282 } 280 }
283} \ No newline at end of file 281}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index cafc2bf..b0c6955 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,22 +50,20 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class PointMetaEntity : MetaEntity 55 public class PointMetaEntity : MetaEntity
58 { 56 {
59 #region Constructors 57 #region Constructors
60 58
61 public PointMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency) 59 public PointMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency)
62 : base() 60 : base()
63 { 61 {
64 CreatePointEntity(scene, LLUUID.Random(), LocalId, groupPos); 62 CreatePointEntity(scene, UUID.Random(), LocalId, groupPos);
65 SetPartTransparency(m_Entity.RootPart, transparency); 63 SetPartTransparency(m_Entity.RootPart, transparency);
66 } 64 }
67 65
68 public PointMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency) 66 public PointMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency)
69 : base() 67 : base()
70 { 68 {
71 CreatePointEntity(scene, uuid, LocalId, groupPos); 69 CreatePointEntity(scene, uuid, LocalId, groupPos);
@@ -76,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
76 74
77 #region Private Methods 75 #region Private Methods
78 76
79 private void CreatePointEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos) 77 private void CreatePointEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos)
80 { 78 {
81 SceneObjectGroup x = new SceneObjectGroup(); 79 SceneObjectGroup x = new SceneObjectGroup();
82 SceneObjectPart y = new SceneObjectPart(); 80 SceneObjectPart y = new SceneObjectPart();
@@ -85,23 +83,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
85 y.Name = "Very Small Point"; 83 y.Name = "Very Small Point";
86 y.RegionHandle = scene.RegionInfo.RegionHandle; 84 y.RegionHandle = scene.RegionInfo.RegionHandle;
87 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 85 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
88 y.OwnerID = LLUUID.Zero; 86 y.OwnerID = UUID.Zero;
89 y.CreatorID = LLUUID.Zero; 87 y.CreatorID = UUID.Zero;
90 y.LastOwnerID = LLUUID.Zero; 88 y.LastOwnerID = UUID.Zero;
91 y.UUID = uuid; 89 y.UUID = uuid;
92 90
93 y.LocalId = LocalId; 91 y.LocalId = LocalId;
94 92
95 y.Shape = PrimitiveBaseShape.CreateBox(); 93 y.Shape = PrimitiveBaseShape.CreateBox();
96 y.Scale = new LLVector3(0.01f,0.01f,0.01f); 94 y.Scale = new Vector3(0.01f,0.01f,0.01f);
97 y.LastOwnerID = LLUUID.Zero; 95 y.LastOwnerID = UUID.Zero;
98 y.GroupPosition = groupPos; 96 y.GroupPosition = groupPos;
99 y.OffsetPosition = new LLVector3(0, 0, 0); 97 y.OffsetPosition = new Vector3(0, 0, 0);
100 y.RotationOffset = new LLQuaternion(0,0,0,0); 98 y.RotationOffset = new Quaternion(0,0,0,0);
101 y.Velocity = new LLVector3(0, 0, 0); 99 y.Velocity = new Vector3(0, 0, 0);
102 y.RotationalVelocity = new LLVector3(0, 0, 0); 100 y.RotationalVelocity = new Vector3(0, 0, 0);
103 y.AngularVelocity = new LLVector3(0, 0, 0); 101 y.AngularVelocity = new Vector3(0, 0, 0);
104 y.Acceleration = new LLVector3(0, 0, 0); 102 y.Acceleration = new Vector3(0, 0, 0);
105 103
106 y.Flags = 0; 104 y.Flags = 0;
107 y.TrimPermissions(); 105 y.TrimPermissions();
@@ -121,4 +119,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
121 119
122 #endregion Private Methods 120 #endregion Private Methods
123 } 121 }
124} \ No newline at end of file 122}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
index 38938c6..ba937f5 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
@@ -37,7 +37,7 @@ using System.Collections.Generic;
37using System.Diagnostics; 37using System.Diagnostics;
38using System.Drawing; 38using System.Drawing;
39 39
40using libsecondlife; 40using OpenMetaverse;
41 41
42using Nini.Config; 42using Nini.Config;
43 43
@@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager;
48 48
49using log4net; 49using log4net;
50 50
51using Axiom.Math;
52
53namespace OpenSim.Region.Environment.Modules.ContentManagement 51namespace OpenSim.Region.Environment.Modules.ContentManagement
54{ 52{
55 #region Enumerations 53 #region Enumerations
@@ -99,14 +97,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
99 97
100 #region Private Methods 98 #region Private Methods
101 99
102 private static bool AreQuaternionsEquivalent(LLQuaternion first, LLQuaternion second) 100 private static bool AreQuaternionsEquivalent(Quaternion first, Quaternion second)
103 { 101 {
104 LLVector3 firstVector = llRot2Euler(first); 102 Vector3 firstVector = llRot2Euler(first);
105 LLVector3 secondVector = llRot2Euler(second); 103 Vector3 secondVector = llRot2Euler(second);
106 return AreVectorsEquivalent(firstVector, secondVector); 104 return AreVectorsEquivalent(firstVector, secondVector);
107 } 105 }
108 106
109 private static bool AreVectorsEquivalent(LLVector3 first, LLVector3 second) 107 private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
110 { 108 {
111 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2) 109 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
112 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2) 110 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2)
@@ -133,21 +131,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
133 131
134 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs 132 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
135 // Also changed the original function from LSL_Types to LL types 133 // Also changed the original function from LSL_Types to LL types
136 private static LLVector3 llRot2Euler(LLQuaternion r) 134 private static Vector3 llRot2Euler(Quaternion r)
137 { 135 {
138 LLQuaternion t = new LLQuaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); 136 Quaternion t = new Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W);
139 double m = (t.X + t.Y + t.Z + t.W); 137 double m = (t.X + t.Y + t.Z + t.W);
140 if (m == 0) return new LLVector3(); 138 if (m == 0) return new Vector3();
141 double n = 2 * (r.Y * r.W + r.X * r.Z); 139 double n = 2 * (r.Y * r.W + r.X * r.Z);
142 double p = m * m - n * n; 140 double p = m * m - n * n;
143 if (p > 0) 141 if (p > 0)
144 return new LLVector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))), 142 return new Vector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))),
145 (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), 143 (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))),
146 (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W)))); 144 (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W))));
147 else if (n > 0) 145 else if (n > 0)
148 return new LLVector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); 146 return new Vector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z)));
149 else 147 else
150 return new LLVector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); 148 return new Vector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z)));
151 } 149 }
152 150
153 #endregion Private Methods 151 #endregion Private Methods
@@ -187,7 +185,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
187 result |= Diff.ROTATIONOFFSET; 185 result |= Diff.ROTATIONOFFSET;
188 186
189 187
190 // MISC COMPARISONS (LLUUID, Byte) 188 // MISC COMPARISONS (UUID, Byte)
191 if(first.ClickAction != second.ClickAction) 189 if(first.ClickAction != second.ClickAction)
192 result |= Diff.CLICKACTION; 190 result |= Diff.CLICKACTION;
193 if(first.ObjectOwner != second.ObjectOwner) 191 if(first.ObjectOwner != second.ObjectOwner)
@@ -217,4 +215,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
217 215
218 #endregion Public Methods 216 #endregion Public Methods
219 } 217 }
220} \ No newline at end of file 218}