C# Class OpenSim.Region.OptionalModules.ContentManagement.CMController

The controller in a Model-View-Controller framework. This controller catches actions by the avatars, creates work packets, loops through these work packets in a separate thread, then dictates to the model how the data should change and dictates to the view which data should be displayed. The main mechanism for interaction is through the simchat system.
Afficher le fichier Open project: openmetaversefoundation/fortis-opensim Class Usage Examples

Méthodes publiques

Méthode Description
CMController ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, Scene scene, int channel ) : System

Initializes a work thread with an initial scene. Additional scenes should be added through the RegisterNewRegion method.

RegisterNewRegion ( Scene scene ) : void

Register a new scene object to keep track of for revisioning. Starts the controller monitoring actions of clients within the given scene.

SimChat ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, OpenSim.Framework.OSChatMessage e, int channel ) : void

Only called by the MainLoop. Takes the message from a user sent to the channel and executes the proper command.

Méthodes protégées

Méthode Description
GroupBeingDeleted ( SceneObjectGroup group ) : void
ObjectDuplicated ( uint localID, System.Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID ) : void
ObjectDuplicatedOnRay ( uint localID, uint dupeFlags, UUID AgentID, UUID GroupID, UUID RayTargetObj, System.Vector3 RayEnd, System.Vector3 RayStart, bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates ) : void
OnNewClient ( IClientAPI client ) : void
OnUnDid ( IClientAPI remoteClient, UUID primId ) : void
ScenesInOrderOfProximity ( Hashtable sceneList, Scene scene ) : System.Collections.Generic.List

Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.

SimChatSent ( Object x, OpenSim.Framework.OSChatMessage e ) : void
StartManaging ( IClientAPI client ) : void

Adds extra handlers to a number of events so that the controller can produce work based on the client's actions.

StopManaging ( UUID clientUUID ) : void

UpdateMultiplePosition ( uint localID, System.Vector3 pos, IClientAPI remoteClient ) : void
UpdateMultipleRotation ( uint localID, Quaternion rot, IClientAPI remoteClient ) : void
UpdateMultipleScale ( uint localID, System.Vector3 scale, IClientAPI remoteClient ) : void
UpdateNewParts ( UUID ownerID, UUID groupID, System.Vector3 RayEnd, Quaternion rot, OpenSim.Framework.PrimitiveBaseShape shape, byte bypassRaycast, System.Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection ) : void
UpdateSinglePosition ( uint localID, System.Vector3 pos, IClientAPI remoteClient ) : void
UpdateSingleRotation ( uint localID, Quaternion rot, IClientAPI remoteClient ) : void

UpdateSingleScale ( uint localID, System.Vector3 scale, IClientAPI remoteClient ) : void
commit ( string message, Scene scene, OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view ) : void

Only called from within the SimChat method.

diffmode ( Scene scene, OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view ) : void

Only called from within the SimChat method.

rollback ( Scene scene, OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view ) : void

Only called from within the SimChat method. Hides all auras and meta entities, retrieves the current scene object list with the most recent revision retrieved from the model for each scene, then lets the view update the clients of the new objects.

Private Methods

Méthode Description
GetGroupByPrim ( uint localID ) : SceneObjectGroup

Searches in all scenes for a SceneObjectGroup that contains a part with a specific localID. If found, the object is returned. Else null is returned.

Initialize ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, Scene scene, int channel ) : void
MainLoop ( ) : void

Run in a thread of its own. A endless loop that consumes (or blocks on) and work queue. Thw work queue is filled through client actions.

NewClient ( OpenSim.Region.OptionalModules.ContentManagement.CMView view, IClientAPI client ) : void

Only called by the MainLoop. Updates the view of a new client with metaentities if diff-mode is currently enabled.

ObjectAttributeChanged ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, uint LocalId ) : void

Only called by the MainLoop.

ObjectDuplicated ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, uint localId ) : void

Only called by the MainLoop. Displays new green auras over the newly created part when a part is shift copied.

ObjectKilled ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, SceneObjectGroup group ) : void

Only called by the MainLoop.

PrimitiveAdded ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, Work currentJob ) : void

Only called by the MainLoop.

UndoDid ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, UUID uuid ) : void

Only called by the MainLoop.

Method Details

CMController() public méthode

Initializes a work thread with an initial scene. Additional scenes should be added through the RegisterNewRegion method.
public CMController ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, Scene scene, int channel ) : System
model OpenSim.Region.OptionalModules.ContentManagement.CMModel /// ///
view OpenSim.Region.OptionalModules.ContentManagement.CMView /// ///
scene OpenSim.Region.Framework.Scenes.Scene /// The first scene to keep track of. ///
channel int /// The simchat channel number to listen to for instructions ///
Résultat System

GroupBeingDeleted() protected méthode

protected GroupBeingDeleted ( SceneObjectGroup group ) : void
group OpenSim.Region.Framework.Scenes.SceneObjectGroup
Résultat void

ObjectDuplicated() protected méthode

protected ObjectDuplicated ( uint localID, System.Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID ) : void
localID uint
offset System.Vector3
dupeFlags uint
AgentID UUID
GroupID UUID
Résultat void

ObjectDuplicatedOnRay() protected méthode

