当前位置: 首页>>代码示例>>C#>>正文


C# Scene.ForEachSOG方法代码示例

本文整理汇总了C#中OpenSim.Region.Framework.Scenes.Scene.ForEachSOG方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.ForEachSOG方法的具体用法?C# Scene.ForEachSOG怎么用?C# Scene.ForEachSOG使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenSim.Region.Framework.Scenes.Scene的用法示例。


在下文中一共展示了Scene.ForEachSOG方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EventManager_OnPrimsLoaded

 void EventManager_OnPrimsLoaded(Scene s)
 {
     // let's sniff all the user names referenced by objects in the scene
     m_log.DebugFormat("[USER MANAGEMENT MODULE]: Caching creators' data from {0} ({1} objects)...", s.RegionInfo.RegionName, s.GetEntities().Length);
     s.ForEachSOG(delegate(SceneObjectGroup sog) { CacheCreators(sog); });
 }
开发者ID:SignpostMarv,项目名称:opensim,代码行数:6,代码来源:UserManagementModule.cs

示例2: ListXmlRpcHandler

        public XmlRpcResponse ListXmlRpcHandler(XmlRpcRequest request, IPEndPoint client)
        {
            // AuthClient.VerifySession(GetUserServerURL(userID), userID, sessionID);
            XmlRpcResponse response = new XmlRpcResponse();
            Hashtable requestData = (Hashtable)request.Params[0];
            Hashtable resp = new Hashtable();
            Hashtable result = new Hashtable();
            if (requestData.ContainsKey("RegionID"))
            {
            UUID regionID = UUID.Parse((string)requestData["RegionID"]);
            m_scene = SelectRegion(regionID);

                    IModrexObjectsProvider rexObjects = m_scene.RequestModuleInterface<IModrexObjectsProvider>();

            m_scene.ForEachSOG(delegate(SceneObjectGroup e)
            {
                Hashtable sogdata = new Hashtable();
            sogdata["name"] = e.Name;
            sogdata["primname"] = e.RootPart.Name;
            sogdata["groupid"] = e.GroupID.ToString();
            sogdata["primcount"] = e.PrimCount.ToString();
            sogdata["owner"] = e.OwnerID.ToString();
            sogdata["part"] = e.GetFromItemID().ToString();
            sogdata["rotation"] = e.RootPart.GetWorldRotation().ToString();
            sogdata["position"] = e.AbsolutePosition.ToString();
            sogdata["scale"] = e.GroupScale().ToString();

                        RexObjectProperties robject = rexObjects.GetObject(e.RootPart.UUID);
                        sogdata["asset"] = robject.RexMeshUUID.ToString();
                        sogdata["drawtype"] = robject.RexDrawType.ToString();
                        sogdata["distance"] = robject.RexDrawDistance.ToString();
            if (robject.RexMaterials.Count > 0) {
                Hashtable materials = new Hashtable();
                foreach (uint matindex in robject.RexMaterials.Keys) {
                    materials[robject.RexMaterials[matindex].AssetID.ToString()] = robject.RexMaterials[matindex].AssetURI;
                }
                sogdata["materials"] = materials;
            }
                Hashtable parts = new Hashtable();
                foreach (UUID prim_uuid in e.Children.Keys) {
                    SceneObjectPart child = e.Children[prim_uuid];
                    RexObjectProperties child_robject = rexObjects.GetObject(child.UUID);
                    parts[prim_uuid.ToString()] = child_robject.RexMeshUUID.ToString();
                }
                sogdata["parts"] = parts;

             //                       robject.RexCastShadows = ent.CastShadows;
               //                     robject.RexDrawType = 1;

                result[e.UUID.ToString()] = sogdata;
            });
                    resp["res"] = result;
            // m_scene.DeleteAllSceneObjects();
            }
            else
            {
            resp["success"] = false;
            resp["error"] = "no RegionID provided";
            response.Value = resp;
                    return response;
            }
            // return ok;
            m_log.Info("Region Cleared: " + requestData["RegionID"].ToString());
            resp["success"] = true;
            response.Value = resp;
            return response;
        }
开发者ID:b2rex,项目名称:b2rex,代码行数:67,代码来源:SceneUploadReceiver.cs


注:本文中的OpenSim.Region.Framework.Scenes.Scene.ForEachSOG方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。