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


C# Scenes.Scene類代碼示例

本文整理匯總了C#中OpenSim.Region.Framework.Scenes.Scene的典型用法代碼示例。如果您正苦於以下問題:C# Scene類的具體用法?C# Scene怎麽用?C# Scene使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Scene類屬於OpenSim.Region.Framework.Scenes命名空間,在下文中一共展示了Scene類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CreatePointEntity

        private void CreatePointEntity(Scene scene, UUID uuid, Vector3 groupPos)
        {
            SceneObjectPart y = new SceneObjectPart();

            //Initialize part
            y.Name = "Very Small Point";
            y.RegionHandle = scene.RegionInfo.RegionHandle;
            y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
            y.OwnerID = UUID.Zero;
            y.CreatorID = UUID.Zero;
            y.LastOwnerID = UUID.Zero;
            y.UUID = uuid;

            y.Shape = PrimitiveBaseShape.CreateBox();
            y.Scale = new Vector3(0.01f,0.01f,0.01f);
            y.LastOwnerID = UUID.Zero;
            y.GroupPosition = groupPos;
            y.OffsetPosition = new Vector3(0, 0, 0);
            y.RotationOffset = new Quaternion(0,0,0,0);
            y.Velocity = new Vector3(0, 0, 0);
            y.RotationalVelocity = new Vector3(0, 0, 0);
            y.AngularVelocity = new Vector3(0, 0, 0);
            y.Acceleration = new Vector3(0, 0, 0);

            y.Flags = 0;
            y.TrimPermissions();

            //Initialize group and add part as root part
            SceneObjectGroup x = new SceneObjectGroup(y);
            x.SetScene(scene);
            x.RegionHandle = scene.RegionInfo.RegionHandle;
            x.SetScene(scene);

            m_Entity = x;
        }
開發者ID:intari,項目名稱:OpenSimMirror,代碼行數:35,代碼來源:PointMetaEntity.cs

示例2: NPCAvatar

 public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene)
 {
     m_firstname = firstname;
     m_lastname = lastname;
     m_startPos = position;
     m_scene = scene;
 }
開發者ID:N3X15,項目名稱:VoxelSim,代碼行數:7,代碼來源:NPCAvatar.cs

示例3: Init

        public void Init()
        {
            TestHelper.InMethod();
            
            scene = SceneSetupHelpers.SetupScene("Neighbour x", UUID.Random(), 1000, 1000);
            scene2 = SceneSetupHelpers.SetupScene("Neighbour x+1", UUID.Random(), 1001, 1000);
            scene3 = SceneSetupHelpers.SetupScene("Neighbour x-1", UUID.Random(), 999, 1000);

            ISharedRegionModule interregionComms = new LocalSimulationConnectorModule();
            interregionComms.Initialise(new IniConfigSource());
            interregionComms.PostInitialise();
            SceneSetupHelpers.SetupSceneModules(scene, new IniConfigSource(), interregionComms);
            SceneSetupHelpers.SetupSceneModules(scene2, new IniConfigSource(), interregionComms);
            SceneSetupHelpers.SetupSceneModules(scene3, new IniConfigSource(), interregionComms);

            agent1 = UUID.Random();
            agent2 = UUID.Random();
            agent3 = UUID.Random();
            random = new Random();
            sog1 = NewSOG(UUID.Random(), scene, agent1);
            sog2 = NewSOG(UUID.Random(), scene, agent1);
            sog3 = NewSOG(UUID.Random(), scene, agent1);

            //ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
            region1 = scene.RegionInfo.RegionHandle;
            region2 = scene2.RegionInfo.RegionHandle;
            region3 = scene3.RegionInfo.RegionHandle;
        }
開發者ID:HGExchange,項目名稱:opensim,代碼行數:28,代碼來源:ScenePresenceTests.cs

示例4: RemoveRegion

        public void RemoveRegion(Scene scene)
        {
            if (!m_Enabled)
                return;

            m_PresenceDetector.RemoveRegion(scene);
        }
開發者ID:BogusCurry,項目名稱:arribasim-dev,代碼行數:7,代碼來源:BasePresenceServiceConnector.cs

示例5: AddRegion

        public void AddRegion(Scene scene)
        {
            m_scene = scene;

            m_scene.EventManager.OnNewClient += OnNewClient;
            m_scene.EventManager.OnClosingClient += OnClosingClient;
        }
開發者ID:kow,項目名稱:Aurora-Sim,代碼行數:7,代碼來源:GesturesModule.cs

示例6: AddRegion

 public void AddRegion(Scene scene)
 {
     m_scene = scene;
     m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
     m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
     // TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI
 }
開發者ID:N3X15,項目名稱:VoxelSim,代碼行數:7,代碼來源:AttachmentsModule.cs

示例7: Initialize

        private bool m_enabled = false; // Module is only enabled if running in grid mode

        #region IRegionModule Members

        public void Initialize(Scene scene, IConfigSource source)
        {
            if (m_firstScene == null)
            {
                m_firstScene = scene;

                IConfig startupConfig = source.Configs["Startup"];
                if (startupConfig != null)
                {
                    m_enabled = startupConfig.GetBoolean("gridmode", false);
                }

                IConfig netConfig = source.Configs["Network"];

                if (netConfig != null)
                {
                    _gridSendKey = netConfig.GetString("grid_send_key");
                }
                else
                {
                    throw new Exception("LLProxyLoginModule: Network configuration not found");
                }

                if (m_enabled)
                {
                    AddHttpHandlers();
                }
            }

            if (m_enabled)
            {
                AddScene(scene);
            }
        }
