C# Class OpenSim.Region.Framework.Scenes.ScenePresence

Inheritance: EntityBase, IScenePresence
Afficher le fichier Open project: N3X15/VoxelSim Class Usage Examples

Méthodes publiques

Свойство Type Description
CollisionPlane Vector4
IsRestrictedToRegion bool
JID string
SitGround bool
currentParcelUUID UUID
lastKnownAllowedPosition Vector3
sentMessageAboutRestrictedParcelFlyingDown bool

Protected Properties

Свойство Type Description
crossingFromRegion ulong
m_CameraAtAxis Vector3
m_CameraCenter Vector3
m_CameraLeftAxis Vector3
m_CameraUpAxis Vector3
m_DrawDistance float
m_allowMovement bool
m_animator ScenePresenceAnimator
m_appearance AvatarAppearance
m_attachments List
m_lastCameraCenter Vector3
m_parentPosition Vector3
m_physicsActor PhysicsActor
m_regionInfo RegionInfo
m_reprioritization_called bool
m_reprioritization_timer Timer
m_reprioritizing bool

Méthodes publiques

Méthode Description
AddAttachment ( SceneObjectGroup gobj ) : void
AddNeighbourRegion ( ulong regionHandle, string cap ) : void
AddNewMovement ( System.Vector3 vec, Quaternion rotation ) : void

Rotate the avatar to the given rotation and apply a movement in the given relative vector

AddToPhysicalScene ( bool isFlying ) : void

Adds a physical representation of the avatar to the Physics plugin

AdjustKnownSeeds ( ) : void
ChildAgentDataUpdate ( AgentData cAgentData ) : void
ChildAgentDataUpdate ( AgentPosition cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY ) : void

This updates important decision making data about a child agent The main purpose is to figure out what objects to send to a child agent that's in a neighboring region

Close ( ) : void
CloseChildAgents ( uint newRegionX, uint newRegionY ) : void

Computes which child agents to close when the scene presence moves to another region. Removes those regions from m_knownRegions.

CompleteMovement ( IClientAPI client ) : void

Complete Avatar's movement into the region. This is called upon a very important packet sent from the client, so it's client-controlled. Never call this method directly.

CopyAgent ( IAgentData &agent ) : bool
CopyFrom ( AgentData cAgent ) : void
CopyTo ( AgentData cAgent ) : void
DoAutoPilot ( uint not_used, Vector3 Pos, IClientAPI remote_client ) : void
DoMoveToPosition ( Object sender, string method, List args ) : void
DropOldNeighbours ( List oldRegions ) : void
DumpKnownRegions ( ) : void
GenerateClientFlags ( UUID ObjectID ) : uint
GetAttachments ( uint attachmentPoint ) : List

Get the scene object attached to the given point.

GetKnownRegionList ( ) : List
GrantGodlikePowers ( UUID agentID, UUID sessionID, UUID token, bool godStatus ) : void

This allows the Sim owner the abiility to kick users from their sim currently. It tells the client that the agent has permission to do so.

HandleAgentRequestSit ( IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset ) : void
HandleAgentRequestSit ( IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation ) : void
HandleAgentSit ( IClientAPI remoteClient, UUID agentID ) : void
HandleAgentSit ( IClientAPI remoteClient, UUID agentID, string sitAnimation ) : void
HandleAgentUpdate ( IClientAPI remoteClient, AgentUpdateArgs agentData ) : void

This is the event handler for client movement. If a client is moving, this event is triggering.

HandleForceReleaseControls ( IClientAPI remoteClient, UUID agentID ) : void
HandleSetAlwaysRun ( IClientAPI remoteClient, bool pSetAlwaysRun ) : void

Event handler for the 'Always run' setting on the client Tells the physics plugin to increase speed of movement.

HandleStartAnim ( IClientAPI remoteClient, UUID animID ) : void
HandleStopAnim ( IClientAPI remoteClient, UUID animID ) : void
HasAttachments ( ) : bool
HasScriptedAttachments ( ) : bool
InTransit ( ) : void
MakeChildAgent ( ) : void

