OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | Events | List of all members
OpenSim.Region.Framework.Scenes.SceneBase Class Referenceabstract
Inheritance diagram for OpenSim.Region.Framework.Scenes.SceneBase:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.Framework.Scenes.SceneBase:
Collaboration graph
[legend]

Public Member Functions

 SceneBase (RegionInfo regInfo)
 
abstract void Update (int frames)
 Called to update the scene loop by a number of frames and until shutdown. More...
 
abstract void LoadWorldMap ()
 Loads the World heightmap More...
 
virtual void SendLayerData (IClientAPI RemoteClient)
 Send the region heightmap to the client More...
 
abstract ISceneAgent AddNewAgent (IClientAPI client, PresenceType type)
 Add a new agent with an attached client. All agents except initial login clients will starts off as a child agent More...
 
abstract bool CloseAgent (UUID agentID, bool force)
 Tell a single agent to disconnect from the region. More...
 
bool TryGetScenePresence (UUID agentID, out object scenePresence)
 
abstract bool TryGetScenePresence (UUID agentID, out ScenePresence scenePresence)
 Try to get a scene presence from the scene More...
 
abstract void OtherRegionUp (GridRegion otherRegion)
 
virtual string GetSimulatorVersion ()
 
virtual void Close ()
 Tidy before shutdown More...
 
uint AllocateLocalId ()
 Returns a new unallocated local ID More...
 
void AddRegionModule (string name, IRegionModuleBase module)
 Add a region-module to this scene. TODO: This will replace AddModule in the future. More...
 
void RemoveRegionModule (string name)
 
void RegisterModuleCommander (ICommander commander)
 Register a module commander. More...
 
void UnregisterModuleCommander (string name)
 Unregister a module commander and all its commands More...
 
ICommander GetCommander (string name)
 Get a module commander More...
 
Dictionary< string, ICommanderGetCommanders ()
 
List< UUID > GetFormatsOffered ()
 
void RegisterModuleInterface< M > (M mod)
 Register an interface to a region module. This allows module methods to be called directly as well as via events. If there is already a module registered for this interface, it is not replaced (is this the best behaviour?) More...
 
void UnregisterModuleInterface< M > (M mod)
 
void StackModuleInterface< M > (M mod)
 
RequestModuleInterface< T > ()
 For the given interface, retrieve the region module which implements it. More...
 
T[] RequestModuleInterfaces< T > ()
 For the given interface, retrieve an array of region modules that implement it. More...
 
void AddCommand (IRegionModuleBase module, string command, string shorthelp, string longhelp, CommandDelegate callback)
 Call this from a region module to add a command to the OpenSim console. More...
 
void AddCommand (string category, IRegionModuleBase module, string command, string shorthelp, string longhelp, CommandDelegate callback)
 Call this from a region module to add a command to the OpenSim console. More...
 
void AddCommand (IRegionModuleBase module, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback)
 Call this from a region module to add a command to the OpenSim console. More...
 
void AddCommand (string category, IRegionModuleBase module, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback)
 Call this from a region module to add a command to the OpenSim console. More...
 
virtual ISceneObject DeserializeObject (string representation)
 
virtual void Start ()
 Start the scene and associated scripts within it. More...
 
void Restart ()
 
abstract bool CheckClient (UUID agentID, System.Net.IPEndPoint ep)
 

Public Attributes

ITerrainChannel Heightmap
 
ILandChannel LandChannel
 

Protected Member Functions

virtual IConfigSource GetConfig ()
 
void CheckAndAddAgentDataFormats (object mod)
 

Protected Attributes

Dictionary< Type, List< object > > ModuleInterfaces = new Dictionary<Type, List<object>>()
 
List< UUID > FormatsOffered = new List<UUID>()
 These two objects hold the information about any formats used by modules that hold agent specific data. More...
 
Dictionary< object, List< UUID > > FormatsWanted = new Dictionary<object, List<UUID>>()
 
