C# Класс OpenMetaverse.AgentManager.AgentMovement

Agent movement and camera control Agent movement is controlled by setting specific T:AgentManager.ControlFlags After the control flags are set, An AgentUpdate is required to update the simulator of the specified flags This is most easily accomplished by setting one or more of the AgentMovement properties Movement of an avatar is always based on a compass direction, for example AtPos will move the agent from West to East or forward on the X Axis, AtNeg will of course move agent from East to West or backward on the X Axis, LeftPos will be South to North or forward on the Y Axis The Z axis is Up, finer grained control of movements can be done using the Nudge properties
Показать файл Открыть проект

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

Свойство Тип Описание
BodyRotation Quaternion
Camera AgentCamera
Flags AgentFlags
HeadRotation Quaternion
State AgentState

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

Метод Описание
AgentMovement ( GridClient client ) : System

Default constructor

SendManualUpdate ( AgentManager controlFlags, System.Vector3 position, System.Vector3 forwardAxis, System.Vector3 leftAxis, System.Vector3 upAxis, Quaternion bodyRotation, Quaternion headRotation, float farClip, AgentFlags flags, AgentState state, bool reliable ) : void

Builds an AgentUpdate packet entirely from parameters. This will not touch the state of Self.Movement or Self.Movement.Camera in any way

SendUpdate ( ) : void

Send new AgentUpdate packet to update our current camera position and rotation

SendUpdate ( bool reliable ) : void

Send new AgentUpdate packet to update our current camera position and rotation

SendUpdate ( bool reliable, Simulator simulator ) : void

Send new AgentUpdate packet to update our current camera position and rotation

TurnToward ( System.Vector3 target ) : bool

Rotates the avatar body and camera toward a target position. This will also anchor the camera position on the avatar

UpdateFromHeading ( double heading, bool reliable ) : void

Send an AgentUpdate with the camera set at the current agent position and pointing towards the heading specified

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

Метод Описание
GetControlFlag ( ControlFlags flag ) : bool
ResetControlFlags ( ) : void
SetControlFlag ( ControlFlags flag, bool value ) : void
UpdateTimer_Elapsed ( object obj ) : void

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

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

Default constructor
public AgentMovement ( GridClient client ) : System
client GridClient
Результат System

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

Builds an AgentUpdate packet entirely from parameters. This will not touch the state of Self.Movement or Self.Movement.Camera in any way
public SendManualUpdate ( AgentManager controlFlags, System.Vector3 position, System.Vector3 forwardAxis, System.Vector3 leftAxis, System.Vector3 upAxis, Quaternion bodyRotation, Quaternion headRotation, float farClip, AgentFlags flags, AgentState state, bool reliable ) : void
controlFlags AgentManager
position System.Vector3
forwardAxis System.Vector3
leftAxis System.Vector3
upAxis System.Vector3
bodyRotation Quaternion
headRotation Quaternion
farClip float
flags AgentFlags
state AgentState
reliable bool
Результат void

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

Send new AgentUpdate packet to update our current camera position and rotation
public SendUpdate ( ) : void
Результат void

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

Send new AgentUpdate packet to update our current camera position and rotation
public SendUpdate ( bool reliable ) : void
reliable bool Whether to require server acknowledgement /// of this packet
Результат void

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

Send new AgentUpdate packet to update our current camera position and rotation
public SendUpdate ( bool reliable, Simulator simulator ) : void
reliable bool Whether to require server acknowledgement /// of this packet
simulator Simulator Simulator to send the update to
Результат void

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

Rotates the avatar body and camera toward a target position. This will also anchor the camera position on the avatar
public TurnToward ( System.Vector3 target ) : bool
target System.Vector3 Region coordinates to turn toward
Результат bool

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

Send an AgentUpdate with the camera set at the current agent position and pointing towards the heading specified
public UpdateFromHeading ( double heading, bool reliable ) : void
heading double Camera rotation in radians
reliable bool Whether to send the AgentUpdate reliable /// or not
Результат void

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

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

public Quaternion BodyRotation
Результат Quaternion

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

Agent camera controls
public AgentCamera Camera
Результат AgentCamera

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

Currently only used for hiding your group title
public AgentFlags Flags
Результат AgentFlags

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

public Quaternion HeadRotation
Результат Quaternion

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

Action state of the avatar, which can currently be typing and editing
public AgentState State
Результат AgentState