本文整理汇总了C#中PrimUpdateFlags类的典型用法代码示例。如果您正苦于以下问题:C# PrimUpdateFlags类的具体用法?C# PrimUpdateFlags怎么用?C# PrimUpdateFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrimUpdateFlags类属于命名空间,在下文中一共展示了PrimUpdateFlags类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: QueuePartForUpdate
/// <summary>
/// Add the part to the queue of parts for which we need to send an update to the client
/// </summary>
/// <param name="part"></param>
public void QueuePartForUpdate(SceneObjectPart part, PrimUpdateFlags UpdateFlags)
{
lock (m_partsUpdateQueue)
{
PrimUpdate update = new PrimUpdate();
update.Part = part;
update.UpdateFlags = UpdateFlags;
m_partsUpdateQueue.Enqueue(update);
}
}
开发者ID:shangcheng,项目名称:Aurora,代码行数:14,代码来源:SceneViewer.cs
示例2: QueuePartForUpdate
/// <summary>
/// Add the part to the queue of parts for which we need to send an update to the client
/// </summary>
/// <param name="part"></param>
public void QueuePartForUpdate(SceneObjectPart part, PrimUpdateFlags UpdateFlags)
{
lock (m_partsUpdateQueue)
{
PrimUpdate update = new PrimUpdate();
update.Part = part;
update.UpdateFlags = UpdateFlags;
m_partsUpdateQueue.Enqueue(update);
//Make it check when the user comes around to it again
if (m_objectsInView.Contains(part.UUID))
m_objectsInView.Remove(part.UUID);
}
}
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:18,代码来源:SceneViewer.cs
示例3: SendAttachmentScheduleUpdate
public void SendAttachmentScheduleUpdate(SceneObjectGroup sog)
{
if (IsChildAgent || IsInTransit)
return;
SceneObjectPart[] origparts = sog.Parts;
SceneObjectPart[] parts = new SceneObjectPart[origparts.Length];
PrimUpdateFlags[] flags = new PrimUpdateFlags[origparts.Length];
SceneObjectPart rootpart = sog.RootPart;
UpdateRequired rootreq = sog.RootPart.UpdateFlag;
int j = 0;
bool allterse = true;
for (int i = 0; i < origparts.Length; i++)
{
if (origparts[i] != rootpart)
{
switch (origparts[i].UpdateFlag)
{
case UpdateRequired.NONE:
break;
case UpdateRequired.TERSE:
flags[j] = PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity;
parts[j] = origparts[i];
j++;
break;
case UpdateRequired.FULL:
flags[j] = PrimUpdateFlags.FullUpdate;
allterse = false;
parts[j] = origparts[i];
j++;
break;
}
}
origparts[i].UpdateFlag = 0;
}
if (j == 0 && rootreq == UpdateRequired.NONE)
return;
PrimUpdateFlags rootflag = PrimUpdateFlags.FullUpdate;
if (rootreq != UpdateRequired.FULL && allterse)
{
rootflag = PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity
| PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity;
}
int nparts = j;
ControllingClient.SendEntityUpdate(rootpart, rootflag);
for (int i = 0; i < nparts; i++)
{
ControllingClient.SendEntityUpdate(parts[i], flags[i]);
}
if (sog.HasPrivateAttachmentPoint)
return;
List<ScenePresence> allPresences = m_scene.GetScenePresences();
foreach (ScenePresence p in allPresences)
{
if (p == this)
continue;
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
continue;
p.ControllingClient.SendEntityUpdate(rootpart, rootflag);
for (int i = 0; i < nparts; i++)
{
p.ControllingClient.SendEntityUpdate(parts[i], flags[i]);
}
}
}
开发者ID:CassieEllen,项目名称:opensim,代码行数:81,代码来源:ScenePresence.cs
示例4: ScheduleUpdateToAvatar
/// <summary>
/// Tell a specific avatar about the update
/// </summary>
/// <param name="UpdateFlags"></param>
/// <param name="avatar"></param>
public void ScheduleUpdateToAvatar(PrimUpdateFlags UpdateFlags, ScenePresence avatar)
{
PrimUpdateFlags PostUpdateFlags;
if (ShouldScheduleUpdate(UpdateFlags, out PostUpdateFlags))
{
avatar.AddUpdateToAvatar(this, PostUpdateFlags);
}
}
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:13,代码来源:SceneObjectPart.cs
示例5: IsTerse
/// <summary>
/// Check to see whether the given flags make it a terse update
/// </summary>
/// <param name="flags"></param>
/// <returns></returns>
private bool IsTerse(PrimUpdateFlags flags)
{
return flags.HasFlag((PrimUpdateFlags.Position | PrimUpdateFlags.Rotation
| PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity))
&& !flags.HasFlag((PrimUpdateFlags.AttachmentPoint | PrimUpdateFlags.ClickAction |
PrimUpdateFlags.CollisionPlane | PrimUpdateFlags.ExtraData | PrimUpdateFlags.FindBest | PrimUpdateFlags.FullUpdate |
PrimUpdateFlags.Joint | PrimUpdateFlags.Material | PrimUpdateFlags.MediaURL | PrimUpdateFlags.NameValue |
PrimUpdateFlags.ParentID | PrimUpdateFlags.Particles | PrimUpdateFlags.PrimData | PrimUpdateFlags.PrimFlags |
PrimUpdateFlags.ScratchPad | PrimUpdateFlags.Shape | PrimUpdateFlags.Sound | PrimUpdateFlags.Text |
PrimUpdateFlags.TextureAnim | PrimUpdateFlags.Textures));
}
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:16,代码来源:SceneObjectPart.cs
示例6: SendPrimUpdate
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
}
开发者ID:N3X15,项目名称:VoxelSim,代码行数:3,代码来源:NPCAvatar.cs
示例7: ScheduleGroupUpdateToAvatar
/// <summary>
/// Send an update to all prims in the group to a specific avatar
/// </summary>
/// <param name = "presence"></param>
/// <param name = "UpdateFlags"></param>
public void ScheduleGroupUpdateToAvatar(IScenePresence presence, PrimUpdateFlags UpdateFlags)
{
//We have to send the root part first as the client wants it that way
presence.AddUpdateToAvatar(RootPart, UpdateFlags);
#if (!ISWIN)
foreach (SceneObjectPart part in m_partsList)
{
if (part != RootPart)
{
presence.AddUpdateToAvatar(part, UpdateFlags);
}
}
#else
foreach (SceneObjectPart part in m_partsList.Where(part => part != RootPart))
{
presence.AddUpdateToAvatar(part, UpdateFlags);
}
#endif
}
开发者ID:Gnu32,项目名称:Silverfin,代码行数:25,代码来源:SceneObjectGroup.cs
示例8: EntityUpdate
public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime)
: base(entity,(uint)flags,updateTime)
{
m_timeDilation = timedilation;
}
开发者ID:hippie-b,项目名称:opensim,代码行数:5,代码来源:IClientAPI.cs
示例9: SendPrimitiveToClient
public void SendPrimitiveToClient(object sop, uint clientFlags, OpenMetaverse.Vector3 lpos, PrimUpdateFlags updateFlags)
{
}
开发者ID:emperorstarfinder,项目名称:halcyon,代码行数:3,代码来源:BotClient.cs
示例10: ScheduleUpdate
/// <summary>
/// Tell all avatars in the Scene about the new update
/// </summary>
/// <param name = "UpdateFlags"></param>
public void ScheduleUpdate(PrimUpdateFlags UpdateFlags)
{
#if (!ISWIN)
m_parentGroup.Scene.ForEachScenePresence(delegate(IScenePresence avatar)
{
avatar.AddUpdateToAvatar(this, UpdateFlags);
});
#else
m_parentGroup.Scene.ForEachScenePresence(avatar => avatar.AddUpdateToAvatar(this, UpdateFlags));
#endif
}
开发者ID:JAllard,项目名称:Aurora-Sim,代码行数:15,代码来源:SceneObjectPart.cs
示例11: ScheduleUpdate
/// <summary>
/// Tell all avatars in the Scene about the new update
/// </summary>
/// <param name="UpdateFlags"></param>
public void ScheduleUpdate(PrimUpdateFlags UpdateFlags)
{
if (m_parentGroup != null && m_parentGroup.Scene != null)
m_parentGroup.Scene.ForEachScenePresence(avatar => avatar.AddUpdateToAvatar(this, UpdateFlags));
}
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:9,代码来源:SceneObjectPart.cs
示例12: EntityUpdate
public EntityUpdate (IEntity entity, PrimUpdateFlags flags)
{
Entity = entity;
Flags = flags;
}
开发者ID:NickyPerian,项目名称:Aurora-Sim,代码行数:5,代码来源:IClientAPI.cs
示例13: IsTerse
/// <summary>
/// Check to see whether the given flags make it a terse update
/// </summary>
/// <param name="flags"></param>
/// <returns></returns>
bool IsTerse(PrimUpdateFlags flags)
{
return flags.HasFlag((PrimUpdateFlags.TerseUpdate))
&& !flags.HasFlag((PrimUpdateFlags.AttachmentPoint | PrimUpdateFlags.ClickAction |
PrimUpdateFlags.CollisionPlane | PrimUpdateFlags.ExtraData |
PrimUpdateFlags.FindBest | PrimUpdateFlags.FullUpdate |
PrimUpdateFlags.Joint | PrimUpdateFlags.Material | PrimUpdateFlags.MediaURL |
PrimUpdateFlags.NameValue |
PrimUpdateFlags.ParentID | PrimUpdateFlags.Particles | PrimUpdateFlags.PrimData |
PrimUpdateFlags.PrimFlags |
PrimUpdateFlags.ScratchPad | PrimUpdateFlags.Shape | PrimUpdateFlags.Sound |
PrimUpdateFlags.Text |
PrimUpdateFlags.TextureAnim | PrimUpdateFlags.Textures)) &&
!flags.HasFlag(PrimUpdateFlags.ForcedFullUpdate);
}
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:20,代码来源:SceneObjectPart.cs
示例14: ScheduleGroupUpdateToAvatar
/// <summary>
/// Send an update to all prims in the group to a specific avatar
/// </summary>
/// <param name="presence"></param>
/// <param name="UpdateFlags"></param>
public void ScheduleGroupUpdateToAvatar (IScenePresence presence, PrimUpdateFlags UpdateFlags)
{
//We have to send the root part first as the client wants it that way
RootPart.ScheduleUpdateToAvatar(UpdateFlags, presence);
lock (m_partsLock)
{
foreach (SceneObjectPart part in m_partsList)
{
if (part != RootPart)
{
part.ScheduleUpdateToAvatar(UpdateFlags, presence);
}
}
}
}
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:21,代码来源:SceneObjectGroup.cs
示例15: SendPrimUpdate
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags, double priority)
{
}
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:3,代码来源:GenericNpcCharacter.cs
示例16: SendScheduledUpdates
/// <summary>
/// Tell all the prims which have had updates scheduled
/// </summary>
public void SendScheduledUpdates(UpdateLevel level, PrimUpdateFlags updateFlags)
{
switch (level)
{
case UpdateLevel.Terse:
AddTerseUpdateToAllAvatars();
break;
/*case UpdateLevel.Compressed:
AddCompressedUpdateToAllAvatars();
break;*/
case UpdateLevel.Full:
AddFullUpdateToAllAvatars(updateFlags);
break;
}
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:20,代码来源:SceneObjectPart.cs
示例17: AddUpdateToAvatar
/// <summary>
/// Tell the SceneViewer for the given client about the update
/// </summary>
/// <param name="part"></param>
/// <param name="flags"></param>
public void AddUpdateToAvatar(ISceneChildEntity part, PrimUpdateFlags flags)
{
lock (m_terseUpdates)
m_terseUpdates.Add(new OUpdates {Child = part, Flags = flags});
Scene.SceneGraph.TaintPresenceForUpdate(this, PresenceTaint.ObjectUpdates);
}
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:11,代码来源:AsyncScenePresence.cs
示例18: HasFlag
public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag)
{
return (updateFlags & flag) == flag;
}
开发者ID:hippie-b,项目名称:opensim,代码行数:4,代码来源:IClientAPI.cs
示例19: AddFullUpdateToAllAvatars
/// <summary>
/// Tell all scene presences that they should send updates for this part to their clients
/// </summary>
public void AddFullUpdateToAllAvatars(PrimUpdateFlags flags)
{
List<ScenePresence> avatars = m_parentGroup.Scene.GetScenePresences();
foreach (ScenePresence avatar in avatars)
{
if (!(avatar.IsDeleted || avatar.IsInTransit))
avatar.SceneView.QueuePartForUpdate(this, flags);
}
}
开发者ID:kf6kjg,项目名称:halcyon,代码行数:12,代码来源:SceneObjectPart.cs
示例20: ScheduleGroupUpdate
/// <summary>
/// Send an update to all prims in the group
/// </summary>
/// <param name = "UpdateFlags"></param>
public void ScheduleGroupUpdate(PrimUpdateFlags UpdateFlags)
{
//We have to send the root part first as the client wants it that way
RootPart.ScheduleUpdate(UpdateFlags);
#if (!ISWIN)
foreach (SceneObjectPart part in m_partsList)
{
if (part != RootPart)
{
part.ScheduleUpdate(UpdateFlags);
}
}
#else
foreach (SceneObjectPart part in m_partsList.Where(part => part != RootPart))
{
part.ScheduleUpdate(UpdateFlags);
}
#endif
}
开发者ID:Gnu32,项目名称:Silverfin,代码行数:24,代码来源:SceneObjectGroup.cs
注:本文中的PrimUpdateFlags类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论