diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Primitive.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Primitive.cs | 35 |
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 | /// |