Get Terrain Height

7 June 2015

  • Release 8.22 - added the optional region parameter.

17 December 2014

  • Release 7.29 - added.
getterrainheight (Commands)
TypeCorrade progressive command
Commandgetterrainheight
DescriptionThe getterrainheight command can be used to get the height at a certain point, the height map of an encompassing rectangle or the height map of the entire region.
Permissionsland
Parametersgroup, password
Last ChangesRelease 8.22 - added the optional region parameter.

The getterrainheight command can be used to get the height at a certain point, the height map of an encompassing rectangle or the height map of the entire region.

Command Required Parameters Required Corrade Permissions Example
getterrainheight group, password land
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // get the height map of the
            // entire region that Corrade
            // is currently standing on
            "command", "getterrainheight",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD)
        ]
    )
);
Optional Parameter Possible Value Description
southwest An LSL vector (only $x$ and $y$ components are considered). The bottom left point of a rectangle area (default <255, 255, 0>).
northeast An LSL vector (only $x$ and $y$ components are considered). The top right point of a rectangle area (default <0, 0, 0>).
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.

Every region ranges locally from $0$ to $255$ on both $x$ and $y$ positive senses of the axes and the height-map generated by this command is generated in $1m$ steps - fractional values of $x$ and $y$ components are automatically truncated to the integer. The southwest and northeast parameters, if supplied, allow you to encompass a rectangle for which you want to generate a height map for.

Suppose you have a parcel that looks like the following, where every star denotes an offset from the origin $O(0,0)$, then the bottom-left coordinate is what you should supply to the southwest parameter and northeast is the top-right coordinate:

* * * * B <--- top-right (northeast)
* * * * *
* * * * *
A * * * *
^
|
|
bottom-left (southwest)

In case southwest and northeast parameters are omitted then the command assumes you want to generate a height map for the entire region (ie: $A$ becomes the origin at <0,0,0> and $B$ becomes the top-right coordinate of the region <255,255,0>).


secondlife/scripted_agents/corrade/api/progressive/commands/getterrainheight.txt ยท Last modified: 2017/02/22 18:29 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.