OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Properties | List of all members
OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule Class Reference
Inheritance diagram for OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule:
Collaboration graph
[legend]

Public Member Functions

void Initialise (IConfigSource source)
 This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created. More...
 
void AddRegion (Scene scene)
 This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called. More...
 
void RemoveRegion (Scene scene)
 This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed. More...
 
void RegionLoaded (Scene scene)
 This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module. More...
 
void Close ()
 This is the inverse to Initialise. After a Close(), this instance won't be usable anymore. More...
 
void CopyAttachments (IScenePresence sp, AgentData ad)
 Copy attachment data from a ScenePresence into the AgentData structure for transmission to another simulator More...
 
void CopyAttachments (AgentData ad, IScenePresence sp)
 Copy attachment data from an AgentData structure into a ScenePresence. More...
 
void RezAttachments (IScenePresence sp)
 RezAttachments. This should only be called upon login on the first region. Attachment rezzings on crossings and TPs are done in a different way. More...
 
void DeRezAttachments (IScenePresence sp)
 Derez the attachements for a scene presence that is closing. More...
 
void DeleteAttachmentsFromScene (IScenePresence sp, bool silent)
 Delete all the presence's attachments from the scene This is done when a root agent leaves/is demoted to child (for instance, on logout, teleport or region cross). More...
 
bool AttachObject (IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent, bool addToInventory, bool append)
 Attach an object to an avatar. More...
 
ISceneEntity RezSingleAttachmentFromInventory (IScenePresence sp, UUID itemID, uint AttachmentPt)
 Rez an attachment from user inventory and change inventory status to match. More...
 
ISceneEntity RezSingleAttachmentFromInventory (IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc)
 
void RezMultipleAttachmentsFromInventory (IScenePresence sp, List< KeyValuePair< UUID, uint >> rezlist)
 Rez multiple attachments from a user's inventory More...
 
void DetachSingleAttachmentToGround (IScenePresence sp, uint soLocalId)
 Detach the given item to the ground. More...
 
void DetachSingleAttachmentToGround (IScenePresence sp, uint soLocalId, Vector3 absolutePos, Quaternion absoluteRot)
 Detach the given item to the ground at the specified coordinates & rotation More...
 
void DetachSingleAttachmentToInv (IScenePresence sp, SceneObjectGroup so)
 Detach the given attachment so that it remains in the user's inventory. More...
 
void UpdateAttachmentPosition (SceneObjectGroup sog, Vector3 pos)
 
void SubscribeToClientEvents (IClientAPI client)
 
void UnsubscribeFromClientEvents (IClientAPI client)
 

Protected Member Functions

SceneObjectGroup RezSingleAttachmentFromInventoryInternal (IScenePresence sp, UUID itemID, UUID assetID, uint attachmentPt, bool append, XmlDocument doc)
 

Properties

int DebugLevel [get, set]
 
int ThrottlePer100PrimsRezzed [get, set]
 Period to sleep per 100 prims in order to avoid CPU spikes when an avatar with many attachments logs in/changes outfit or many avatars with a medium levels of attachments login/change outfit simultaneously. More...
 
bool Enabled [get, set]
 Are attachments enabled? More...
 
string Name [get]
 
Type ReplaceableInterface [get]
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IRegionModuleBase
string Name [get]
 
Type ReplaceableInterface [get]
 If this returns non-null, it is the type of an interface that this module intends to register. This will cause the loader to defer loading of this module until all other modules have been loaded. If no other module has registered the interface by then, this module will be activated, else it will remain inactive, letting the other module take over. This should return non-null ONLY in modules that are intended to be easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party provided modules. More...
 

Detailed Description

Definition at line 49 of file AttachmentsModule.cs.

Member Function Documentation

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.AddRegion ( Scene  scene)
inline

This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 91 of file AttachmentsModule.cs.

bool OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.AttachObject ( IScenePresence  sp,
SceneObjectGroup  grp,
uint  AttachmentPt,
bool  silent,
bool  addToInventory,
bool  append 
)
inline

Attach an object to an avatar.

Parameters
sp
grp
AttachmentPt
silent
addToInventoryIf true then add object to user inventory
appendAppend to attachment point rather than replace.
Returns
true if the object was successfully attached, false otherwise

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 458 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.Close ( )
inline

This is the inverse to Initialise. After a Close(), this instance won't be usable anymore.

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 215 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.CopyAttachments ( IScenePresence  sp,
AgentData  ad 
)
inline

Copy attachment data from a ScenePresence into the AgentData structure for transmission to another simulator

Parameters
sp
ad

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 224 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.CopyAttachments ( AgentData  ad,
IScenePresence  sp 
)
inline

Copy attachment data from an AgentData structure into a ScenePresence.

