diff options
author | UbitUmarov | 2016-08-07 14:30:27 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-07 21:13:01 +0100 |
commit | ff0ccf9c67e3840c39729e1ce9677b96e0cfd472 (patch) | |
tree | 6288879780f7df9bd5198c13e71f753df56af1af /OpenSim/Framework | |
parent | if a viewer overloads region capability to process RequestMapBlocks, ignore ... (diff) | |
download | opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.zip opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.gz opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.bz2 opensim-SC_OLD-ff0ccf9c67e3840c39729e1ce9677b96e0cfd472.tar.xz |
several changes related to culling option
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 52 | ||||
-rw-r--r-- | OpenSim/Framework/PriorityQueue.cs | 12 |
2 files changed, 26 insertions, 38 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 018f194..0140733 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -585,10 +585,10 @@ namespace OpenSim.Framework | |||
585 | public float dwell; | 585 | public float dwell; |
586 | } | 586 | } |
587 | 587 | ||
588 | public class IEntityUpdate | 588 | public class EntityUpdate |
589 | { | 589 | { |
590 | private ISceneEntity m_entity; | 590 | private ISceneEntity m_entity; |
591 | private uint m_flags; | 591 | private PrimUpdateFlags m_flags; |
592 | private int m_updateTime; | 592 | private int m_updateTime; |
593 | 593 | ||
594 | public ISceneEntity Entity | 594 | public ISceneEntity Entity |
@@ -596,7 +596,7 @@ namespace OpenSim.Framework | |||
596 | get { return m_entity; } | 596 | get { return m_entity; } |
597 | } | 597 | } |
598 | 598 | ||
599 | public uint Flags | 599 | public PrimUpdateFlags Flags |
600 | { | 600 | { |
601 | get { return m_flags; } | 601 | get { return m_flags; } |
602 | } | 602 | } |
@@ -606,23 +606,31 @@ namespace OpenSim.Framework | |||
606 | get { return m_updateTime; } | 606 | get { return m_updateTime; } |
607 | } | 607 | } |
608 | 608 | ||
609 | public virtual void Update(IEntityUpdate update) | 609 | public virtual void Update(EntityUpdate update) |
610 | { | 610 | { |
611 | m_flags |= update.Flags; | 611 | PrimUpdateFlags updateFlags = update.Flags; |
612 | if(updateFlags.HasFlag(PrimUpdateFlags.CancelKill)) | ||
613 | m_flags = PrimUpdateFlags.FullUpdate; | ||
614 | else if(m_flags.HasFlag(PrimUpdateFlags.Kill)) | ||
615 | return; | ||
616 | else if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) | ||
617 | m_flags = PrimUpdateFlags.Kill; | ||
618 | else | ||
619 | m_flags |= updateFlags; | ||
612 | 620 | ||
613 | // Use the older of the updates as the updateTime | 621 | // Use the older of the updates as the updateTime |
614 | if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) | 622 | if (Util.EnvironmentTickCountCompare(UpdateTime, update.UpdateTime) > 0) |
615 | m_updateTime = update.UpdateTime; | 623 | m_updateTime = update.UpdateTime; |
616 | } | 624 | } |
617 | 625 | ||
618 | public IEntityUpdate(ISceneEntity entity, uint flags) | 626 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) |
619 | { | 627 | { |
620 | m_entity = entity; | 628 | m_entity = entity; |
621 | m_flags = flags; | 629 | m_flags = flags; |
622 | m_updateTime = Util.EnvironmentTickCount(); | 630 | m_updateTime = Util.EnvironmentTickCount(); |
623 | } | 631 | } |
624 | 632 | ||
625 | public IEntityUpdate(ISceneEntity entity, uint flags, Int32 updateTime) | 633 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, Int32 updateTime) |
626 | { | 634 | { |
627 | m_entity = entity; | 635 | m_entity = entity; |
628 | m_flags = flags; | 636 | m_flags = flags; |
@@ -630,29 +638,6 @@ namespace OpenSim.Framework | |||
630 | } | 638 | } |
631 | } | 639 | } |
632 | 640 | ||
633 | public class EntityUpdate : IEntityUpdate | ||
634 | { | ||
635 | private float m_timeDilation; | ||
636 | |||
637 | public float TimeDilation | ||
638 | { | ||
639 | get { return m_timeDilation; } | ||
640 | } | ||
641 | |||
642 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation) | ||
643 | : base(entity, (uint)flags) | ||
644 | { | ||
645 | // Flags = flags; | ||
646 | m_timeDilation = timedilation; | ||
647 | } | ||
648 | |||
649 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags, float timedilation, Int32 updateTime) | ||
650 | : base(entity,(uint)flags,updateTime) | ||
651 | { | ||
652 | m_timeDilation = timedilation; | ||
653 | } | ||
654 | } | ||
655 | |||
656 | public class PlacesReplyData | 641 | public class PlacesReplyData |
657 | { | 642 | { |
658 | public UUID OwnerID; | 643 | public UUID OwnerID; |
@@ -701,9 +686,12 @@ namespace OpenSim.Framework | |||
701 | ExtraData = 1 << 20, | 686 | ExtraData = 1 << 20, |
702 | Sound = 1 << 21, | 687 | Sound = 1 << 21, |
703 | Joint = 1 << 22, | 688 | Joint = 1 << 22, |
704 | FullUpdate = UInt32.MaxValue | 689 | FullUpdate = 0x3fffffff, |
690 | CancelKill = 0x7fffffff, | ||
691 | Kill = 0x80000000 | ||
705 | } | 692 | } |
706 | 693 | ||
694 | /* included in .net 4.0 | ||
707 | public static class PrimUpdateFlagsExtensions | 695 | public static class PrimUpdateFlagsExtensions |
708 | { | 696 | { |
709 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) | 697 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) |
@@ -711,7 +699,7 @@ namespace OpenSim.Framework | |||
711 | return (updateFlags & flag) == flag; | 699 | return (updateFlags & flag) == flag; |
712 | } | 700 | } |
713 | } | 701 | } |
714 | 702 | */ | |
715 | public interface IClientAPI | 703 | public interface IClientAPI |
716 | { | 704 | { |
717 | Vector3 StartPos { get; set; } | 705 | Vector3 StartPos { get; set; } |
diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs index 4f05f65..fec01da 100644 --- a/OpenSim/Framework/PriorityQueue.cs +++ b/OpenSim/Framework/PriorityQueue.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Framework | |||
113 | /// <summary> | 113 | /// <summary> |
114 | /// Enqueue an item into the specified priority queue | 114 | /// Enqueue an item into the specified priority queue |
115 | /// </summary> | 115 | /// </summary> |
116 | public bool Enqueue(uint pqueue, IEntityUpdate value) | 116 | public bool Enqueue(uint pqueue, EntityUpdate value) |
117 | { | 117 | { |
118 | LookupItem lookup; | 118 | LookupItem lookup; |
119 | 119 | ||
@@ -154,7 +154,7 @@ namespace OpenSim.Framework | |||
154 | /// oldest item from the next queue in order to provide fair access to | 154 | /// oldest item from the next queue in order to provide fair access to |
155 | /// all of the queues | 155 | /// all of the queues |
156 | /// </summary> | 156 | /// </summary> |
157 | public bool TryDequeue(out IEntityUpdate value, out Int32 timeinqueue) | 157 | public bool TryDequeue(out EntityUpdate value, out Int32 timeinqueue) |
158 | { | 158 | { |
159 | // If there is anything in imediate queues, return it first no | 159 | // If there is anything in imediate queues, return it first no |
160 | // matter what else. Breaks fairness. But very useful. | 160 | // matter what else. Breaks fairness. But very useful. |
@@ -212,7 +212,7 @@ namespace OpenSim.Framework | |||
212 | } | 212 | } |
213 | 213 | ||
214 | timeinqueue = 0; | 214 | timeinqueue = 0; |
215 | value = default(IEntityUpdate); | 215 | value = default(EntityUpdate); |
216 | return false; | 216 | return false; |
217 | } | 217 | } |
218 | 218 | ||
@@ -270,8 +270,8 @@ namespace OpenSim.Framework | |||
270 | #region MinHeapItem | 270 | #region MinHeapItem |
271 | private struct MinHeapItem : IComparable<MinHeapItem> | 271 | private struct MinHeapItem : IComparable<MinHeapItem> |
272 | { | 272 | { |
273 | private IEntityUpdate value; | 273 | private EntityUpdate value; |
274 | internal IEntityUpdate Value { | 274 | internal EntityUpdate Value { |
275 | get { | 275 | get { |
276 | return this.value; | 276 | return this.value; |
277 | } | 277 | } |
@@ -307,7 +307,7 @@ namespace OpenSim.Framework | |||
307 | this.pqueue = pqueue; | 307 | this.pqueue = pqueue; |
308 | } | 308 | } |
309 | 309 | ||
310 | internal MinHeapItem(uint pqueue, UInt64 entryorder, IEntityUpdate value) | 310 | internal MinHeapItem(uint pqueue, UInt64 entryorder, EntityUpdate value) |
311 | { | 311 | { |
312 | this.entrytime = Util.EnvironmentTickCount(); | 312 | this.entrytime = Util.EnvironmentTickCount(); |
313 | this.entryorder = entryorder; | 313 | this.entryorder = entryorder; |