protected ObjectDuplicatedOnRay ( uint localID, uint dupeFlags, UUID AgentID, UUID GroupID, UUID RayTargetObj, System.Vector3 RayEnd, System.Vector3 RayStart, bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates ) : void
localID uint
dupeFlags uint
AgentID UUID
GroupID UUID
RayTargetObj UUID
RayEnd System.Vector3
RayStart System.Vector3
BypassRaycast bool
RayEndIsIntersection bool
CopyCenters bool
CopyRotates bool
Résultat void

OnNewClient() protected méthode

protected OnNewClient ( IClientAPI client ) : void
client IClientAPI
Résultat void

OnUnDid() protected méthode

protected OnUnDid ( IClientAPI remoteClient, UUID primId ) : void
remoteClient IClientAPI
primId UUID
Résultat void

RegisterNewRegion() public méthode

Register a new scene object to keep track of for revisioning. Starts the controller monitoring actions of clients within the given scene.
public RegisterNewRegion ( Scene scene ) : void
scene OpenSim.Region.Framework.Scenes.Scene /// A ///
Résultat void

ScenesInOrderOfProximity() protected static méthode

Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
protected static ScenesInOrderOfProximity ( Hashtable sceneList, Scene scene ) : System.Collections.Generic.List
sceneList System.Collections.Hashtable
scene OpenSim.Region.Framework.Scenes.Scene
Résultat System.Collections.Generic.List

SimChat() public méthode

Only called by the MainLoop. Takes the message from a user sent to the channel and executes the proper command.
public SimChat ( OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view, OpenSim.Framework.OSChatMessage e, int channel ) : void
model OpenSim.Region.OptionalModules.ContentManagement.CMModel
view OpenSim.Region.OptionalModules.ContentManagement.CMView
e OpenSim.Framework.OSChatMessage
channel int
Résultat void

SimChatSent() protected méthode

protected SimChatSent ( Object x, OpenSim.Framework.OSChatMessage e ) : void
x Object
e OpenSim.Framework.OSChatMessage
Résultat void

StartManaging() protected méthode

Adds extra handlers to a number of events so that the controller can produce work based on the client's actions.
protected StartManaging ( IClientAPI client ) : void
client IClientAPI
Résultat void

StopManaging() protected méthode

protected StopManaging ( UUID clientUUID ) : void
clientUUID UUID
Résultat void

UpdateMultiplePosition() protected méthode

protected UpdateMultiplePosition ( uint localID, System.Vector3 pos, IClientAPI remoteClient ) : void
localID uint
pos System.Vector3
remoteClient IClientAPI
Résultat void

UpdateMultipleRotation() protected méthode

protected UpdateMultipleRotation ( uint localID, Quaternion rot, IClientAPI remoteClient ) : void
localID uint
rot Quaternion
remoteClient IClientAPI
Résultat void

UpdateMultipleScale() protected méthode

protected UpdateMultipleScale ( uint localID, System.Vector3 scale, IClientAPI remoteClient ) : void
localID uint
scale System.Vector3
remoteClient IClientAPI
Résultat void

UpdateNewParts() protected méthode

protected UpdateNewParts ( UUID ownerID, UUID groupID, System.Vector3 RayEnd, Quaternion rot, OpenSim.Framework.PrimitiveBaseShape shape, byte bypassRaycast, System.Vector3 RayStart, UUID RayTargetID, byte RayEndIsIntersection ) : void
ownerID UUID
groupID UUID
RayEnd System.Vector3
rot Quaternion
shape OpenSim.Framework.PrimitiveBaseShape
bypassRaycast byte
RayStart System.Vector3
RayTargetID UUID
RayEndIsIntersection byte
Résultat void

UpdateSinglePosition() protected méthode

protected UpdateSinglePosition ( uint localID, System.Vector3 pos, IClientAPI remoteClient ) : void
localID uint
pos System.Vector3
remoteClient IClientAPI
Résultat void

UpdateSingleRotation() protected méthode

protected UpdateSingleRotation ( uint localID, Quaternion rot, IClientAPI remoteClient ) : void
localID uint
rot Quaternion
remoteClient IClientAPI
Résultat void

UpdateSingleScale() protected méthode

protected UpdateSingleScale ( uint localID, System.Vector3 scale, IClientAPI remoteClient ) : void
localID uint
scale System.Vector3
remoteClient IClientAPI
Résultat void

commit() protected méthode

Only called from within the SimChat method.
protected commit ( string message, Scene scene, OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view ) : void
message string
scene OpenSim.Region.Framework.Scenes.Scene
model OpenSim.Region.OptionalModules.ContentManagement.CMModel
view OpenSim.Region.OptionalModules.ContentManagement.CMView
Résultat void

diffmode() protected méthode

Only called from within the SimChat method.
protected diffmode ( Scene scene, OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view ) : void
scene OpenSim.Region.Framework.Scenes.Scene
model OpenSim.Region.OptionalModules.ContentManagement.CMModel
view OpenSim.Region.OptionalModules.ContentManagement.CMView
Résultat void

rollback() protected méthode

Only called from within the SimChat method. Hides all auras and meta entities, retrieves the current scene object list with the most recent revision retrieved from the model for each scene, then lets the view update the clients of the new objects.
protected rollback ( Scene scene, OpenSim.Region.OptionalModules.ContentManagement.CMModel model, OpenSim.Region.OptionalModules.ContentManagement.CMView view ) : void
scene OpenSim.Region.Framework.Scenes.Scene
model OpenSim.Region.OptionalModules.ContentManagement.CMModel
view OpenSim.Region.OptionalModules.ContentManagement.CMView
Résultat void