aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ILandObject.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ILandObject.cs143
1 files changed, 143 insertions, 0 deletions
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
new file mode 100644
index 0000000..8465c86
--- /dev/null
+++ b/OpenSim/Framework/ILandObject.cs
@@ -0,0 +1,143 @@
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
28using System.Collections.Generic;
29using OpenMetaverse;
30
31namespace 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
47 /// <summary>
48 /// Prim counts for this land object.
49 /// </summary>
50 IPrimCounts PrimCounts { get; set; }
51
52 /// <summary>
53 /// The start point for the land object. This is the western-most point as one scans land working from
54 /// north to south.
55 /// </summary>
56 Vector3 StartPoint { get; }
57
58 /// <summary>
59 /// The end point for the land object. This is the eastern-most point as one scans land working from
60 /// south to north.
61 /// </summary>
62 Vector3 EndPoint { get; }
63
64 bool ContainsPoint(int x, int y);
65
66 ILandObject Copy();
67
68 void SendLandUpdateToAvatarsOverMe();
69
70 void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client);
71 void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client);
72 bool IsEitherBannedOrRestricted(UUID avatar);
73 bool IsBannedFromLand(UUID avatar);
74 bool CanBeOnThisLand(UUID avatar, float posHeight);
75 bool IsRestrictedFromLand(UUID avatar);
76 bool IsInLandAccessList(UUID avatar);
77 void SendLandUpdateToClient(IClientAPI remote_client);
78 void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client);
79 List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag);
80 void SendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID, IClientAPI remote_client);
81 void UpdateAccessList(uint flags, UUID transactionID, int sequenceID, int sections, List<LandAccessEntry> entries, IClientAPI remote_client);
82 void UpdateLandBitmapByteArray();
83 void SetLandBitmapFromByteArray();
84 bool[,] GetLandBitmap();
85 void ForceUpdateLandInfo();
86 void SetLandBitmap(bool[,] bitmap);
87
88 /// <summary>
89 /// Get a land bitmap that would cover an entire region.
90 /// </summary>
91 /// <returns>The bitmap created.</returns>
92 bool[,] BasicFullRegionLandBitmap();
93
94 /// <summary>
95 /// Create a square land bitmap.
96 /// </summary>
97 /// <remarks>
98 /// Land co-ordinates are zero indexed. The inputs are treated as points. So if you want to create a bitmap
99 /// that covers an entire 256 x 256m region apart from a strip of land on the east, then you would need to
100 /// specify start_x = 0, start_y = 0, end_x = 252 (or anything up to 255), end_y = 256.
101 ///
102 /// At the moment, the smallest parcel of land is 4m x 4m, so if the
103 /// region is 256 x 256m (the SL size), the bitmap returned will start at (0,0) and end at (63,63).
104 /// </remarks>
105 /// <param name="start_x"></param>
106 /// <param name="start_y"></param>
107 /// <param name="end_x"></param>
108 /// <param name="end_y"></param>
109 /// <returns>The bitmap created.</returns>
110 bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y);
111
112 bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
113 bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
114 void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
115 void SendLandObjectOwners(IClientAPI remote_client);
116 void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
117 void ResetOverMeRecord();
118 void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
119
120 void DeedToGroup(UUID groupID);
121
122 void SetParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel);
123 void SetSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel);
124
125 /// <summary>
126 /// Set the media url for this land parcel
127 /// </summary>
128 /// <param name="url"></param>
129 void SetMediaUrl(string url);
130
131 /// <summary>
132 /// Set the music url for this land parcel
133 /// </summary>
134 /// <param name="url"></param>
135 void SetMusicUrl(string url);
136
137 /// <summary>
138 /// Get the music url for this land parcel
139 /// </summary>
140 /// <returns>The music url.</returns>
141 string GetMusicUrl();
142 }
143}