diff options
author | John Hurliman | 2009-10-15 16:35:27 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-15 16:35:27 -0700 |
commit | 4b75353cbf50de3cae4c48ec90b55f30c1612c92 (patch) | |
tree | 2b5bf30d2a0c8558437f757e28081cb60a8b5dfc /OpenSim/Framework/IClientAPI.cs | |
parent | Replaced the update lists with a priority queue implementation in LLClientView (diff) | |
download | opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.zip opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.gz opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.bz2 opensim-SC_OLD-4b75353cbf50de3cae4c48ec90b55f30c1612c92.tar.xz |
Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 254 |
1 files changed, 231 insertions, 23 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 29846f5..4b51e15 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -517,6 +517,233 @@ namespace OpenSim.Framework | |||
517 | public float dwell; | 517 | public float dwell; |
518 | } | 518 | } |
519 | 519 | ||
520 | public struct SendAvatarData | ||
521 | { | ||
522 | private ulong m_regionHandle; | ||
523 | private string m_firstName; | ||
524 | private string m_lastName; | ||
525 | private string m_grouptitle; | ||
526 | private UUID m_avatarID; | ||
527 | private uint m_avatarLocalID; | ||
528 | private Vector3 m_Pos; | ||
529 | private byte[] m_textureEntry; | ||
530 | private uint m_parentID; | ||
531 | private Quaternion m_rotation; | ||
532 | |||
533 | public SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, | ||
534 | uint avatarLocalID, | ||
535 | Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) | ||
536 | { | ||
537 | this.m_regionHandle = regionHandle; | ||
538 | this.m_firstName = firstName; | ||
539 | this.m_lastName = lastName; | ||
540 | this.m_grouptitle = grouptitle; | ||
541 | this.m_avatarID = avatarID; | ||
542 | this.m_avatarLocalID = avatarLocalID; | ||
543 | this.m_Pos = Pos; | ||
544 | this.m_textureEntry = textureEntry; | ||
545 | this.m_parentID = parentID; | ||
546 | this.m_rotation = rotation; | ||
547 | } | ||
548 | |||
549 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
550 | public string firstName { get { return this.m_firstName; } } | ||
551 | public string lastName { get { return this.m_lastName; } } | ||
552 | public string grouptitle { get { return this.m_grouptitle; } } | ||
553 | public UUID avatarID { get { return this.m_avatarID; } } | ||
554 | public uint avatarLocalID { get { return this.m_avatarLocalID; } } | ||
555 | public Vector3 Pos { get { return this.m_Pos; } } | ||
556 | public byte[] textureEntry { get { return this.m_textureEntry; } } | ||
557 | public uint parentID { get { return this.m_parentID; } } | ||
558 | public Quaternion rotation { get { return this.m_rotation; } } | ||
559 | } | ||
560 | |||
561 | public struct SendAvatarTerseData | ||
562 | { | ||
563 | private ulong m_regionHandle; | ||
564 | private ushort m_timeDilation; | ||
565 | private uint m_localID; | ||
566 | private Vector3 m_position; | ||
567 | private Vector3 m_velocity; | ||
568 | private Quaternion m_rotation; | ||
569 | private UUID m_agentid; | ||
570 | private double m_priority; | ||
571 | |||
572 | public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | ||
573 | Vector3 velocity, Quaternion rotation, UUID agentid, double priority) | ||
574 | { | ||
575 | this.m_regionHandle = regionHandle; | ||
576 | this.m_timeDilation = timeDilation; | ||
577 | this.m_localID = localID; | ||
578 | this.m_position = position; | ||
579 | this.m_velocity = velocity; | ||
580 | this.m_rotation = rotation; | ||
581 | this.m_agentid = agentid; | ||
582 | this.m_priority = priority; | ||
583 | } | ||
584 | |||
585 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
586 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
587 | public uint localID { get { return this.m_localID; } } | ||
588 | public Vector3 position { get { return this.m_position; } } | ||
589 | public Vector3 velocity { get { return this.m_velocity; } } | ||
590 | public Quaternion rotation { get { return this.m_rotation; } } | ||
591 | public UUID agentid { get { return this.m_agentid; } } | ||
592 | public double priority { get { return this.m_priority; } } | ||
593 | } | ||
594 | |||
595 | public struct SendPrimitiveTerseData | ||
596 | { | ||
597 | private ulong m_regionHandle; | ||
598 | private ushort m_timeDilation; | ||
599 | private uint m_localID; | ||
600 | private Vector3 m_position; | ||
601 | private Quaternion m_rotation; | ||
602 | private Vector3 m_velocity; | ||
603 | private Vector3 m_rotationalvelocity; | ||
604 | private byte m_state; | ||
605 | private UUID m_AssetId; | ||
606 | private UUID m_owner; | ||
607 | private int m_attachPoint; | ||
608 | private double m_priority; | ||
609 | |||
610 | public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | ||
611 | Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, | ||
612 | UUID AssetId, UUID owner, int attachPoint, double priority) | ||
613 | { | ||
614 | this.m_regionHandle = regionHandle; | ||
615 | this.m_timeDilation = timeDilation; | ||
616 | this.m_localID = localID; | ||
617 | this.m_position = position; | ||
618 | this.m_rotation = rotation; | ||
619 | this.m_velocity = velocity; | ||
620 | this.m_rotationalvelocity = rotationalvelocity; | ||
621 | this.m_state = state; | ||
622 | this.m_AssetId = AssetId; | ||
623 | this.m_owner = owner; | ||
624 | this.m_attachPoint = attachPoint; | ||
625 | this.m_priority = priority; | ||
626 | } | ||
627 | |||
628 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
629 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
630 | public uint localID { get { return this.m_localID; } } | ||
631 | public Vector3 position { get { return this.m_position; } } | ||
632 | public Quaternion rotation { get { return this.m_rotation; } } | ||
633 | public Vector3 velocity { get { return this.m_velocity; } } | ||
634 | public Vector3 rotationalvelocity { get { return this.m_rotationalvelocity; } } | ||
635 | public byte state { get { return this.m_state; } } | ||
636 | public UUID AssetId { get { return this.m_AssetId; } } | ||
637 | public UUID owner { get { return this.m_owner; } } | ||
638 | public int attachPoint { get { return this.m_attachPoint; } } | ||
639 | public double priority { get { return this.m_priority; } } | ||
640 | } | ||
641 | |||
642 | public struct SendPrimitiveData | ||
643 | { | ||
644 | private ulong m_regionHandle; | ||
645 | private ushort m_timeDilation; | ||
646 | private uint m_localID; | ||
647 | private PrimitiveBaseShape m_primShape; | ||
648 | private Vector3 m_pos; | ||
649 | private Vector3 m_vel; | ||
650 | private Vector3 m_acc; | ||
651 | private Quaternion m_rotation; | ||
652 | private Vector3 m_rvel; | ||
653 | private uint m_flags; | ||
654 | private UUID m_objectID; | ||
655 | private UUID m_ownerID; | ||
656 | private string m_text; | ||
657 | private byte[] m_color; | ||
658 | private uint m_parentID; | ||
659 | private byte[] m_particleSystem; | ||
660 | private byte m_clickAction; | ||
661 | private byte m_material; | ||
662 | private byte[] m_textureanim; | ||
663 | private bool m_attachment; | ||
664 | private uint m_AttachPoint; | ||
665 | private UUID m_AssetId; | ||
666 | private UUID m_SoundId; | ||
667 | private double m_SoundVolume; | ||
668 | private byte m_SoundFlags; | ||
669 | private double m_SoundRadius; | ||
670 | private double m_priority; | ||
671 | |||
672 | public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
673 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
674 | uint flags, UUID objectID, UUID ownerID, string text, byte[] color, | ||
675 | uint parentID, byte[] particleSystem, byte clickAction, byte material, double priority) : | ||
676 | this(regionHandle, timeDilation, localID, primShape, pos, vel, acc, rotation, rvel, flags, objectID, | ||
677 | ownerID, text, color, parentID, particleSystem, clickAction, material, new byte[0], false, 0, UUID.Zero, | ||
678 | UUID.Zero, 0, 0, 0, priority) { } | ||
679 | |||
680 | public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
681 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
682 | uint flags, | ||
683 | UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, | ||
684 | byte[] particleSystem, | ||
685 | byte clickAction, byte material, byte[] textureanim, bool attachment, | ||
686 | uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, | ||
687 | double SoundRadius, double priority) | ||
688 | { | ||
689 | this.m_regionHandle = regionHandle; | ||
690 | this.m_timeDilation = timeDilation; | ||
691 | this.m_localID = localID; | ||
692 | this.m_primShape = primShape; | ||
693 | this.m_pos = pos; | ||
694 | this.m_vel = vel; | ||
695 | this.m_acc = acc; | ||
696 | this.m_rotation = rotation; | ||
697 | this.m_rvel = rvel; | ||
698 | this.m_flags = flags; | ||
699 | this.m_objectID = objectID; | ||
700 | this.m_ownerID = ownerID; | ||
701 | this.m_text = text; | ||
702 | this.m_color = color; | ||
703 | this.m_parentID = parentID; | ||
704 | this.m_particleSystem = particleSystem; | ||
705 | this.m_clickAction = clickAction; | ||
706 | this.m_material = material; | ||
707 | this.m_textureanim = textureanim; | ||
708 | this.m_attachment = attachment; | ||
709 | this.m_AttachPoint = AttachPoint; | ||
710 | this.m_AssetId = AssetId; | ||
711 | this.m_SoundId = SoundId; | ||
712 | this.m_SoundVolume = SoundVolume; | ||
713 | this.m_SoundFlags = SoundFlags; | ||
714 | this.m_SoundRadius = SoundRadius; | ||
715 | this.m_priority = priority; | ||
716 | } | ||
717 | |||
718 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
719 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
720 | public uint localID { get { return this.m_localID; } } | ||
721 | public PrimitiveBaseShape primShape { get { return this.m_primShape; } } | ||
722 | public Vector3 pos { get { return this.m_pos; } } | ||
723 | public Vector3 vel { get { return this.m_vel; } } | ||
724 | public Vector3 acc { get { return this.m_acc; } } | ||
725 | public Quaternion rotation { get { return this.m_rotation; } } | ||
726 | public Vector3 rvel { get { return this.m_rvel; } } | ||
727 | public uint flags { get { return this.m_flags; } } | ||
728 | public UUID objectID { get { return this.m_objectID; } } | ||
729 | public UUID ownerID { get { return this.m_ownerID; } } | ||
730 | public string text { get { return this.m_text; } } | ||
731 | public byte[] color { get { return this.m_color; } } | ||
732 | public uint parentID { get { return this.m_parentID; } } | ||
733 | public byte[] particleSystem { get { return this.m_particleSystem; } } | ||
734 | public byte clickAction { get { return this.m_clickAction; } } | ||
735 | public byte material { get { return this.m_material; } } | ||
736 | public byte[] textureanim { get { return this.m_textureanim; } } | ||
737 | public bool attachment { get { return this.m_attachment; } } | ||
738 | public uint AttachPoint { get { return this.m_AttachPoint; } } | ||
739 | public UUID AssetId { get { return this.m_AssetId; } } | ||
740 | public UUID SoundId { get { return this.m_SoundId; } } | ||
741 | public double SoundVolume { get { return this.m_SoundVolume; } } | ||
742 | public byte SoundFlags { get { return this.m_SoundFlags; } } | ||
743 | public double SoundRadius { get { return this.m_SoundRadius; } } | ||
744 | public double priority { get { return this.m_priority; } } | ||
745 | } | ||
746 | |||
520 | public interface IClientAPI | 747 | public interface IClientAPI |
521 | { | 748 | { |
522 | Vector3 StartPos { get; set; } | 749 | Vector3 StartPos { get; set; } |
@@ -877,37 +1104,18 @@ namespace OpenSim.Framework | |||
877 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); | 1104 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); |
878 | void SendPayPrice(UUID objectID, int[] payPrice); | 1105 | void SendPayPrice(UUID objectID, int[] payPrice); |
879 | 1106 | ||
880 | void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, | 1107 | void SendAvatarData(SendAvatarData data); |
881 | uint avatarLocalID, | ||
882 | Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation); | ||
883 | 1108 | ||
884 | void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | 1109 | void SendAvatarTerseUpdate(SendAvatarTerseData data); |
885 | Vector3 velocity, Quaternion rotation, UUID agentid); | ||
886 | 1110 | ||
887 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); | 1111 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); |
888 | 1112 | ||
889 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); | 1113 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); |
890 | void SetChildAgentThrottle(byte[] throttle); | 1114 | void SetChildAgentThrottle(byte[] throttle); |
891 | 1115 | ||
892 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 1116 | void SendPrimitiveToClient(SendPrimitiveData data); |
893 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
894 | uint flags, | ||
895 | UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, | ||
896 | byte[] particleSystem, | ||
897 | byte clickAction, byte material, byte[] textureanim, bool attachment, | ||
898 | uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, | ||
899 | double SoundRadius); | ||
900 | |||
901 | 1117 | ||
902 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 1118 | void SendPrimTerseUpdate(SendPrimitiveTerseData data); |
903 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
904 | uint flags, UUID objectID, UUID ownerID, string text, byte[] color, | ||
905 | uint parentID, byte[] particleSystem, byte clickAction, byte material); | ||
906 | |||
907 | |||
908 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | ||
909 | Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, | ||
910 | UUID AssetId, UUID owner, int attachPoint); | ||
911 | 1119 | ||
912 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, | 1120 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, |
913 | List<InventoryFolderBase> folders, bool fetchFolders, | 1121 | List<InventoryFolderBase> folders, bool fetchFolders, |