diff options
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 257 |
1 files changed, 235 insertions, 22 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 9fd043c..d304345 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -448,6 +448,10 @@ namespace OpenSim.Framework | |||
448 | public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); | 448 | public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); |
449 | public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client); | 449 | public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client); |
450 | 450 | ||
451 | public delegate void AgentFOV(IClientAPI client, float verticalAngle); | ||
452 | |||
453 | public delegate double UpdatePriorityHandler(UpdatePriorityData data); | ||
454 | |||
451 | #endregion | 455 | #endregion |
452 | 456 | ||
453 | public struct DirPlacesReplyData | 457 | public struct DirPlacesReplyData |
@@ -517,6 +521,232 @@ namespace OpenSim.Framework | |||
517 | public float dwell; | 521 | public float dwell; |
518 | } | 522 | } |
519 | 523 | ||
524 | public struct SendAvatarData | ||
525 | { | ||
526 | public readonly ulong RegionHandle; | ||
527 | public readonly string FirstName; | ||
528 | public readonly string LastName; | ||
529 | public readonly string GroupTitle; | ||
530 | public readonly UUID AvatarID; | ||
531 | public readonly uint AvatarLocalID; | ||
532 | public readonly Vector3 Position; | ||
533 | public readonly byte[] TextureEntry; | ||
534 | public readonly uint ParentID; | ||
535 | public readonly Quaternion Rotation; | ||
536 | |||
537 | public SendAvatarData(ulong regionHandle, string firstName, string lastName, string groupTitle, UUID avatarID, | ||
538 | uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation) | ||
539 | { | ||
540 | RegionHandle = regionHandle; | ||
541 | FirstName = firstName; | ||
542 | LastName = lastName; | ||
543 | GroupTitle = groupTitle; | ||
544 | AvatarID = avatarID; | ||
545 | AvatarLocalID = avatarLocalID; | ||
546 | Position = position; | ||
547 | TextureEntry = textureEntry; | ||
548 | ParentID = parentID; | ||
549 | Rotation = rotation; | ||
550 | } | ||
551 | } | ||
552 | |||
553 | public struct SendAvatarTerseData | ||
554 | { | ||
555 | public readonly ulong RegionHandle; | ||
556 | public readonly ushort TimeDilation; | ||
557 | public readonly uint LocalID; | ||
558 | public readonly Vector3 Position; | ||
559 | public readonly Vector3 Velocity; | ||
560 | public readonly Vector3 Acceleration; | ||
561 | public readonly Quaternion Rotation; | ||
562 | public readonly Vector4 CollisionPlane; | ||
563 | public readonly UUID AgentID; | ||
564 | public readonly byte[] TextureEntry; | ||
565 | public readonly double Priority; | ||
566 | |||
567 | public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, | ||
568 | Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, UUID agentid, byte[] textureEntry, double priority) | ||
569 | { | ||
570 | RegionHandle = regionHandle; | ||
571 | TimeDilation = timeDilation; | ||
572 | LocalID = localID; | ||
573 | Position = position; | ||
574 | Velocity = velocity; | ||
575 | Acceleration = acceleration; | ||
576 | Rotation = rotation; | ||
577 | CollisionPlane = collisionPlane; | ||
578 | AgentID = agentid; | ||
579 | TextureEntry = textureEntry; | ||
580 | Priority = priority; | ||
581 | } | ||
582 | } | ||
583 | |||
584 | public struct SendPrimitiveTerseData | ||
585 | { | ||
586 | public readonly ulong RegionHandle; | ||
587 | public readonly ushort TimeDilation; | ||
588 | public readonly uint LocalID; | ||
589 | public readonly Vector3 Position; | ||
590 | public readonly Quaternion Rotation; | ||
591 | public readonly Vector3 Velocity; | ||
592 | public readonly Vector3 Acceleration; | ||
593 | public readonly Vector3 AngularVelocity; | ||
594 | public readonly byte State; | ||
595 | public readonly UUID AssetID; | ||
596 | public readonly UUID OwnerID; | ||
597 | public readonly int AttachPoint; | ||
598 | public readonly byte[] TextureEntry; | ||
599 | public readonly double Priority; | ||
600 | |||
601 | public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | ||
602 | Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity, byte state, | ||
603 | UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority) | ||
604 | { | ||
605 | RegionHandle = regionHandle; | ||
606 | TimeDilation = timeDilation; | ||
607 | LocalID = localID; | ||
608 | Position = position; | ||
609 | Rotation = rotation; | ||
610 | Velocity = velocity; | ||
611 | Acceleration = acceleration; | ||
612 | AngularVelocity = rotationalvelocity; | ||
613 | State = state; | ||
614 | AssetID = assetID; | ||
615 | OwnerID = ownerID; | ||
616 | AttachPoint = attachPoint; | ||
617 | TextureEntry = textureEntry; | ||
618 | Priority = priority; | ||
619 | } | ||
620 | } | ||
621 | |||
622 | public struct SendPrimitiveData | ||
623 | { | ||
624 | private ulong m_regionHandle; | ||
625 | private ushort m_timeDilation; | ||
626 | private uint m_localID; | ||
627 | private PrimitiveBaseShape m_primShape; | ||
628 | private Vector3 m_pos; | ||
629 | private Vector3 m_vel; | ||
630 | private Vector3 m_acc; | ||
631 | private Quaternion m_rotation; | ||
632 | private Vector3 m_rvel; | ||
633 | private PrimFlags m_flags; | ||
634 | private UUID m_objectID; | ||
635 | private UUID m_ownerID; | ||
636 | private string m_text; | ||
637 | private byte[] m_color; | ||
638 | private uint m_parentID; | ||
639 | private byte[] m_particleSystem; | ||
640 | private byte m_clickAction; | ||
641 | private byte m_material; | ||
642 | private byte[] m_textureanim; | ||
643 | private bool m_attachment; | ||
644 | private uint m_AttachPoint; | ||
645 | private UUID m_AssetId; | ||
646 | private UUID m_SoundId; | ||
647 | private double m_SoundVolume; | ||
648 | private byte m_SoundFlags; | ||
649 | private double m_SoundRadius; | ||
650 | private double m_priority; | ||
651 | |||
652 | public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
653 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
654 | uint flags, UUID objectID, UUID ownerID, string text, byte[] color, | ||
655 | uint parentID, byte[] particleSystem, byte clickAction, byte material, double priority) : | ||
656 | this(regionHandle, timeDilation, localID, primShape, pos, vel, acc, rotation, rvel, flags, objectID, | ||
657 | ownerID, text, color, parentID, particleSystem, clickAction, material, new byte[0], false, 0, UUID.Zero, | ||
658 | UUID.Zero, 0, 0, 0, priority) { } | ||
659 | |||
660 | public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
661 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
662 | uint flags, | ||
663 | UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, | ||
664 | byte[] particleSystem, | ||
665 | byte clickAction, byte material, byte[] textureanim, bool attachment, | ||
666 | uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, | ||
667 | double SoundRadius, double priority) | ||
668 | { | ||
669 | this.m_regionHandle = regionHandle; | ||
670 | this.m_timeDilation = timeDilation; | ||
671 | this.m_localID = localID; | ||
672 | this.m_primShape = primShape; | ||
673 | this.m_pos = pos; | ||
674 | this.m_vel = vel; | ||
675 | this.m_acc = acc; | ||
676 | this.m_rotation = rotation; | ||
677 | this.m_rvel = rvel; | ||
678 | this.m_flags = (PrimFlags)flags; | ||
679 | this.m_objectID = objectID; | ||
680 | this.m_ownerID = ownerID; | ||
681 | this.m_text = text; | ||
682 | this.m_color = color; | ||
683 | this.m_parentID = parentID; | ||
684 | this.m_particleSystem = particleSystem; | ||
685 | this.m_clickAction = clickAction; | ||
686 | this.m_material = material; | ||
687 | this.m_textureanim = textureanim; | ||
688 | this.m_attachment = attachment; | ||
689 | this.m_AttachPoint = AttachPoint; | ||
690 | this.m_AssetId = AssetId; | ||
691 | this.m_SoundId = SoundId; | ||
692 | this.m_SoundVolume = SoundVolume; | ||
693 | this.m_SoundFlags = SoundFlags; | ||
694 | this.m_SoundRadius = SoundRadius; | ||
695 | this.m_priority = priority; | ||
696 | } | ||
697 | |||
698 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
699 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
700 | public uint localID { get { return this.m_localID; } } | ||
701 | public PrimitiveBaseShape primShape { get { return this.m_primShape; } } | ||
702 | public Vector3 pos { get { return this.m_pos; } } | ||
703 | public Vector3 vel { get { return this.m_vel; } } | ||
704 | public Vector3 acc { get { return this.m_acc; } } | ||
705 | public Quaternion rotation { get { return this.m_rotation; } } | ||
706 | public Vector3 rvel { get { return this.m_rvel; } } | ||
707 | public PrimFlags flags { get { return this.m_flags; } } | ||
708 | public UUID objectID { get { return this.m_objectID; } } | ||
709 | public UUID ownerID { get { return this.m_ownerID; } } | ||
710 | public string text { get { return this.m_text; } } | ||
711 | public byte[] color { get { return this.m_color; } } | ||
712 | public uint parentID { get { return this.m_parentID; } } | ||
713 | public byte[] particleSystem { get { return this.m_particleSystem; } } | ||
714 | public byte clickAction { get { return this.m_clickAction; } } | ||
715 | public byte material { get { return this.m_material; } } | ||
716 | public byte[] textureanim { get { return this.m_textureanim; } } | ||
717 | public bool attachment { get { return this.m_attachment; } } | ||
718 | public uint AttachPoint { get { return this.m_AttachPoint; } } | ||
719 | public UUID AssetId { get { return this.m_AssetId; } } | ||
720 | public UUID SoundId { get { return this.m_SoundId; } } | ||
721 | public double SoundVolume { get { return this.m_SoundVolume; } } | ||
722 | public byte SoundFlags { get { return this.m_SoundFlags; } } | ||
723 | public double SoundRadius { get { return this.m_SoundRadius; } } | ||
724 | public double priority { get { return this.m_priority; } } | ||
725 | } | ||
726 | |||
727 | public struct UpdatePriorityData { | ||
728 | private double m_priority; | ||
729 | private uint m_localID; | ||
730 | |||
731 | public UpdatePriorityData(double priority, uint localID) { | ||
732 | this.m_priority = priority; | ||
733 | this.m_localID = localID; | ||
734 | } | ||
735 | |||
736 | public double priority { get { return this.m_priority; } } | ||
737 | public uint localID { get { return this.m_localID; } } | ||
738 | } | ||
739 | |||
740 | [Flags] | ||
741 | public enum StateUpdateTypes | ||
742 | { | ||
743 | None = 0, | ||
744 | AvatarTerse = 1, | ||
745 | PrimitiveTerse = AvatarTerse << 1, | ||
746 | PrimitiveFull = PrimitiveTerse << 1, | ||
747 | All = AvatarTerse | PrimitiveTerse | PrimitiveFull, | ||
748 | } | ||
749 | |||
520 | public interface IClientAPI | 750 | public interface IClientAPI |
521 | { | 751 | { |
522 | Vector3 StartPos { get; set; } | 752 | Vector3 StartPos { get; set; } |
@@ -878,37 +1108,20 @@ namespace OpenSim.Framework | |||
878 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); | 1108 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); |
879 | void SendPayPrice(UUID objectID, int[] payPrice); | 1109 | void SendPayPrice(UUID objectID, int[] payPrice); |
880 | 1110 | ||
881 | void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, | 1111 | void SendAvatarData(SendAvatarData data); |
882 | uint avatarLocalID, | ||
883 | Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation); | ||
884 | 1112 | ||
885 | void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | 1113 | void SendAvatarTerseUpdate(SendAvatarTerseData data); |
886 | Vector3 velocity, Quaternion rotation, UUID agentid); | ||
887 | 1114 | ||
888 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); | 1115 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); |
889 | 1116 | ||
890 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); | 1117 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); |
891 | void SetChildAgentThrottle(byte[] throttle); | 1118 | void SetChildAgentThrottle(byte[] throttle); |
892 | 1119 | ||
893 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | 1120 | void SendPrimitiveToClient(SendPrimitiveData data); |
894 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
895 | uint flags, | ||
896 | UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, | ||
897 | byte[] particleSystem, | ||
898 | byte clickAction, byte material, byte[] textureanim, bool attachment, | ||
899 | uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, | ||
900 | double SoundRadius); | ||
901 | |||
902 | |||
903 | void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
904 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
905 | uint flags, UUID objectID, UUID ownerID, string text, byte[] color, | ||
906 | uint parentID, byte[] particleSystem, byte clickAction, byte material); | ||
907 | 1121 | ||
1122 | void SendPrimTerseUpdate(SendPrimitiveTerseData data); | ||
908 | 1123 | ||
909 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | 1124 | void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler); |
910 | Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, | ||
911 | UUID AssetId, UUID owner, int attachPoint); | ||
912 | 1125 | ||
913 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, | 1126 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, |
914 | List<InventoryFolderBase> folders, bool fetchFolders, | 1127 | List<InventoryFolderBase> folders, bool fetchFolders, |