Dictionary< string, object > ModuleAPIMethods = new Dictionary<string, object>()
 
Dictionary< string, ICommanderm_moduleCommanders = new Dictionary<string, ICommander>()
 
Dictionary< PCode, IEntityCreatorm_entityCreators = new Dictionary<PCode, IEntityCreator>()
 
uint m_lastAllocatedLocalId = 720000
 The last allocated local prim id. When a new local id is requested, the next number in the sequence is dispensed. More...
 
readonly ClientManager m_clientManager = new ClientManager()
 
EventManager m_eventManager
 
ScenePermissions m_permissions
 
RegionStatus m_regStatus
 

Properties

string Name [get]
 
IConfigSource Config [get]
 
Dictionary< string,
IRegionModuleBase
RegionModules [get]
 
bool LoginsEnabled [get, set]
 
bool Ready [get, set]
 
float TimeDilation [get]
 
EventManager EventManager [get]
 
ScenePermissions Permissions [get]
 
RegionStatus RegionStatus [get, set]
 
virtual RegionInfo RegionInfo [get, set]
 
virtual bool AllowScriptCrossings [get]
 
- Properties inherited from OpenSim.Framework.IScene
string Name [get]
 The name of this scene. More...
 
RegionInfo RegionInfo [get]
 
RegionStatus RegionStatus [get, set]
 
IConfigSource Config [get]
 
bool LoginsEnabled [get, set]
 Are logins enabled on this simulator? More...
 
bool Ready [get, set]
 Is this region ready for use? More...
 
float TimeDilation [get]
 
bool AllowScriptCrossings [get]
 

Events

restart OnRestart
 
- Events inherited from OpenSim.Framework.IScene
restart OnRestart
 

Detailed Description

Definition at line 43 of file SceneBase.cs.

Constructor & Destructor Documentation

OpenSim.Region.Framework.Scenes.SceneBase.SceneBase ( RegionInfo  regInfo)
inline

Definition at line 188 of file SceneBase.cs.

Member Function Documentation

void OpenSim.Region.Framework.Scenes.SceneBase.AddCommand ( IRegionModuleBase  module,
string  command,
string  shorthelp,
string  longhelp,
CommandDelegate  callback 
)
inline

Call this from a region module to add a command to the OpenSim console.

Parameters
mod
command
shorthelp
longhelp
callback

Definition at line 540 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.AddCommand ( string  category,
IRegionModuleBase  module,
string  command,
string  shorthelp,
string  longhelp,
CommandDelegate  callback 
)
inline

Call this from a region module to add a command to the OpenSim console.

Parameters
modThe use of IRegionModuleBase is a cheap trick to get a different method signature, though all new modules should be using interfaces descended from IRegionModuleBase anyway.
categoryCategory of the command. This is the section under which it will appear when the user asks for help
command
shorthelp
longhelp
callback

Definition at line 559 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.AddCommand ( IRegionModuleBase  module,
string  command,
string  shorthelp,
string  longhelp,
string  descriptivehelp,
CommandDelegate  callback 
)
inline

Call this from a region module to add a command to the OpenSim console.

Parameters
mod
command
shorthelp
longhelp
descriptivehelp
callback

Definition at line 574 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.AddCommand ( string  category,
IRegionModuleBase  module,
string  command,
string  shorthelp,
string  longhelp,
string  descriptivehelp,
CommandDelegate  callback 
)
inline

Call this from a region module to add a command to the OpenSim console.

Parameters
categoryCategory of the command. This is the section under which it will appear when the user asks for help
mod
command
shorthelp
longhelp
descriptivehelp
callback

Definition at line 596 of file SceneBase.cs.

abstract ISceneAgent OpenSim.Region.Framework.Scenes.SceneBase.AddNewAgent ( IClientAPI  client,
PresenceType  type 
)
pure virtual

Add a new agent with an attached client. All agents except initial login clients will starts off as a child agent

  • the later agent crossing will promote it to a root agent.
