本文整理汇总了C#中IClientAPI.SendEntityUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendEntityUpdate方法的具体用法?C# IClientAPI.SendEntityUpdate怎么用?C# IClientAPI.SendEntityUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.SendEntityUpdate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendTerseUpdateToClient
public void SendTerseUpdateToClient(IClientAPI remoteClient)
{
if (ParentGroup.IsDeleted)
return;
if (ParentGroup.IsAttachment && ((ParentGroup.RootPart != this) ||
((ParentGroup.AttachedAvatar != remoteClient.AgentId) && (ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))))
return;
// Causes this thread to dig into the Client Thread Data.
// Remember your locking here!
remoteClient.SendEntityUpdate(
this,
PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
}
示例2: SendFullUpdateToClient
/// <summary>
/// Sends a full update to the client
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="lPos"></param>
/// <param name="clientFlags"></param>
public void SendFullUpdateToClient(IClientAPI remoteClient, Vector3 lPos, uint clientFlags)
{
if (ParentGroup == null)
return;
// Suppress full updates during attachment editing
//
if (ParentGroup.IsSelected && ParentGroup.IsAttachment)
return;
if (ParentGroup.IsDeleted)
return;
if (ParentGroup.IsAttachment && (ParentGroup.AttachedAvatar != remoteClient.AgentId) &&
(ParentGroup.AttachmentPoint >= 31) && (ParentGroup.AttachmentPoint <= 38))
return;
clientFlags &= ~(uint) PrimFlags.CreateSelected;
if (remoteClient.AgentId == OwnerID)
{
if ((Flags & PrimFlags.CreateSelected) != 0)
{
clientFlags |= (uint) PrimFlags.CreateSelected;
Flags &= ~PrimFlags.CreateSelected;
}
}
//bool isattachment = IsAttachment;
//if (LocalId != ParentGroup.RootPart.LocalId)
//isattachment = ParentGroup.RootPart.IsAttachment;
remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate);
ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
}
示例3: SendFullUpdateToClient
public void SendFullUpdateToClient(IClientAPI remoteClient)
{
if (remoteClient.IsActive)
{
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate);
m_scene.StatsReporter.AddAgentUpdates(1);
}
}
示例4: SendTerseUpdateToClient
/// <summary>
/// Sends a location update to the client connected to this scenePresence
/// via entity updates
/// </summary>
/// <param name="remoteClient"></param>
public void SendTerseUpdateToClient(IClientAPI remoteClient)
{
// If the client is inactive, it's getting its updates from another
// server.
if (remoteClient.IsActive)
{
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
remoteClient.SendEntityUpdate(
this,
PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
m_scene.StatsReporter.AddAgentUpdates(1);
}
}
示例5: SendTerseUpdateToClient
/// <summary>
/// Sends a location update to the client connected to this scenePresence
/// </summary>
/// <param name="remoteClient"></param>
public void SendTerseUpdateToClient(IClientAPI remoteClient)
{
// If the client is inactive, it's getting its updates from another
// server.
if (remoteClient.IsActive)
{
if (Scene.RootTerseUpdatePeriod > 1)
{
// Console.WriteLine(
// "{0} {1} {2} {3} {4} {5} for {6} to {7}",
// remoteClient.AgentId, UUID, remoteClient.SceneAgent.IsChildAgent, m_terseUpdateCount, Scene.RootTerseUpdatePeriod, Velocity.ApproxEquals(Vector3.Zero, 0.001f), Name, remoteClient.Name);
if (remoteClient.AgentId != UUID
&& !remoteClient.SceneAgent.IsChildAgent
&& m_terseUpdateCount % Scene.RootTerseUpdatePeriod != 0
&& !Velocity.ApproxEquals(Vector3.Zero, 0.001f))
{
// m_log.DebugFormat("[SCENE PRESENCE]: Discarded update from {0} to {1}, args {2} {3} {4} {5} {6} {7}",
// Name, remoteClient.Name, remoteClient.AgentId, UUID, remoteClient.SceneAgent.IsChildAgent, m_terseUpdateCount, Scene.RootTerseUpdatePeriod, Velocity.ApproxEquals(Vector3.Zero, 0.001f));
return;
}
}
if (Scene.ChildTerseUpdatePeriod > 1
&& remoteClient.SceneAgent.IsChildAgent
&& m_terseUpdateCount % Scene.ChildTerseUpdatePeriod != 0
&& !Velocity.ApproxEquals(Vector3.Zero, 0.001f))
return;
//m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity);
remoteClient.SendEntityUpdate(
this,
PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
m_scene.StatsReporter.AddAgentUpdates(1);
}
}