開發者ID:kf6kjg,項目名稱:halcyon,代碼行數:38,代碼來源:LLProxyLoginModule.cs

示例8: AddRegion

 public void AddRegion(Scene scene)
 {
     m_scene = scene;
     m_scene.RegisterModuleInterface<IBuySellModule>(this);
     m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
     m_scene.EventManager.OnClosingClient += UnsubscribeFromClientEvents;
 }
開發者ID:LOG123,項目名稱:Aurora-Sim-PhysX,代碼行數:7,代碼來源:BuySellModule.cs

示例9: AddRegion

        public void AddRegion(Scene scene)
        {
            m_scene = scene;
            scene.RegisterModuleInterface<IEventQueue>(this);

            scene.EventManager.OnClientClosed += ClientClosed;
            scene.EventManager.OnRegisterCaps += OnRegisterCaps;

            MainConsole.Instance.Commands.AddCommand(
                "Debug",
                false,
                "debug eq",
                "debug eq [0|1|2]",
                "Turn on event queue debugging\n"
                    + "  <= 0 - turns off all event queue logging\n"
                    + "  >= 1 - turns on outgoing event logging\n"
                    + "  >= 2 - turns on poll notification",
                HandleDebugEq);

            MainConsole.Instance.Commands.AddCommand(
                "Debug",
                false,
                "show eq",
                "show eq",
                "Show contents of event queues for logged in avatars.  Used for debugging.",
                HandleShowEq);
        }
開發者ID:BogusCurry,項目名稱:arribasim-dev,代碼行數:27,代碼來源:EventQueueGetModule.cs

示例10: RegionState

        // Setup runtime variable values

        public RegionState(Scene p_scene, IConfig p_config)
        {

            scene  = p_scene;
            config = p_config;

            Region = scene.RegionInfo.RegionName;
            Host   = scene.RegionInfo.ExternalHostName;
            LocX   = Convert.ToString(scene.RegionInfo.RegionLocX / Constants.RegionSize);
            LocY   = Convert.ToString(scene.RegionInfo.RegionLocY / Constants.RegionSize);
            IDK    = Convert.ToString(_idk_++);

            // OpenChannel conditionally establishes a connection to the
            // IRC server. The request will either succeed, or it will
            // throw an exception.

            ChannelState.OpenChannel(this, config);

            // Connect channel to world events

            scene.EventManager.OnChatFromWorld  += OnSimChat;
            scene.EventManager.OnChatFromClient += OnSimChat;
            scene.EventManager.OnMakeRootAgent  += OnMakeRootAgent;
            scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;

            m_log.InfoFormat("[IRC-Region {0}] Initialization complete", Region);

        }
開發者ID:KristenMynx,項目名稱:Aurora-Sim,代碼行數:30,代碼來源:RegionState.cs

示例11: SaveRegion

        /// <summary>
        /// Exports a specified scene to the SVN repo directory, then commits.
        /// </summary>
        /// <param name="scene">The scene to export</param>
        public void SaveRegion(Scene scene)
        {
            List<string> svnfilenames = CreateAndAddExport(scene);

            m_svnClient.Commit3(svnfilenames, true, false);
            m_log.Info("[SVNBACKUP]: Region backup successful (" + scene.RegionInfo.RegionName + ").");
        }
開發者ID:N3X15,項目名稱:VoxelSim,代碼行數:11,代碼來源:SvnBackupModule.cs

示例12: DearchiveContext

 public DearchiveContext(Scene scene)
 {
     Scene = scene;
     SerialisedSceneObjects = new List<string>();
     SerialisedParcels = new List<string>();
     SceneObjects = new List<SceneObjectGroup>();
 }
開發者ID:CCIR,項目名稱:opensim,代碼行數:7,代碼來源:ArchiveReadRequest.cs

示例13: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
                return;

            scene.RegisterModuleInterface<IUserAccountService>(this);
        }
開發者ID:NickyPerian,項目名稱:Aurora,代碼行數:7,代碼來源:MultipleUserAccountServiceConnector.cs

示例14: Initialise

		public void Initialise(Scene scene, IConfigSource config)
		{
			if (!m_enabled) return;					 

			IConfig cnf = config.Configs["Messaging"];

			if (m_SceneList.Count==0) 
			{
				if (cnf == null)
				{
					m_enabled = false;
					return;
				}

				if (cnf != null && cnf.GetString("MuteListModule", "None") != "NSLMuteListModule")
				{
					m_enabled = false;
					return;
				}

				m_RestURL = cnf.GetString("MuteListURL", "");
				if (m_RestURL == "")
				{
					m_log.Error("[NSL MUTE LIST] Module was enabled, but no URL is given, disabling");
					m_enabled = false;
					return;
				}
			}

			if (!m_SceneList.Contains(scene)) m_SceneList.Add(scene);
			m_config = config;
   
			scene.EventManager.OnNewClient += OnNewClient;
		}
開發者ID:phantasmagoric,項目名稱:InfiniteGrid-Opensim,代碼行數:34,代碼來源:NSLMuteListModule.cs

示例15: RemoveRegion

 public void RemoveRegion(Scene scene)
 {
     scene.EventManager.OnNewClient -= EventManager_OnNewClient;
     scene.EventManager.OnClosingClient -= EventManager_OnClosingClient;
     scene.EventManager.OnNewPresence -= EventManager_OnNewPresence;
     scene.EventManager.OnRemovePresence -= EventManager_OnRemovePresence;
 }
開發者ID:kow,項目名稱:Aurora-Sim,代碼行數:7,代碼來源:SelectionModule.cs


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