C# Класс OpenSim.Region.Framework.Scenes.ScenePresence

Наследование: EntityBase, IScenePresence
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CollisionPlane Vector4
IsRestrictedToRegion bool
JID string
SitGround bool
currentParcelUUID UUID
lastKnownAllowedPosition Vector3
sentMessageAboutRestrictedParcelFlyingDown bool

Защищенные свойства (Protected)

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddAttachment() публичный Метод

public AddAttachment ( SceneObjectGroup gobj ) : void
gobj SceneObjectGroup
Результат void

AddNeighbourRegion() публичный Метод

public AddNeighbourRegion ( ulong regionHandle, string cap ) : void
regionHandle ulong
cap string
Результат void

AddNewMovement() публичный Метод

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
Результат void

AddToPhysicalScene() публичный Метод

Adds a physical representation of the avatar to the Physics plugin
public AddToPhysicalScene ( bool isFlying ) : void
isFlying bool
Результат void

AdjustKnownSeeds() публичный Метод

public AdjustKnownSeeds ( ) : void
Результат void

CheckForBorderCrossing() защищенный Метод

Checks to see if the avatar is in range of a border and calls CrossToNewRegion
protected CheckForBorderCrossing ( ) : void
Результат void

CheckForSignificantMovement() защищенный Метод

This checks for a significant movement and sends a courselocationchange update
protected CheckForSignificantMovement ( ) : void
Результат void

ChildAgentDataUpdate() публичный Метод

public ChildAgentDataUpdate ( AgentData cAgentData ) : void
cAgentData OpenSim.Framework.AgentData
Результат void

ChildAgentDataUpdate() публичный Метод

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
Результат void

Close() публичный Метод

public Close ( ) : void
Результат void

CloseChildAgents() публичный Метод

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
Результат void

CompleteMovement() публичный Метод

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
Результат void

CopyAgent() публичный Метод

public CopyAgent ( IAgentData &agent ) : bool
agent IAgentData
Результат bool

CopyFrom() публичный Метод

public CopyFrom ( AgentData cAgent ) : void
cAgent AgentData
Результат void

CopyTo() публичный Метод

public CopyTo ( AgentData cAgent ) : void
cAgent AgentData
Результат void

CrossToNewRegion() защищенный Метод

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
Результат void

DoAutoPilot() публичный Метод

public DoAutoPilot ( uint not_used, Vector3 Pos, IClientAPI remote_client ) : void
not_used uint
Pos Vector3
remote_client IClientAPI
Результат void

DoMoveToPosition() публичный Метод

public DoMoveToPosition ( Object sender, string method, List args ) : void
sender Object
method string
args List
Результат void

DropOldNeighbours() публичный Метод

public DropOldNeighbours ( List oldRegions ) : void
oldRegions List
Результат void

DumpKnownRegions() публичный Метод

public DumpKnownRegions ( ) : void
Результат void

GenerateClientFlags() публичный Метод

public GenerateClientFlags ( UUID ObjectID ) : uint
ObjectID UUID
Результат uint

GetAttachments() публичный Метод

Get the scene object attached to the given point.
public GetAttachments ( uint attachmentPoint ) : List
attachmentPoint uint
Результат List

GetKnownRegionList() публичный Метод

public GetKnownRegionList ( ) : List
Результат List

GrantGodlikePowers() публичный Метод

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
Результат void

HandleAgentRequestSit() публичный Метод

public HandleAgentRequestSit ( IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset ) : void
remoteClient IClientAPI
agentID UUID
targetID UUID
offset Vector3
Результат void

HandleAgentRequestSit() публичный Метод

public HandleAgentRequestSit ( IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation ) : void
remoteClient IClientAPI
agentID UUID
targetID UUID
offset Vector3
sitAnimation string
Результат void

HandleAgentSit() публичный Метод

public HandleAgentSit ( IClientAPI remoteClient, UUID agentID ) : void
remoteClient IClientAPI
agentID UUID
Результат void

HandleAgentSit() публичный Метод

public HandleAgentSit ( IClientAPI remoteClient, UUID agentID, string sitAnimation ) : void
remoteClient IClientAPI
agentID UUID
sitAnimation string
Результат void

