本文整理匯總了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;
}