* Begun work on Primitive Duplication. Not hooked up yet, but theoretically could be done so. In practice, more work needs to be done.

This commit is contained in:
Adam Frisby
2007-07-09 15:29:39 +00:00
parent f62b7f3d1e
commit e8acf1cca9
8 changed files with 140 additions and 2 deletions

View File

@@ -75,6 +75,15 @@ namespace OpenSim.Region.Environment.Scenes
this.CreateRootFromPacket(addPacket, ownerID, localID);
}
/// <summary>
///
/// </summary>
/// <remarks>Need a null constructor for duplication</remarks>
public SceneObject()
{
}
/// <summary>
///
/// </summary>
@@ -97,6 +106,25 @@ namespace OpenSim.Region.Environment.Scenes
}
/// <summary>
///
/// </summary>
/// <returns>A complete copy of the object</returns>
public SceneObject Copy()
{
SceneObject dupe = new SceneObject();
Primitive newRoot = this.rootPrimitive.Copy((EntityBase)dupe, dupe);
foreach (EntityBase child in this.children)
{
EntityBase newChild = child.Copy();
dupe.children.Add(newChild);
}
return dupe;
}
/// <summary>
///
/// </summary>