public Copy ( uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed ) : |
||
localID | uint | |
AgentID | UUID | |
GroupID | UUID | |
linkNum | int | |
userExposed | bool | True if the duplicate will immediately be in the scene, false otherwise |
return |
/// <summary> /// Copy the given part as the root part of this scene object. /// </summary> /// <param name="part"></param> /// <param name="cAgentID"></param> /// <param name="cGroupID"></param> public void CopyRootPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) { SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, 0, userExposed)); }
/// <summary> /// Make a copy of the given part. /// </summary> /// <param name="part"></param> /// <param name="cAgentID"></param> /// <param name="cGroupID"></param> public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) { SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed); AddPart(newPart); SetPartAsNonRoot(newPart); return newPart; }
/// <summary> /// Copy the given part as the root part of this scene object. /// </summary> /// <param name="part"></param> /// <param name="cAgentID"></param> /// <param name="cGroupID"></param> public void CopyRootPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) { SceneObjectPart newpart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, 0, userExposed); // SceneObjectPart newpart = part.Copy(part.LocalId, OwnerID, GroupID, 0, userExposed); // newpart.LocalId = m_scene.AllocateLocalId(); SetRootPart(newpart); if (userExposed) RootPart.Velocity = Vector3.Zero; // In case source is moving }
/// <summary> /// Make a copy of the given part. /// </summary> /// <param name="part"></param> /// <param name="cAgentID"></param> /// <param name="cGroupID"></param> public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed, bool serializePhysicsState) { SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed, serializePhysicsState); if (userExposed) { newPart.SetParentAndUpdatePhysics(this); } else { newPart.SetParent(this); } lock (m_parts) { m_parts.Add(newPart.UUID, newPart); this.TrackLocalId(newPart, newPart.LocalId); // newPart.ParentGroup.ServerWeight is updated by the caller (Copy) } SetPartAsNonRoot(newPart); return newPart; }
public void CopyRootPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed, bool serializePhysicsState) { SceneObjectPart dupe = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed, serializePhysicsState); SetRootPart(dupe); }
/// <summary> /// Copy the given part as the root part of this scene object. /// </summary> /// <param name="part"></param> /// <param name="cAgentID"></param> /// <param name="cGroupID"></param> public void CopyRootPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed, bool ChangeScripts) { SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed, ChangeScripts)); }
/// <summary> /// Make a copy of the given part. /// </summary> /// <param name="part"></param> /// <param name="cAgentID"></param> /// <param name="cGroupID"></param> public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed, bool serializePhysicsState) { SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_childParts.Count, userExposed, serializePhysicsState); if (userExposed) { newPart.SetParentAndUpdatePhysics(this); } else { newPart.SetParent(this, true); } m_childParts.AddPart(newPart); SetPartAsNonRoot(newPart); return newPart; }