當前位置: 首頁>>代碼示例>>C#>>正文


C# SceneObjectPart.Copy方法代碼示例

本文整理匯總了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));
 }
開發者ID:justasabc,項目名稱:opensim75grid,代碼行數:10,代碼來源:SceneObjectGroup.cs

示例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;
        }
開發者ID:justasabc,項目名稱:opensim75grid,代碼行數:14,代碼來源:SceneObjectGroup.cs

示例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
        }
開發者ID:emperorstarfinder,項目名稱:Opensim2,代碼行數:16,代碼來源:SceneObjectGroup.cs

示例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;
        }
開發者ID:zwagoth,項目名稱:halcyon,代碼行數:30,代碼來源:SceneObjectGroup.cs

示例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);
 }
開發者ID:zwagoth,項目名稱:halcyon,代碼行數:5,代碼來源:SceneObjectGroup.cs

示例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));
 }
開發者ID:shangcheng,項目名稱:Aurora,代碼行數:10,代碼來源:SceneObjectGroup.cs

示例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;
        }
開發者ID:kf6kjg,項目名稱:halcyon,代碼行數:25,代碼來源:SceneObjectGroup.cs


注:本文中的OpenSim.Region.Framework.Scenes.SceneObjectPart.Copy方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。