This turns a root agent into a child agent when an agent departs this region for a neighbor, this gets called. It doesn't get called for a teleport. Reason being, an agent that teleports out may not end up anywhere near this region

MakeRootAgent ( Vector3 pos, bool isFlying ) : void

This turns a child agent, into a root agent This is called when an agent teleports into a region, or if an agent crosses into this region from a neighbor over the border

NotInTransit ( ) : void
RayCastCameraCallback ( bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal ) : void

Callback for the Camera view block check. Gets called with the results of the camera view block test hitYN is true when there's something in the way.

RegisterControlEventsToScript ( int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID ) : void
RegisterToEvents ( ) : void
RemoveAttachment ( SceneObjectGroup gobj ) : void
RemoveNeighbourRegion ( ulong regionHandle ) : void
Reset ( ) : void
RestoreInCurrentScene ( ) : void
RezAttachments ( ) : void

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

ScenePresence ( ) : System
ScenePresence ( IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance ) : System
SendAppearanceToAllOtherAgents ( ) : void

SendAppearanceToOtherAgent ( ScenePresence avatar ) : void

Send appearance data to an agent that isn't this one.

SendCoarseLocations ( List coarseLocations, List avatarUUIDs ) : void
SendCoarseLocationsDefault ( UUID sceneId, ScenePresence p, List coarseLocations, List avatarUUIDs ) : void
SendFullUpdateToAllClients ( ) : void
SendFullUpdateToOtherClient ( ScenePresence remoteAvatar ) : void

