aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJak Daniels2015-11-18 18:02:13 +0000
committerUbitUmarov2015-11-22 01:31:48 +0000
commitb23e5fd8b6d1cc01eddaf08fde646551a8e2c984 (patch)
tree87cbfc30fcce88eec2954db25926ce0297e98009 /OpenSim/Framework
parentrow format fixed removed to allow creation of regions table (diff)
downloadopensim-SC_OLD-b23e5fd8b6d1cc01eddaf08fde646551a8e2c984.zip
opensim-SC_OLD-b23e5fd8b6d1cc01eddaf08fde646551a8e2c984.tar.gz
opensim-SC_OLD-b23e5fd8b6d1cc01eddaf08fde646551a8e2c984.tar.bz2
opensim-SC_OLD-b23e5fd8b6d1cc01eddaf08fde646551a8e2c984.tar.xz
Changes to LandObject/ILandObject to support importing OARs with different Region sizes to the destination region.
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/ILandObject.cs47
1 files changed, 45 insertions, 2 deletions
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs
index db1496c..ef7a9e6 100644
--- a/OpenSim/Framework/ILandObject.cs
+++ b/OpenSim/Framework/ILandObject.cs
@@ -97,20 +97,63 @@ namespace OpenSim.Framework
97 /// <remarks> 97 /// <remarks>
98 /// Land co-ordinates are zero indexed. The inputs are treated as points. So if you want to create a bitmap 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 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. 100 /// specify start_x = 0, start_y = 0, end_x = 252 (or anything up to 255), end_y = 255.
101 /// 101 ///
102 /// At the moment, the smallest parcel of land is 4m x 4m, so if the 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). 103 /// region is 256 x 256m (the SL size), the bitmap returned will start at (0,0) and end at (63,63).
104 /// The value of the set_value needs to be true to define an active parcel of the given size.
104 /// </remarks> 105 /// </remarks>
105 /// <param name="start_x"></param> 106 /// <param name="start_x"></param>
106 /// <param name="start_y"></param> 107 /// <param name="start_y"></param>
107 /// <param name="end_x"></param> 108 /// <param name="end_x"></param>
108 /// <param name="end_y"></param> 109 /// <param name="end_y"></param>
110 /// <param name="set_value"></param>
109 /// <returns>The bitmap created.</returns> 111 /// <returns>The bitmap created.</returns>
110 bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y); 112 bool[,] GetSquareLandBitmap(int start_x, int start_y, int end_x, int end_y, bool set_value = true);
111 113
112 bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value); 114 bool[,] ModifyLandBitmapSquare(bool[,] land_bitmap, int start_x, int start_y, int end_x, int end_y, bool set_value);
115
116 /// <summary>
117 /// Merge two (same size) land bitmaps.
118 /// </summary>
119 /// <param name="bitmap_base"></param>
120 /// <param name="bitmap_add"></param>
121 /// <returns>The modified bitmap.</returns>
113 bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add); 122 bool[,] MergeLandBitmaps(bool[,] bitmap_base, bool[,] bitmap_add);
123
124 /// <summary>
125 /// Remap a land bitmap. Takes the supplied land bitmap and rotates it, crops it and finally offsets it into
126 /// a final land bitmap of the target region size.
127 /// </summary>
128 /// <param name="bitmap_base">The original parcel bitmap</param>
129 /// <param name="rotationDegrees"></param>
130 /// <param name="displacement">&lt;x,y,?&gt;</param>
131 /// <param name="boundingOrigin">&lt;x,y,?&gt;</param>
132 /// <param name="boundingSize">&lt;x,y,?&gt;</param>
133 /// <param name="regionSize">&lt;x,y,?&gt;</param>
134 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param>
135 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt</param>
136 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param>
137 /// <returns>New parcel bitmap</returns>
138 bool[,] RemapLandBitmap(bool[,] bitmap_base, Vector2 displacement, float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Vector2 regionSize, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax);
139
140 /// <summary>
141 /// Clears any parcel data in bitmap_base where there exists parcel data in bitmap_new. In other words the parcel data
142 /// in bitmap_new takes over the space of the parcel data in bitmap_base.
143 /// </summary>
144 /// <param name="bitmap_base"></param>
145 /// <param name="bitmap_new"></param>
146 /// <param name="isEmptyNow">out: This is set if the resultant bitmap is now empty</param>
147 /// <param name="AABBMin">out: parcel.AABBMin &lt;x,y,0&gt;</param>
148 /// <param name="AABBMax">out: parcel.AABBMax &lt;x,y,0&gt</param>
149 /// <returns>New parcel bitmap</returns>
150 bool[,] RemoveFromLandBitmap(bool[,] bitmap_base, bool[,] bitmap_new, out bool isEmptyNow, out Vector3 AABBMin, out Vector3 AABBMax);
151
152 byte[] ConvertLandBitmapToBytes();
153 bool[,] ConvertBytesToLandBitmap(bool overrideRegionSize = false);
154 bool IsLandBitmapEmpty(bool[,] landBitmap);
155 void DebugLandBitmap(bool[,] landBitmap);
156
114 void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client); 157 void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
115 void SendLandObjectOwners(IClientAPI remote_client); 158 void SendLandObjectOwners(IClientAPI remote_client);
116 void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client); 159 void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);