HandleAgentUpdate() публичный Метод

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
Результат void

HandleForceReleaseControls() публичный Метод

public HandleForceReleaseControls ( IClientAPI remoteClient, UUID agentID ) : void
remoteClient IClientAPI
agentID UUID
Результат void

HandleSetAlwaysRun() публичный Метод

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
Результат void

HandleStartAnim() публичный Метод

public HandleStartAnim ( IClientAPI remoteClient, UUID animID ) : void
remoteClient IClientAPI
animID UUID
Результат void

HandleStopAnim() публичный Метод

public HandleStopAnim ( IClientAPI remoteClient, UUID animID ) : void
remoteClient IClientAPI
animID UUID
Результат void

HasAttachments() публичный Метод

public HasAttachments ( ) : bool
Результат bool

HasScriptedAttachments() публичный Метод

public HasScriptedAttachments ( ) : bool
Результат bool

HaveNeighbor() защищенный Метод

protected HaveNeighbor ( Cardinals car, int &fix ) : int
car Cardinals
fix int
Результат int

InTransit() публичный Метод

public InTransit ( ) : void
Результат void

MakeChildAgent() публичный Метод

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
Результат void

MakeRootAgent() публичный Метод

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
Результат void

NotInTransit() публичный Метод

public NotInTransit ( ) : void
Результат void

RayCastCameraCallback() публичный Метод

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
Результат void

RegisterControlEventsToScript() публичный Метод

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
Результат void

RegisterToEvents() публичный Метод

public RegisterToEvents ( ) : void
Результат void

RemoveAttachment() публичный Метод

public RemoveAttachment ( SceneObjectGroup gobj ) : void
gobj SceneObjectGroup
Результат void

RemoveNeighbourRegion() публичный Метод

public RemoveNeighbourRegion ( ulong regionHandle ) : void
regionHandle ulong
Результат void

Reset() публичный Метод

public Reset ( ) : void
Результат void

RestoreInCurrentScene() публичный Метод

public RestoreInCurrentScene ( ) : void
Результат void

RezAttachments() публичный Метод

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
Результат void

ScenePresence() публичный Метод

public ScenePresence ( ) : System
Результат System

ScenePresence() публичный Метод

public ScenePresence ( IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance ) : System
client IClientAPI
world Scene
reginfo RegionInfo
appearance AvatarAppearance
Результат System

SendAppearanceToAllOtherAgents() публичный Метод

public SendAppearanceToAllOtherAgents ( ) : void
Результат void

SendAppearanceToOtherAgent() публичный Метод

Send appearance data to an agent that isn't this one.
public SendAppearanceToOtherAgent ( ScenePresence avatar ) : void
avatar ScenePresence
Результат void

SendCoarseLocations() публичный Метод

public SendCoarseLocations ( List coarseLocations, List avatarUUIDs ) : void
coarseLocations List
avatarUUIDs List
Результат void

SendCoarseLocationsDefault() публичный Метод

public SendCoarseLocationsDefault ( UUID sceneId, ScenePresence p, List coarseLocations, List avatarUUIDs ) : void
sceneId UUID
p ScenePresence
coarseLocations List
avatarUUIDs List
Результат void

SendFullUpdateToAllClients() публичный Метод

public SendFullUpdateToAllClients ( ) : void
Результат void

SendFullUpdateToOtherClient() публичный Метод

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
Результат void

SendInitialData() публичный Метод

Do everything required once a client completes its movement into a region
public SendInitialData ( ) : void
Результат void

SendInitialFullUpdateToAllClients() публичный Метод

Tell *ALL* agents about this agent
public SendInitialFullUpdateToAllClients ( ) : void
Результат void

SendPrimUpdates() публичный Метод

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
Результат void

SendScriptEventToAttachments() публичный Метод

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
Результат void

SendTerseUpdateToAllClients() публичный Метод

Send a location/velocity/accelleration update to all agents in scene
public SendTerseUpdateToAllClients ( ) : void
Результат void

SendTerseUpdateToClient() публичный Метод

Sends a location update to the client connected to this scenePresence
public SendTerseUpdateToClient ( IClientAPI remoteClient ) : void
remoteClient IClientAPI
Результат void