Tell other client about this avatar (The client previously didn't know or had outdated details about this avatar)

SendInitialData ( ) : void

Do everything required once a client completes its movement into a region

SendInitialFullUpdateToAllClients ( ) : void

Tell *ALL* agents about this agent

SendPrimUpdates ( ) : void

Send updates to the client about prims which have been placed on the update queue. We don't necessarily send updates for all the parts on the queue, e.g. if an updates with a more recent timestamp has already been sent.

SendScriptEventToAttachments ( string eventName, Object args ) : void

Send a script event to this scene presence's attachments

SendTerseUpdateToAllClients ( ) : void

Send a location/velocity/accelleration update to all agents in scene

SendTerseUpdateToClient ( IClientAPI remoteClient ) : void

Sends a location update to the client connected to this scenePresence

SetHeight ( float height ) : void

Sets avatar height in the phyiscs plugin

SetSendCourseLocationMethod ( SendCourseLocationsMethod d ) : void
StandUp ( ) : void

Perform the logic necessary to stand the avatar up. This method also executes the stand animation.

StopFlying ( ) : void
StopMovement ( ) : void

Teleport ( Vector3 pos ) : void

TeleportWithMomentum ( Vector3 pos ) : void
UnRegisterControlEventsToScript ( uint Obj_localID, UUID Script_item_UUID ) : void
Update ( ) : void
UpdateMovement ( ) : void

Handles part of the PID controller function for moving an avatar.

ValidateAttachments ( ) : bool
initializeScenePresence ( IClientAPI client, RegionInfo region, Scene scene ) : void
setHealthWithUpdate ( float health ) : void

Méthodes protégées

Méthode Description
CheckForBorderCrossing ( ) : void

Checks to see if the avatar is in range of a border and calls CrossToNewRegion

CheckForSignificantMovement ( ) : void

This checks for a significant movement and sends a courselocationchange update

CrossToNewRegion ( ) : void

Moves the agent outside the region bounds Tells neighbor region that we're crossing to it If the neighbor accepts, remove the agent's viewable avatar from this scene set them to a child agent.

HaveNeighbor ( Cardinals car, int &fix ) : int

Private Methods

Méthode Description
CheckAtSitTarget ( ) : void
CreateSceneViewer ( ) : void
FindNextAvailableSitTarget ( UUID targetID ) : SceneObjectPart
GetWalkDirectionVectors ( ) : Vector3[]
OutOfBoundsCall ( Vector3 pos ) : void
PhysicsCollisionUpdate ( EventArgs e ) : void
PushForce ( Vector3 impulse ) : void
RemoveFromPhysicalScene ( ) : void

Removes physics plugin scene representation of this agent if it exists.

RemoveIgnoredControls ( AgentManager flags, ScriptControlled ignored ) : AgentManager.ControlFlags
Reprioritize ( object sender, ElapsedEventArgs e ) : void
ReprioritizeUpdates ( ) : void
ScenePresence ( IClientAPI client, Scene world, RegionInfo reginfo ) : System
SendControlToScripts ( uint flags ) : void
SendSitResponse ( IClientAPI remoteClient, UUID targetID, Vector3 offset, Quaternion pSitOrientation ) : void
SetDirectionVectors ( ) : void

Method Details

AddAttachment() public méthode

public AddAttachment ( SceneObjectGroup gobj ) : void
gobj SceneObjectGroup
Résultat void

AddNeighbourRegion() public méthode

public AddNeighbourRegion ( ulong regionHandle, string cap ) : void
regionHandle ulong
cap string
Résultat void

AddNewMovement() public méthode

Rotate the avatar to the given rotation and apply a movement in the given relative vector
public AddNewMovement ( System.Vector3 vec, Quaternion rotation ) : void
vec System.Vector3 The vector in which to move. This is relative to the rotation argument
rotation Quaternion
Résultat void

AddToPhysicalScene() public méthode

Adds a physical representation of the avatar to the Physics plugin
public AddToPhysicalScene ( bool isFlying ) : void
isFlying bool
Résultat void

AdjustKnownSeeds() public méthode

public AdjustKnownSeeds ( ) : void
Résultat void

CheckForBorderCrossing() protected méthode

Checks to see if the avatar is in range of a border and calls CrossToNewRegion
protected CheckForBorderCrossing ( ) : void
Résultat void

CheckForSignificantMovement() protected méthode

This checks for a significant movement and sends a courselocationchange update
protected CheckForSignificantMovement ( ) : void
Résultat void

ChildAgentDataUpdate() public méthode

public ChildAgentDataUpdate ( AgentData cAgentData ) : void
cAgentData OpenSim.Framework.AgentData
Résultat void

ChildAgentDataUpdate() public méthode

This updates important decision making data about a child agent The main purpose is to figure out what objects to send to a child agent that's in a neighboring region
public ChildAgentDataUpdate ( AgentPosition cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY ) : void
cAgentData OpenSim.Framework.AgentPosition
tRegionX uint
tRegionY uint
rRegionX uint
rRegionY uint
Résultat void

Close() public méthode

public Close ( ) : void
Résultat void

CloseChildAgents() public méthode

Computes which child agents to close when the scene presence moves to another region. Removes those regions from m_knownRegions.
public CloseChildAgents ( uint newRegionX, uint newRegionY ) : void
newRegionX uint The new region's x on the map
newRegionY uint The new region's y on the map
Résultat void

CompleteMovement() public méthode

Complete Avatar's movement into the region. This is called upon a very important packet sent from the client, so it's client-controlled. Never call this method directly.
public CompleteMovement ( IClientAPI client ) : void
client IClientAPI
Résultat void

CopyAgent() public méthode

public CopyAgent ( IAgentData &agent ) : bool
agent IAgentData
Résultat bool

CopyFrom() public méthode

public CopyFrom ( AgentData cAgent ) : void
cAgent AgentData
Résultat void

CopyTo() public méthode

public CopyTo ( AgentData cAgent ) : void
cAgent AgentData
Résultat void

CrossToNewRegion() protected méthode

Moves the agent outside the region bounds Tells neighbor region that we're crossing to it If the neighbor accepts, remove the agent's viewable avatar from this scene set them to a child agent.
protected CrossToNewRegion ( ) : void
Résultat void

DoAutoPilot() public méthode

public DoAutoPilot ( uint not_used, Vector3 Pos, IClientAPI remote_client ) : void
not_used uint
Pos Vector3
remote_client IClientAPI
Résultat void

DoMoveToPosition() public méthode

public DoMoveToPosition ( Object sender, string method, List args ) : void
sender Object
method string
args List
Résultat void

DropOldNeighbours() public méthode

public DropOldNeighbours ( List oldRegions ) : void
oldRegions List
Résultat void

DumpKnownRegions() public méthode

public DumpKnownRegions ( ) : void
Résultat void

GenerateClientFlags() public méthode

public GenerateClientFlags ( UUID ObjectID ) : uint
ObjectID UUID
Résultat uint

GetAttachments() public méthode

Get the scene object attached to the given point.
public GetAttachments ( uint attachmentPoint ) : List
attachmentPoint uint
Résultat List

GetKnownRegionList() public méthode

public GetKnownRegionList ( ) : List
Résultat List

GrantGodlikePowers() public méthode

This allows the Sim owner the abiility to kick users from their sim currently. It tells the client that the agent has permission to do so.
public GrantGodlikePowers ( UUID agentID, UUID sessionID, UUID token, bool godStatus ) : void
agentID UUID
sessionID UUID
token UUID
godStatus bool
Résultat void

HandleAgentRequestSit() public méthode

public HandleAgentRequestSit ( IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset ) : void
remoteClient IClientAPI
agentID UUID
targetID UUID
offset Vector3
Résultat void

HandleAgentRequestSit() public méthode

public HandleAgentRequestSit ( IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation ) : void
remoteClient IClientAPI
agentID UUID
targetID UUID
offset Vector3
sitAnimation string
Résultat void

HandleAgentSit() public méthode

public HandleAgentSit ( IClientAPI remoteClient, UUID agentID ) : void
remoteClient IClientAPI
agentID UUID
Résultat void

HandleAgentSit() public méthode

public HandleAgentSit ( IClientAPI remoteClient, UUID agentID, string sitAnimation ) : void
remoteClient IClientAPI
agentID UUID
sitAnimation string
Résultat void

HandleAgentUpdate() public méthode

This is the event handler for client movement. If a client is moving, this event is triggering.
public HandleAgentUpdate ( IClientAPI remoteClient, AgentUpdateArgs agentData ) : void
remoteClient IClientAPI
agentData AgentUpdateArgs
Résultat void

HandleForceReleaseControls() public méthode

public HandleForceReleaseControls ( IClientAPI remoteClient, UUID agentID ) : void
remoteClient IClientAPI
agentID UUID
Résultat void

HandleSetAlwaysRun() public méthode

Event handler for the 'Always run' setting on the client Tells the physics plugin to increase speed of movement.
public HandleSetAlwaysRun ( IClientAPI remoteClient, bool pSetAlwaysRun ) : void
remoteClient IClientAPI
pSetAlwaysRun bool
Résultat void

HandleStartAnim() public méthode

public HandleStartAnim ( IClientAPI remoteClient, UUID animID ) : void
remoteClient IClientAPI
animID UUID
Résultat void

HandleStopAnim() public méthode

public HandleStopAnim ( IClientAPI remoteClient, UUID animID ) : void
remoteClient IClientAPI
animID UUID
Résultat void

HasAttachments() public méthode

public HasAttachments ( ) : bool
Résultat bool

HasScriptedAttachments() public méthode

public HasScriptedAttachments ( ) : bool
Résultat bool

HaveNeighbor() protected méthode

protected HaveNeighbor ( Cardinals car, int &fix ) : int
car Cardinals
fix int
Résultat int

InTransit() public méthode

public InTransit ( ) : void
Résultat void

MakeChildAgent() public méthode

This turns a root agent into a child agent when an agent departs this region for a neighbor, this gets called. It doesn't get called for a teleport. Reason being, an agent that teleports out may not end up anywhere near this region
public MakeChildAgent ( ) : void
Résultat void

MakeRootAgent() public méthode

This turns a child agent, into a root agent This is called when an agent teleports into a region, or if an agent crosses into this region from a neighbor over the border
public MakeRootAgent ( Vector3 pos, bool isFlying ) : void
pos Vector3
isFlying bool
Résultat void

NotInTransit() public méthode

public NotInTransit ( ) : void
Résultat void

RayCastCameraCallback() public méthode

Callback for the Camera view block check. Gets called with the results of the camera view block test hitYN is true when there's something in the way.
public RayCastCameraCallback ( bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 pNormal ) : void
hitYN bool
collisionPoint Vector3
localid uint
distance float
pNormal Vector3
Résultat void

RegisterControlEventsToScript() public méthode

public RegisterControlEventsToScript ( int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID ) : void
controls int
accept int
pass_on int
Obj_localID uint
Script_item_UUID UUID
Résultat void

RegisterToEvents() public méthode

public RegisterToEvents ( ) : void
Résultat void

RemoveAttachment() public méthode

public RemoveAttachment ( SceneObjectGroup gobj ) : void
gobj SceneObjectGroup
Résultat void

RemoveNeighbourRegion() public méthode

public RemoveNeighbourRegion ( ulong regionHandle ) : void
regionHandle ulong
Résultat void

Reset() public méthode

public Reset ( ) : void
Résultat void

RestoreInCurrentScene() public méthode

public RestoreInCurrentScene ( ) : void
Résultat void

RezAttachments() public méthode

RezAttachments. This should only be called upon login on the first region. Attachment rezzings on crossings and TPs are done in a different way.
public RezAttachments ( ) : void
Résultat void

ScenePresence() public méthode

public ScenePresence ( ) : System
Résultat System

ScenePresence() public méthode

public ScenePresence ( IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance ) : System
client IClientAPI
world Scene
reginfo RegionInfo
appearance AvatarAppearance
Résultat System

SendAppearanceToAllOtherAgents() public méthode

public SendAppearanceToAllOtherAgents ( ) : void
Résultat void

SendAppearanceToOtherAgent() public méthode

Send appearance data to an agent that isn't this one.
public SendAppearanceToOtherAgent ( ScenePresence avatar ) : void
avatar ScenePresence
Résultat void

SendCoarseLocations() public méthode

public SendCoarseLocations ( List coarseLocations, List avatarUUIDs ) : void
coarseLocations List
avatarUUIDs List
Résultat void

SendCoarseLocationsDefault() public méthode

public SendCoarseLocationsDefault ( UUID sceneId, ScenePresence p, List coarseLocations, List avatarUUIDs ) : void
sceneId UUID
p ScenePresence
coarseLocations List
avatarUUIDs List
Résultat void

SendFullUpdateToAllClients() public méthode

public SendFullUpdateToAllClients ( ) : void
Résultat void

SendFullUpdateToOtherClient() public méthode

Tell other client about this avatar (The client previously didn't know or had outdated details about this avatar)
public SendFullUpdateToOtherClient ( ScenePresence remoteAvatar ) : void
remoteAvatar ScenePresence
Résultat void

SendInitialData() public méthode

Do everything required once a client completes its movement into a region
public SendInitialData ( ) : void
Résultat void

SendInitialFullUpdateToAllClients() public méthode

Tell *ALL* agents about this agent
public SendInitialFullUpdateToAllClients ( ) : void
Résultat void

SendPrimUpdates() public méthode

Send updates to the client about prims which have been placed on the update queue. We don't necessarily send updates for all the parts on the queue, e.g. if an updates with a more recent timestamp has already been sent.
public SendPrimUpdates ( ) : void
Résultat void

SendScriptEventToAttachments() public méthode

Send a script event to this scene presence's attachments
public SendScriptEventToAttachments ( string eventName, Object args ) : void
eventName string The name of the event
args Object The arguments for the event
Résultat void

SendTerseUpdateToAllClients() public méthode

Send a location/velocity/accelleration update to all agents in scene
public SendTerseUpdateToAllClients ( ) : void
Résultat void

SendTerseUpdateToClient() public méthode

Sends a location update to the client connected to this scenePresence
public SendTerseUpdateToClient ( IClientAPI remoteClient ) : void
remoteClient IClientAPI
Résultat void

SetHeight() public méthode

Sets avatar height in the phyiscs plugin
public SetHeight ( float height ) : void
height float
Résultat void

SetSendCourseLocationMethod() public méthode

public SetSendCourseLocationMethod ( SendCourseLocationsMethod d ) : void
d SendCourseLocationsMethod
Résultat void

StandUp() public méthode

Perform the logic necessary to stand the avatar up. This method also executes the stand animation.
public StandUp ( ) : void
Résultat void

StopFlying() public méthode

public StopFlying ( ) : void
Résultat void

StopMovement() public méthode

public StopMovement ( ) : void
Résultat void

Teleport() public méthode

public Teleport ( Vector3 pos ) : void
pos Vector3
Résultat void

TeleportWithMomentum() public méthode

public TeleportWithMomentum ( Vector3 pos ) : void
pos Vector3
Résultat void

UnRegisterControlEventsToScript() public méthode

public UnRegisterControlEventsToScript ( uint Obj_localID, UUID Script_item_UUID ) : void
Obj_localID uint
Script_item_UUID UUID
Résultat void

Update() public méthode

public Update ( ) : void
Résultat void

UpdateMovement() public méthode

Handles part of the PID controller function for moving an avatar.
public UpdateMovement ( ) : void
Résultat void

ValidateAttachments() public méthode

public ValidateAttachments ( ) : bool
Résultat bool

initializeScenePresence() public méthode

public initializeScenePresence ( IClientAPI client, RegionInfo region, Scene scene ) : void
client IClientAPI
region RegionInfo
scene Scene
Résultat void

setHealthWithUpdate() public méthode

public setHealthWithUpdate ( float health ) : void
health float
Résultat void

Property Details

CollisionPlane public_oe property

public Vector4 CollisionPlane
Résultat Vector4

IsRestrictedToRegion public_oe property

public bool IsRestrictedToRegion
Résultat bool

JID public_oe property

public string JID
Résultat string

SitGround public_oe property

public bool SitGround
Résultat bool

crossingFromRegion protected_oe property

protected ulong crossingFromRegion
Résultat ulong

currentParcelUUID public_oe property

public UUID currentParcelUUID
Résultat UUID

lastKnownAllowedPosition public_oe property

public Vector3 lastKnownAllowedPosition
Résultat Vector3

m_CameraAtAxis protected_oe property

protected Vector3 m_CameraAtAxis
Résultat Vector3

m_CameraCenter protected_oe property

protected Vector3 m_CameraCenter
Résultat Vector3

m_CameraLeftAxis protected_oe property

protected Vector3 m_CameraLeftAxis
Résultat Vector3

m_CameraUpAxis protected_oe property

protected Vector3 m_CameraUpAxis
Résultat Vector3

m_DrawDistance protected_oe property

protected float m_DrawDistance
Résultat float

m_allowMovement protected_oe property

protected bool m_allowMovement
Résultat bool

m_animator protected_oe property

protected ScenePresenceAnimator m_animator
Résultat ScenePresenceAnimator

m_appearance protected_oe property

protected AvatarAppearance m_appearance
Résultat AvatarAppearance

m_attachments protected_oe property

protected List m_attachments
Résultat List

m_lastCameraCenter protected_oe property

protected Vector3 m_lastCameraCenter
Résultat Vector3

m_parentPosition protected_oe property

protected Vector3 m_parentPosition
Résultat Vector3

m_physicsActor protected_oe property

protected PhysicsActor m_physicsActor
Résultat PhysicsActor

m_regionInfo protected_oe property

protected RegionInfo m_regionInfo
Résultat RegionInfo

m_reprioritization_called protected_oe property

protected bool m_reprioritization_called
Résultat bool

m_reprioritization_timer protected_oe property

protected Timer m_reprioritization_timer
Résultat Timer

m_reprioritizing protected_oe property

protected bool m_reprioritizing
Résultat bool

sentMessageAboutRestrictedParcelFlyingDown public_oe property

public bool sentMessageAboutRestrictedParcelFlyingDown
Résultat bool