本文整理汇总了C#中PrimUpdateFlags类的典型用法代码示例。如果您正苦于以下问题:C# PrimUpdateFlags类的具体用法?C# PrimUpdateFlags怎么用?C# PrimUpdateFlags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrimUpdateFlags类属于命名空间,在下文中一共展示了PrimUpdateFlags类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
}
示例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]);
}
}
}
示例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);
}
}
示例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));
}
示例6: SendPrimUpdate
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
{
}
示例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
}
示例8: EntityUpdate
public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime)
: base(entity,(uint)flags,updateTime)
{
m_timeDilation = timedilation;
}
示例9: SendPrimitiveToClient
public void SendPrimitiveToClient(object sop, uint clientFlags, OpenMetaverse.Vector3 lpos, PrimUpdateFlags updateFlags)
{
}
示例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
}
示例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));
}
示例12: EntityUpdate
public EntityUpdate (IEntity entity, PrimUpdateFlags flags)
{
Entity = entity;
Flags = flags;
}
示例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);
}
示例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);
}
}
}
}
示例15: SendPrimUpdate
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags, double priority)
{
}