Parameters
client
typeThe type of agent to add.
Returns
The scene agent if the new client was added or if an agent that already existed.

Implements OpenSim.Framework.IScene.

Implemented in OpenSim.Region.Framework.Scenes.Scene.

void OpenSim.Region.Framework.Scenes.SceneBase.AddRegionModule ( string  name,
IRegionModuleBase  module 
)
inline

Add a region-module to this scene. TODO: This will replace AddModule in the future.

Parameters
name
module

Definition at line 317 of file SceneBase.cs.

uint OpenSim.Region.Framework.Scenes.SceneBase.AllocateLocalId ( )
inline

Returns a new unallocated local ID

Returns
A brand new local ID

Definition at line 299 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.CheckAndAddAgentDataFormats ( object  mod)
inlineprotected

Definition at line 384 of file SceneBase.cs.

abstract bool OpenSim.Region.Framework.Scenes.SceneBase.CheckClient ( UUID  agentID,
System.Net.IPEndPoint  ep 
)
pure virtual
virtual void OpenSim.Region.Framework.Scenes.SceneBase.Close ( )
inlinevirtual

Tidy before shutdown

Reimplemented in OpenSim.Region.Framework.Scenes.Scene.

Definition at line 281 of file SceneBase.cs.

abstract bool OpenSim.Region.Framework.Scenes.SceneBase.CloseAgent ( UUID  agentID,
bool  force 
)
pure virtual

Tell a single agent to disconnect from the region.

Parameters
agentID
forceForce the agent to close even if it might be in the middle of some other operation. You do not want to force unless you are absolutely sure that the agent is dead and a normal close is not working.

Implements OpenSim.Framework.IScene.

Implemented in OpenSim.Region.Framework.Scenes.Scene.

virtual ISceneObject OpenSim.Region.Framework.Scenes.SceneBase.DeserializeObject ( string  representation)
inlinevirtual

Implements OpenSim.Framework.IScene.

Reimplemented in OpenSim.Region.Framework.Scenes.Scene.

Definition at line 612 of file SceneBase.cs.

ICommander OpenSim.Region.Framework.Scenes.SceneBase.GetCommander ( string  name)
inline

Get a module commander

Parameters
name
Returns
The module commander, null if no module commander with that name was found

Definition at line 361 of file SceneBase.cs.

Dictionary<string, ICommander> OpenSim.Region.Framework.Scenes.SceneBase.GetCommanders ( )
inline

Definition at line 372 of file SceneBase.cs.

Here is the caller graph for this function:

virtual IConfigSource OpenSim.Region.Framework.Scenes.SceneBase.GetConfig ( )
inlineprotectedvirtual

Reimplemented in OpenSim.Region.Framework.Scenes.Scene.

Definition at line 66 of file SceneBase.cs.

List<UUID> OpenSim.Region.Framework.Scenes.SceneBase.GetFormatsOffered ( )
inline

Definition at line 377 of file SceneBase.cs.

Here is the caller graph for this function:

virtual string OpenSim.Region.Framework.Scenes.SceneBase.GetSimulatorVersion ( )
inlinevirtual

Implements OpenSim.Framework.IScene.

Reimplemented in OpenSim.Region.Framework.Scenes.Scene.

Definition at line 269 of file SceneBase.cs.

abstract void OpenSim.Region.Framework.Scenes.SceneBase.LoadWorldMap ( )
pure virtual

Loads the World heightmap

Implemented in OpenSim.Region.Framework.Scenes.Scene.

abstract void OpenSim.Region.Framework.Scenes.SceneBase.OtherRegionUp ( GridRegion  otherRegion)
pure virtual
void OpenSim.Region.Framework.Scenes.SceneBase.RegisterModuleCommander ( ICommander  commander)
inline

Register a module commander.

Parameters
commander

Definition at line 334 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.RegisterModuleInterface< M > ( mod)
inline

