diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Framework/ILandObject.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/ILandObject.cs | 94 |
1 files changed, 73 insertions, 21 deletions
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs index 8465c86..a783256 100644 --- a/OpenSim/Framework/ILandObject.cs +++ b/OpenSim/Framework/ILandObject.cs | |||
@@ -43,32 +43,39 @@ namespace OpenSim.Framework | |||
43 | LandData LandData { get; set; } | 43 | LandData LandData { get; set; } |
44 | bool[,] LandBitmap { get; set; } | 44 | bool[,] LandBitmap { get; set; } |
45 | UUID RegionUUID { get; } | 45 | UUID RegionUUID { get; } |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// Prim counts for this land object. | 48 | /// Prim counts for this land object. |
49 | /// </summary> | 49 | /// </summary> |
50 | IPrimCounts PrimCounts { get; set; } | 50 | IPrimCounts PrimCounts { get; set; } |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// The start point for the land object. This is the western-most point as one scans land working from | 53 | /// The start point for the land object. This is the northern-most point as one scans land working from |
54 | /// north to south. | 54 | /// west to east. |
55 | /// </summary> | 55 | /// </summary> |
56 | Vector3 StartPoint { get; } | 56 | Vector2 StartPoint { get; } |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// The end point for the land object. This is the eastern-most point as one scans land working from | 59 | /// The end point for the land object. This is the southern-most point as one scans land working from |
60 | /// south to north. | 60 | /// west to east. |
61 | /// </summary> | 61 | /// </summary> |
62 | Vector3 EndPoint { get; } | 62 | Vector2 EndPoint { get; } |
63 | 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 | |||
64 | bool ContainsPoint(int x, int y); | 71 | bool ContainsPoint(int x, int y); |
65 | 72 | ||
66 | ILandObject Copy(); | 73 | ILandObject Copy(); |
67 | 74 | ||
68 | void SendLandUpdateToAvatarsOverMe(); | 75 | void SendLandUpdateToAvatarsOverMe(); |
69 | 76 | ||
70 | void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client); | 77 | void SendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client); |
71 | void UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client); | 78 | bool UpdateLandProperties(LandUpdateArgs args, IClientAPI remote_client, out bool snap_selection, out bool needOverlay); |
72 | bool IsEitherBannedOrRestricted(UUID avatar); | 79 | bool IsEitherBannedOrRestricted(UUID avatar); |
73 | bool IsBannedFromLand(UUID avatar); | 80 | bool IsBannedFromLand(UUID avatar); |
74 | bool CanBeOnThisLand(UUID avatar, float posHeight); | 81 | bool CanBeOnThisLand(UUID avatar, float posHeight); |
@@ -90,27 +97,70 @@ namespace OpenSim.Framework | |||
90 | /// </summary> | 97 | /// </summary> |
91 | /// <returns>The bitmap created.</returns> | 98 | /// <returns>The bitmap created.</returns> |
92 | bool[,] BasicFullRegionLandBitmap(); | 99 | bool[,] BasicFullRegionLandBitmap(); |
93 | 100 | ||
94 | /// <summary> | 101 | /// <summary> |
95 | /// Create a square land bitmap. | 102 | /// Create a square land bitmap. |
96 | /// </summary> | 103 | /// </summary> |
97 | /// <remarks> | 104 | /// <remarks> |
98 | /// Land co-ordinates are zero indexed. The inputs are treated as points. So if you want to create a bitmap | 105 | /// 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 | 106 | /// 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. | 107 | /// specify start_x = 0, start_y = 0, end_x = 252 (or anything up to 255), end_y = 255. |
101 | /// | 108 | /// |
102 | /// At the moment, the smallest parcel of land is 4m x 4m, so if the | 109 | /// 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). | 110 | /// region is 256 x 256m (the SL size), the bitmap returned will start at (0,0) and end at (63,63). |
111 | /// The value of the set_value needs to be true to define an active parcel of the given size. | ||
104 | /// </remarks> | 112 | /// </remarks> |
105 | /// <param name="start_x"></param> | 113 | /// <param name="start_x"></param> |
106 | /// <param name="start_y"></param> | 114 | /// <param name="start_y"></param> |
107 | /// <param name="end_x"></param> | 115 | /// <param name="end_x"></param> |
108 | /// <param name="end_y"></param> | 116 | /// <param name="end_y"></param> |
117 | /// <param name="set_value"></param> | ||
109 | /// <returns>The bitmap created.</returns> | 118 | /// <returns>The bitmap created.</returns> |
110 | bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); | 119 | bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true); |
111 | 120 | ||
112 | bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); | 121 | bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); |
122 | |||
123 | /// <summary> | ||
124 | /// Merge two (same size) land bitmaps. | ||
125 | /// </summary> | ||
126 | /// <param name="bitmap_base"></param> | ||
127 | /// <param name="bitmap_add"></param> | ||
128 | /// <returns>The modified bitmap.</returns> | ||
113 | bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); | 129 | bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); |
130 | |||
131 | /// <summary> | ||
132 | /// Remap a land bitmap. Takes the supplied land bitmap and rotates it, crops it and finally offsets it into | ||
133 | /// a final land bitmap of the target region size. | ||
134 | /// </summary> | ||
135 | /// <param name="bitmap_base">The original parcel bitmap</param> | ||
136 | /// <param name="rotationDegrees"></param> | ||
137 | /// <param name="displacement"><x,y,?></param> | ||
138 | /// <param name="boundingOrigin"><x,y,?></param> | ||
139 | /// <param name="boundingSize"><x,y,?></param> | ||
140 | /// <param name="regionSize"><x,y,?></param> | ||
141 | /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> | ||
142 | /// <param name="AABBMin">out: parcel.AABBMin <x,y,0></param> | ||
143 | /// <param name="AABBMax">out: parcel.AABBMax <x,y,0></param> | ||
144 | /// <returns>New parcel bitmap</returns> | ||
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 | |||
147 | /// <summary> | ||
148 | /// Clears any parcel data in bitmap_base where there exists parcel data in bitmap_new. In other words the parcel data | ||
149 | /// in bitmap_new takes over the space of the parcel data in bitmap_base. | ||
150 | /// </summary> | ||
151 | /// <param name="bitmap_base"></param> | ||
152 | /// <param name="bitmap_new"></param> | ||
153 | /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param> | ||
154 | /// <param name="AABBMin">out: parcel.AABBMin <x,y,0></param> | ||
155 | /// <param name="AABBMax">out: parcel.AABBMax <x,y,0></param> | ||
156 | /// <returns>New parcel bitmap</returns> | ||
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 | |||
114 | void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); | 164 | void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); |
115 | void SendLandObjectOwners(IClientAPI remote_client); | 165 | void SendLandObjectOwners(IClientAPI remote_client); |
116 | void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); | 166 | void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); |
@@ -127,7 +177,7 @@ namespace OpenSim.Framework | |||
127 | /// </summary> | 177 | /// </summary> |
128 | /// <param name="url"></param> | 178 | /// <param name="url"></param> |
129 | void SetMediaUrl(string url); | 179 | void SetMediaUrl(string url); |
130 | 180 | ||
131 | /// <summary> | 181 | /// <summary> |
132 | /// Set the music url for this land parcel | 182 | /// Set the music url for this land parcel |
133 | /// </summary> | 183 | /// </summary> |
@@ -139,5 +189,7 @@ namespace OpenSim.Framework | |||
139 | /// </summary> | 189 | /// </summary> |
140 | /// <returns>The music url.</returns> | 190 | /// <returns>The music url.</returns> |
141 | string GetMusicUrl(); | 191 | string GetMusicUrl(); |
192 | |||
193 | void Clear(); | ||
142 | } | 194 | } |
143 | } | 195 | } |