aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Primitive.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-07-09 15:29:39 +0000
committerAdam Frisby2007-07-09 15:29:39 +0000
commite8acf1cca92592fea38208dbfe4137555431434d (patch)
tree4d8b6353f1baab805b17caec835d93ee0ef6817e /OpenSim/Region/Environment/Scenes/Primitive.cs
parent* reverted rev 1200 waiting for info re animations.xml (diff)
downloadopensim-SC-e8acf1cca92592fea38208dbfe4137555431434d.zip
opensim-SC-e8acf1cca92592fea38208dbfe4137555431434d.tar.gz
opensim-SC-e8acf1cca92592fea38208dbfe4137555431434d.tar.bz2
opensim-SC-e8acf1cca92592fea38208dbfe4137555431434d.tar.xz
* Begun work on Primitive Duplication. Not hooked up yet, but theoretically could be done so. In practice, more work needs to be done.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Primitive.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Primitive.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs
index 9d01618..8d31d63 100644
--- a/OpenSim/Region/Environment/Scenes/Primitive.cs
+++ b/OpenSim/Region/Environment/Scenes/Primitive.cs
@@ -141,8 +141,43 @@ namespace OpenSim.Region.Environment.Scenes
141 this.CreateFromPacket(addPacket, ownerID, localID); 141 this.CreateFromPacket(addPacket, ownerID, localID);
142 this.rotation = Axiom.Math.Quaternion.Identity; 142 this.rotation = Axiom.Math.Quaternion.Identity;
143 } 143 }
144
145 /// <summary>
146 ///
147 /// </summary>
148 /// <remarks>Empty constructor for duplication</remarks>
149 public Primitive()
150 {
151
152 }
153
144 #endregion 154 #endregion
145 155
156 #region Duplication
157
158 public Primitive Copy(EntityBase parent, SceneObject rootParent)
159 {
160 Primitive dupe = (Primitive)this.MemberwiseClone();
161 // TODO: Copy this properly.
162 dupe.inventoryItems = this.inventoryItems;
163 dupe.m_Parent = parent;
164 dupe.m_RootParent = rootParent;
165 // TODO: Copy this properly.
166 dupe.m_Shape = this.m_Shape;
167
168 uint newLocalID = this.m_world.PrimIDAllocate();
169 dupe.LocalId = newLocalID;
170
171 dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z);
172 dupe.rotation = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z);
173 dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z);
174
175 return dupe;
176 }
177
178 #endregion
179
180
146 #region Override from EntityBase 181 #region Override from EntityBase
147 /// <summary> 182 /// <summary>
148 /// 183 ///