本文整理汇总了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;
}
示例2: NPCAvatar
public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene)
{
m_firstname = firstname;
m_lastname = lastname;
m_startPos = position;
m_scene = scene;
}
示例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;
}
示例4: RemoveRegion
public void RemoveRegion(Scene scene)
{
if (!m_Enabled)
return;
m_PresenceDetector.RemoveRegion(scene);
}
示例5: AddRegion
public void AddRegion(Scene scene)
{
m_scene = scene;
m_scene.EventManager.OnNewClient += OnNewClient;
m_scene.EventManager.OnClosingClient += OnClosingClient;
}
示例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
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
示例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 + ").");
}
示例12: DearchiveContext
public DearchiveContext(Scene scene)
{
Scene = scene;
SerialisedSceneObjects = new List<string>();
SerialisedParcels = new List<string>();
SceneObjects = new List<SceneObjectGroup>();
}
示例13: AddRegion
public void AddRegion(Scene scene)
{
if (!m_Enabled)
return;
scene.RegisterModuleInterface<IUserAccountService>(this);
}
示例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;
}
示例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;
}