aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObject.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObject.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject.cs
index 452502b..2b80d57 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObject.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObject.cs
@@ -78,6 +78,15 @@ namespace OpenSim.Region.Environment.Scenes
78 /// <summary> 78 /// <summary>
79 /// 79 ///
80 /// </summary> 80 /// </summary>
81 /// <remarks>Need a null constructor for duplication</remarks>
82 public SceneObject()
83 {
84
85 }
86
87 /// <summary>
88 ///
89 /// </summary>
81 /// <param name="addPacket"></param> 90 /// <param name="addPacket"></param>
82 /// <param name="agentID"></param> 91 /// <param name="agentID"></param>
83 /// <param name="localID"></param> 92 /// <param name="localID"></param>
@@ -100,6 +109,25 @@ namespace OpenSim.Region.Environment.Scenes
100 /// <summary> 109 /// <summary>
101 /// 110 ///
102 /// </summary> 111 /// </summary>
112 /// <returns>A complete copy of the object</returns>
113 public SceneObject Copy()
114 {
115 SceneObject dupe = new SceneObject();
116
117 Primitive newRoot = this.rootPrimitive.Copy((EntityBase)dupe, dupe);
118
119 foreach (EntityBase child in this.children)
120 {
121 EntityBase newChild = child.Copy();
122 dupe.children.Add(newChild);
123 }
124
125 return dupe;
126 }
127
128 /// <summary>
129 ///
130 /// </summary>
103 public void DeleteAllChildren() 131 public void DeleteAllChildren()
104 { 132 {
105 this.children.Clear(); 133 this.children.Clear();