mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
* 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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user