Register an interface to a region module. This allows module methods to be called directly as well as via events. If there is already a module registered for this interface, it is not replaced (is this the best behaviour?)

Parameters
mod

Implements OpenSim.Framework.IScene.

Definition at line 415 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.RemoveRegionModule ( string  name)
inline

Definition at line 325 of file SceneBase.cs.

T OpenSim.Region.Framework.Scenes.SceneBase.RequestModuleInterface< T > ( )
inline

For the given interface, retrieve the region module which implements it.

Returns
null if there is no registered module implementing that interface

Implements OpenSim.Framework.IScene.

Definition at line 501 of file SceneBase.cs.

T [] OpenSim.Region.Framework.Scenes.SceneBase.RequestModuleInterfaces< T > ( )
inline

For the given interface, retrieve an array of region modules that implement it.

Returns
an empty array if there are no registered modules implementing that interface

Implements OpenSim.Framework.IScene.

Definition at line 514 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.Restart ( )
inline

Implements OpenSim.Framework.IScene.

Definition at line 626 of file SceneBase.cs.

Here is the call graph for this function:

virtual void OpenSim.Region.Framework.Scenes.SceneBase.SendLayerData ( IClientAPI  RemoteClient)
inlinevirtual

Send the region heightmap to the client

Parameters
RemoteClientClient to send to

Definition at line 218 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.StackModuleInterface< M > ( mod)
inline

Implements OpenSim.Framework.IScene.

Definition at line 470 of file SceneBase.cs.

virtual void OpenSim.Region.Framework.Scenes.SceneBase.Start ( )
inlinevirtual

Start the scene and associated scripts within it.

Implements OpenSim.Framework.IScene.

Reimplemented in OpenSim.Region.Framework.Scenes.Scene.

Definition at line 622 of file SceneBase.cs.

bool OpenSim.Region.Framework.Scenes.SceneBase.TryGetScenePresence ( UUID  agentID,
out object  scenePresence 
)
inline

Implements OpenSim.Framework.IScene.

Definition at line 236 of file SceneBase.cs.

abstract bool OpenSim.Region.Framework.Scenes.SceneBase.TryGetScenePresence ( UUID  agentID,
out ScenePresence  scenePresence 
)
pure virtual

Try to get a scene presence from the scene

Parameters
agentID
scenePresencenull if there is no scene presence with the given agent id
Returns
true if there was a scene presence with the given id, false otherwise.

Implemented in OpenSim.Region.Framework.Scenes.Scene.

void OpenSim.Region.Framework.Scenes.SceneBase.UnregisterModuleCommander ( string  name)
inline

Unregister a module commander and all its commands

Parameters
name

Definition at line 346 of file SceneBase.cs.

void OpenSim.Region.Framework.Scenes.SceneBase.UnregisterModuleInterface< M > ( mod)
inline

Definition at line 443 of file SceneBase.cs.

abstract void OpenSim.Region.Framework.Scenes.SceneBase.Update ( int  frames)
pure virtual

Called to update the scene loop by a number of frames and until shutdown.

Parameters
framesNumber of frames to update. Exits on shutdown even if there are frames remaining. If -1 then updates until shutdown.
Returns
true if update completed within minimum frame time, false otherwise.

Implemented in OpenSim.Region.Framework.Scenes.Scene.

Member Data Documentation

List<UUID> OpenSim.Region.Framework.Scenes.SceneBase.FormatsOffered = new List<UUID>()
protected

These two objects hold the information about any formats used by modules that hold agent specific data.

Definition at line 89 of file SceneBase.cs.

Dictionary<object, List<UUID> > OpenSim.Region.Framework.Scenes.SceneBase.FormatsWanted = new Dictionary<object, List<UUID>>()
protected

Definition at line 90 of file SceneBase.cs.

ITerrainChannel OpenSim.Region.Framework.Scenes.SceneBase.Heightmap

Definition at line 155 of file SceneBase.cs.

ILandChannel OpenSim.Region.Framework.Scenes.SceneBase.LandChannel

