OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
ILandObject.cs
Go to the documentation of this file.
1 /*
2  * Copyright (c) Contributors, http://opensimulator.org/
3  * See CONTRIBUTORS.TXT for a full list of copyright holders.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the OpenSimulator Project nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 using System.Collections.Generic;
29 using OpenMetaverse;
30 
31 namespace OpenSim.Framework
32 {
33  public delegate int overrideParcelMaxPrimCountDelegate(ILandObject obj);
34  public delegate int overrideSimulatorMaxPrimCountDelegate(ILandObject obj);
35 
36  public interface ILandObject
37  {
38  int GetParcelMaxPrimCount();
39  int GetSimulatorMaxPrimCount();
40  int GetPrimsFree();
41  Dictionary<UUID, int> GetLandObjectOwners();
42 
43  LandData LandData { get; set; }
44  bool[,] LandBitmap { get; set; }
45  UUID RegionUUID { get; }
46 
50  IPrimCounts PrimCounts { get; set; }
51 
56  Vector2 StartPoint { get; }
57 
62  Vector2 EndPoint { get; }
63 
64  // a estimation of a parcel center.
65  Vector2 CenterPoint { get; }
66 
67  // get positions
68  Vector2? GetNearestPoint(Vector3 pos);
69  Vector2? GetNearestPointAlongDirection(Vector3 pos, Vector3 pdirection);
70 
71  bool ContainsPoint(int x, int y);
72 
73  ILandObject Copy();
74 
75  void SendLandUpdateToAvatarsOverMe();
76 
77  void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
78  bool UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client, out bool snap_selection, out bool needOverlay);
79  bool IsEitherBannedOrRestricted(UUID avatar);
80  bool IsBannedFromLand(UUID avatar);
81  bool CanBeOnThisLand(UUID avatar, float posHeight);
82  bool IsRestrictedFromLand(UUID avatar);
83  bool IsInLandAccessList(UUID avatar);
84  void SendLandUpdateToClient(IClientAPI remote_client);
85  void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
86  List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag);
87  void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
88  void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<LandAccessEntry> entries, IClientAPI remote_client);
89  void UpdateLandBitmapByteArray();
90  void SetLandBitmapFromByteArray();
91  bool[,] GetLandBitmap();
92  void ForceUpdateLandInfo();
93  void SetLandBitmap(bool[,] bitmap);
94 
99  bool[,] BasicFullRegionLandBitmap();
100 
119  bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true);
120 
121  bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
122 
129  bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
130 
145  bool[,] RemapLandBitmap(bool[,] bitmap_base, Vector2 displacement, float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Vector2 regionSize, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax);
146 
157  bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax);
158 
159  byte[] ConvertLandBitmapToBytes();
160  bool[,] ConvertBytesToLandBitmap(bool overrideRegionSize = false);
161  bool IsLandBitmapEmpty(bool[,] landBitmap);
162  void DebugLandBitmap(bool[,] landBitmap);
163 
164  void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
165  void SendLandObjectOwners(IClientAPI remote_client);
166  void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
167  void ResetOverMeRecord();
168  void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
169 
170  void DeedToGroup(UUID groupID);
171 
172  void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
173  void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
174 
179  void SetMediaUrl(string url);
180 
185  void SetMusicUrl(string url);
186 
191  string GetMusicUrl();
192  }
193 }
Details of a Parcel of land
Definition: LandData.cs:47
delegate int overrideParcelMaxPrimCountDelegate(ILandObject obj)
delegate int overrideSimulatorMaxPrimCountDelegate(ILandObject obj)