当前位置: 首页>>代码示例>>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;未经允许,请勿转载。