7 June 2015
region
parameter.17 December 2014
getregionparcelsboundingbox (Commands) | |
---|---|
Type | Corrade progressive command |
Command | getregionparcelsboundingbox |
Description | The parcels on the current region can be retrieved using the getregionparcelsboundingbox which returns pairs of coordinates as a CSV list of the extremities of the parcels to be found on the current region. |
Permissions | land |
Parameters | group , password |
Last Changes | Release 8.22 - added the optional region parameter. |
The parcels on the current region can be retrieved using the getregionparcelsboundingbox
which returns pairs of coordinates as a CSV list of the extremities of the parcels to be found on the current region.
Command | Required Parameters | Required Corrade Permissions | Example |
---|---|---|---|
getregionparcelsboundingbox | group , password | land | llInstantMessage(CORRADE, wasKeyValueEncode( [ "command", "getregionparcelsboundingbox", "group", wasURLEscape(GROUP), "password", wasURLEscape(PASSWORD), "callback", wasURLEscape(URL) ] ) ); |
Optional Parameter | Possible Values | Description |
---|---|---|
region | A string representing a region name. | Attempt to perform the command on the specified region. Note that Corrade must be connected to that region. If in doubt, please use the getconnectedregions command to determine whether the region you want to specify is currently connected. |
Corrade refers to parcels by a single coordinate that lies within the area of the parcel to refer to. However, in order to find parcels to refer to, the getregionparcelsboundingbox
can be used.
We teleported to Milkyway Island, a German sandbox in Second Life and used the getregionparcelsboundingbox
to retrieve the bounding-boxes of all the parcels on the region. The plots data returned by Corrade was the following:
plots=<0, 0, 0>, <256, 256, 50>, <0, 0, 0>, <20, 44, 50>, <80, 0, 0>, <144, 4, 50>, <200, 0, 0>, <256, 44, 50>, <252, 0, 0>, <256, 4, 50>, <0, 68, 0>, <4, 164, 50>, <0, 180, 0>, <44, 256, 50>
By taking pairs of vectors and plotting the result over the map, we obtain the following representation:
One of the small pairs is the pair of vectors:
<256, 44, 50>, <252, 0, 0>
which we have highlighted and then teleported to those coordinates. There we found the plot that corresponds to that pair of coordinates.
In order to get a coordinate that represents the parcel, one which you may want to pass to the position
parameter of other Corrade commands, you would retrieve all the parcels bounding boxes with the getregionparcelsboundingbox
command and then compute the midpoint of segment going through both points.
In other words, you will take the data returned from Corrade:
plots=<0, 0, 0>, <256, 256, 50>, <0, 0, 0>, <20, 44, 50>, <80, 0, 0>, <144, 4, 50>, <200, 0, 0>, <256, 44, 50>, <252, 0, 0>, <256, 4, 50>, <0, 68, 0>, <4, 164, 50>, <0, 180, 0>, <44, 256, 50>
take pairs of two and calculate the midpoint which will give you the parcel positions:
<128, 128, 0> <10, 22, 0> <112, 2, 0> <228, 22, 0> <254, 2, 0> <2, 116, 0> <22, 218, 0>
Now all these vectors represent one (and only one) of the parcels in the region (a total of 7 parcels in this example) and each of these vectors can be passed to the position
parameter of Corrade when you want to refer to a parcel using parcel-related commands.