Allows retrieval of land information for this scene.

Definition at line 160 of file SceneBase.cs.

readonly ClientManager OpenSim.Region.Framework.Scenes.SceneBase.m_clientManager = new ClientManager()
protected

Definition at line 112 of file SceneBase.cs.

Dictionary<PCode, IEntityCreator> OpenSim.Region.Framework.Scenes.SceneBase.m_entityCreators = new Dictionary<PCode, IEntityCreator>()
protected

Registered classes that are capable of creating entities.

Definition at line 102 of file SceneBase.cs.

EventManager OpenSim.Region.Framework.Scenes.SceneBase.m_eventManager
protected

Definition at line 170 of file SceneBase.cs.

uint OpenSim.Region.Framework.Scenes.SceneBase.m_lastAllocatedLocalId = 720000
protected

The last allocated local prim id. When a new local id is requested, the next number in the sequence is dispensed.

Definition at line 108 of file SceneBase.cs.

Dictionary<string, ICommander> OpenSim.Region.Framework.Scenes.SceneBase.m_moduleCommanders = new Dictionary<string, ICommander>()
protected

The module commanders available from this scene

Definition at line 97 of file SceneBase.cs.

ScenePermissions OpenSim.Region.Framework.Scenes.SceneBase.m_permissions
protected

Definition at line 172 of file SceneBase.cs.

RegionStatus OpenSim.Region.Framework.Scenes.SceneBase.m_regStatus
protected

Definition at line 179 of file SceneBase.cs.

Dictionary<string, object> OpenSim.Region.Framework.Scenes.SceneBase.ModuleAPIMethods = new Dictionary<string, object>()
protected

Definition at line 92 of file SceneBase.cs.

Dictionary<Type, List<object> > OpenSim.Region.Framework.Scenes.SceneBase.ModuleInterfaces = new Dictionary<Type, List<object>>()
protected

The module interfaces available from this scene.

Definition at line 83 of file SceneBase.cs.

Property Documentation

virtual bool OpenSim.Region.Framework.Scenes.SceneBase.AllowScriptCrossings
get

Definition at line 618 of file SceneBase.cs.

IConfigSource OpenSim.Region.Framework.Scenes.SceneBase.Config
get

Definition at line 62 of file SceneBase.cs.

EventManager OpenSim.Region.Framework.Scenes.SceneBase.EventManager
get

Manage events that occur in this scene (avatar movement, script rez, etc.). Commonly used by region modules to subscribe to scene events.

Definition at line 167 of file SceneBase.cs.

bool OpenSim.Region.Framework.Scenes.SceneBase.LoginsEnabled
getset

Definition at line 115 of file SceneBase.cs.

string OpenSim.Region.Framework.Scenes.SceneBase.Name
get

Definition at line 59 of file SceneBase.cs.

ScenePermissions OpenSim.Region.Framework.Scenes.SceneBase.Permissions
get

Definition at line 174 of file SceneBase.cs.

bool OpenSim.Region.Framework.Scenes.SceneBase.Ready
getset

Definition at line 133 of file SceneBase.cs.

virtual RegionInfo OpenSim.Region.Framework.Scenes.SceneBase.RegionInfo
getset

Returns

Definition at line 263 of file SceneBase.cs.

Dictionary<string, IRegionModuleBase> OpenSim.Region.Framework.Scenes.SceneBase.RegionModules
get

All the region modules attached to this scene.

Definition at line 75 of file SceneBase.cs.

RegionStatus OpenSim.Region.Framework.Scenes.SceneBase.RegionStatus
getset

Definition at line 181 of file SceneBase.cs.

float OpenSim.Region.Framework.Scenes.SceneBase.TimeDilation
get

Definition at line 151 of file SceneBase.cs.

Event Documentation

restart OpenSim.Region.Framework.Scenes.SceneBase.OnRestart

Definition at line 53 of file SceneBase.cs.


The documentation for this class was generated from the following file: