本文整理汇总了C#中IClientAPI.SendPrimUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendPrimUpdate方法的具体用法?C# IClientAPI.SendPrimUpdate怎么用?C# IClientAPI.SendPrimUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.SendPrimUpdate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendTerseUpdateToClient
public void SendTerseUpdateToClient(IClientAPI remoteClient)
{
if (ParentGroup == null || ParentGroup.IsDeleted)
return;
if (IsAttachment && ParentGroup.RootPart != this)
return;
// Causes this thread to dig into the Client Thread Data.
// Remember your locking here!
remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
}
示例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)
{
// Suppress full updates during attachment editing
//
if (ParentGroup.IsSelected && IsAttachment)
return;
if (ParentGroup.IsDeleted)
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.SendPrimUpdate(this, PrimUpdateFlags.FullUpdate);
}
示例3: 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.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
}
示例4: 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)
{
m_perfMonMS = Util.EnvironmentTickCount();
Vector3 pos = m_pos;
pos.Z += m_appearance.HipOffset;
//m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity);
remoteClient.SendPrimUpdate(
this,
PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
m_scene.StatsReporter.AddAgentUpdates(1);
}
}
示例5: SendTerseUpdateToClient
public void SendTerseUpdateToClient(IClientAPI remoteClient)
{
if (ParentGroup == null || ParentGroup.IsDeleted)
return;
Vector3 lPos = OffsetPosition;
if (IsAttachment)
{
if (ParentGroup.RootPart != this)
return;
lPos = ParentGroup.RootPart.AttachedPos;
}
else
{
if (ParentGroup.RootPart == this)
lPos = AbsolutePosition;
}
// Causes this thread to dig into the Client Thread Data.
// Remember your locking here!
remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity);
}