Parameters
ad
sp

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 257 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DeleteAttachmentsFromScene ( IScenePresence  sp,
bool  silent 
)
inline

Delete all the presence's attachments from the scene This is done when a root agent leaves/is demoted to child (for instance, on logout, teleport or region cross).

Parameters
sp
silent

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 440 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DeRezAttachments ( IScenePresence  sp)
inline

Derez the attachements for a scene presence that is closing.

Attachment changes are saved.

Parameters
spThe presence closing
saveChangedSave changed attachments.
saveAllScriptedSave attachments with scripts even if they haven't changed.

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 392 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DetachSingleAttachmentToGround ( IScenePresence  sp,
uint  objectLocalID 
)
inline

Detach the given item to the ground.

Parameters
sp
objectLocalID

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 676 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DetachSingleAttachmentToGround ( IScenePresence  sp,
uint  objectLocalID,
Vector3  absolutePos,
Quaternion  absoluteRot 
)
inline

Detach the given item to the ground at the specified coordinates & rotation

Parameters
sp
objectLocalID
absolutePos
absoluteRot

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 684 of file AttachmentsModule.cs.

Here is the call graph for this function:

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DetachSingleAttachmentToInv ( IScenePresence  sp,
SceneObjectGroup  grp 
)
inline

Detach the given attachment so that it remains in the user's inventory.

Parameters
sp/param>
Parameters
grpThe attachment to detach.

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 767 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.Initialise ( IConfigSource  source)
inline

This is called to initialize the region module. For shared modules, this is called exactly once, after creating the single (shared) instance. For non-shared modules, this is called once on each instance, after the instace for the region has been created.

Parameters
sourceA IConfigSource

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 76 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RegionLoaded ( Scene  scene)
inline

This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 210 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RemoveRegion ( Scene  scene)
inline

This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 202 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RezAttachments ( IScenePresence  sp)
inline

RezAttachments. This should only be called upon login on the first region. Attachment rezzings on crossings and TPs are done in a different way.

This is only actually necessary for viewers which do not have a current outfit folder (these viewers make their own attachment calls on login) and agents which have attachments but no viewer (e.g. NPCs).

Parameters
sp

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 282 of file AttachmentsModule.cs.

Here is the call graph for this function:

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RezMultipleAttachmentsFromInventory ( IScenePresence  sp,
List< KeyValuePair< UUID, uint >>  rezlist 
)
inline

Rez multiple attachments from a user's inventory

Parameters
sp
rezlist

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 660 of file AttachmentsModule.cs.

ISceneEntity OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RezSingleAttachmentFromInventory ( IScenePresence  sp,
UUID  itemID,
uint  AttachmentPt 
)
inline

Rez an attachment from user inventory and change inventory status to match.

Parameters
sp
itemID
AttachmentPt
Returns
The scene object that was attached. Null if the scene object could not be found

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 614 of file AttachmentsModule.cs.

ISceneEntity OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RezSingleAttachmentFromInventory ( IScenePresence  sp,
UUID  itemID,
uint  AttachmentPt,
XmlDocument  doc 
)
inline
SceneObjectGroup OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.RezSingleAttachmentFromInventoryInternal ( IScenePresence  sp,
UUID  itemID,
UUID  assetID,
uint  attachmentPt,
bool  append,
XmlDocument  doc 
)
inlineprotected

Definition at line 1088 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.SubscribeToClientEvents ( IClientAPI  client)
inline

Definition at line 820 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.UnsubscribeFromClientEvents ( IClientAPI  client)
inline

Definition at line 833 of file AttachmentsModule.cs.

void OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.UpdateAttachmentPosition ( SceneObjectGroup  sog,
Vector3  pos 
)
inline

Update the position of an attachment.

Parameters
sog
pos

Implements OpenSim.Region.Framework.Interfaces.IAttachmentsModule.

Definition at line 804 of file AttachmentsModule.cs.

Property Documentation

int OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.DebugLevel
getset

Definition at line 54 of file AttachmentsModule.cs.

bool OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.Enabled
getset

Are attachments enabled?

Definition at line 71 of file AttachmentsModule.cs.

string OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.Name
get

Definition at line 73 of file AttachmentsModule.cs.

Type OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.ReplaceableInterface
get

Definition at line 74 of file AttachmentsModule.cs.

int OpenSim.Region.CoreModules.Avatar.Attachments.AttachmentsModule.ThrottlePer100PrimsRezzed
getset

Period to sleep per 100 prims in order to avoid CPU spikes when an avatar with many attachments logs in/changes outfit or many avatars with a medium levels of attachments login/change outfit simultaneously.

A value of 0 will apply no pause. The pause is specified in milliseconds.

Definition at line 63 of file AttachmentsModule.cs.


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