本文整理汇总了C#中OpenSim.Region.Framework.Scenes.SceneObjectPart.Copy方法的典型用法代码示例。如果您正苦于以下问题:C# SceneObjectPart.Copy方法的具体用法?C# SceneObjectPart.Copy怎么用?C# SceneObjectPart.Copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.Framework.Scenes.SceneObjectPart
的用法示例。
在下文中一共展示了SceneObjectPart.Copy方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyRootPart
/// <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));
}
示例2: CopyPart
/// <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;
}
示例3: CopyRootPart
/// <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
}
示例4: CopyPart
/// <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;
}
示例5: CopyRootPart
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);
}
示例6: CopyRootPart
/// <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));
}
示例7: CopyPart
/// <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;
}