SetHeight() публичный Метод

Sets avatar height in the phyiscs plugin
public SetHeight ( float height ) : void
height float
Результат void

SetSendCourseLocationMethod() публичный Метод

public SetSendCourseLocationMethod ( SendCourseLocationsMethod d ) : void
d SendCourseLocationsMethod
Результат void

StandUp() публичный Метод

Perform the logic necessary to stand the avatar up. This method also executes the stand animation.
public StandUp ( ) : void
Результат void

StopFlying() публичный Метод

public StopFlying ( ) : void
Результат void

StopMovement() публичный Метод

public StopMovement ( ) : void
Результат void

Teleport() публичный Метод

public Teleport ( Vector3 pos ) : void
pos Vector3
Результат void

TeleportWithMomentum() публичный Метод

public TeleportWithMomentum ( Vector3 pos ) : void
pos Vector3
Результат void

UnRegisterControlEventsToScript() публичный Метод

public UnRegisterControlEventsToScript ( uint Obj_localID, UUID Script_item_UUID ) : void
Obj_localID uint
Script_item_UUID UUID
Результат void

Update() публичный Метод

public Update ( ) : void
Результат void

UpdateMovement() публичный Метод

Handles part of the PID controller function for moving an avatar.
public UpdateMovement ( ) : void
Результат void

ValidateAttachments() публичный Метод

public ValidateAttachments ( ) : bool
Результат bool

initializeScenePresence() публичный Метод

public initializeScenePresence ( IClientAPI client, RegionInfo region, Scene scene ) : void
client IClientAPI
region RegionInfo
scene Scene
Результат void

setHealthWithUpdate() публичный Метод

public setHealthWithUpdate ( float health ) : void
health float
Результат void

Описание свойств

CollisionPlane публичное свойство

public Vector4 CollisionPlane
Результат Vector4

IsRestrictedToRegion публичное свойство

public bool IsRestrictedToRegion
Результат bool

JID публичное свойство

public string JID
Результат string

SitGround публичное свойство

public bool SitGround
Результат bool

crossingFromRegion защищенное свойство

protected ulong crossingFromRegion
Результат ulong

currentParcelUUID публичное свойство

public UUID currentParcelUUID
Результат UUID

lastKnownAllowedPosition публичное свойство

public Vector3 lastKnownAllowedPosition
Результат Vector3

m_CameraAtAxis защищенное свойство

protected Vector3 m_CameraAtAxis
Результат Vector3

m_CameraCenter защищенное свойство

protected Vector3 m_CameraCenter
Результат Vector3

m_CameraLeftAxis защищенное свойство

protected Vector3 m_CameraLeftAxis
Результат Vector3

m_CameraUpAxis защищенное свойство

protected Vector3 m_CameraUpAxis
Результат Vector3

m_DrawDistance защищенное свойство

protected float m_DrawDistance
Результат float

m_allowMovement защищенное свойство

protected bool m_allowMovement
Результат bool

m_animator защищенное свойство

protected ScenePresenceAnimator m_animator
Результат ScenePresenceAnimator

m_appearance защищенное свойство

protected AvatarAppearance m_appearance
Результат AvatarAppearance

m_attachments защищенное свойство

protected List m_attachments
Результат List

m_lastCameraCenter защищенное свойство

protected Vector3 m_lastCameraCenter
Результат Vector3

m_parentPosition защищенное свойство

protected Vector3 m_parentPosition
Результат Vector3

m_physicsActor защищенное свойство

protected PhysicsActor m_physicsActor
Результат PhysicsActor

m_regionInfo защищенное свойство

protected RegionInfo m_regionInfo
Результат RegionInfo

m_reprioritization_called защищенное свойство

protected bool m_reprioritization_called
Результат bool

m_reprioritization_timer защищенное свойство

protected Timer m_reprioritization_timer
Результат Timer

m_reprioritizing защищенное свойство

protected bool m_reprioritizing
Результат bool

sentMessageAboutRestrictedParcelFlyingDown публичное свойство

public bool sentMessageAboutRestrictedParcelFlyingDown
Результат bool