Skip to main content

TerrainUtils

Utility functions for manipulating terrain

Functions

getTerrainRegion3

TerrainUtils.getTerrainRegion3(
positionVector3,
sizeVector3,
resolutionnumber
) → Region3

Gets the terrain region from the position and size

getTerrainRegion3int16FromRegion3

TerrainUtils.getTerrainRegion3int16FromRegion3(
region3Region3,
resolutionnumber
) → Region3int16

Gets the terrain region3int16 from a terrain region (in world space) at the resolution requested.

getCorner

TerrainUtils.getCorner(region3Region3) → Vector3

Gets the corner of terrain for a region3

getCornerint16

TerrainUtils.getCornerint16(
region3Region3,
resolutionnumber
) → Vector3int16

Gets the corner of the region in Vector3int16

Show raw api
{
    "functions": [
        {
            "name": "getTerrainRegion3",
            "desc": "Gets the terrain region from the position and size",
            "params": [
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "size",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "resolution",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Region3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 21,
                "path": "src/terrainutils/src/Shared/TerrainUtils.lua"
            }
        },
        {
            "name": "getTerrainRegion3int16FromRegion3",
            "desc": "Gets the terrain region3int16 from a terrain region (in world space) at the resolution\nrequested.",
            "params": [
                {
                    "name": "region3",
                    "desc": "",
                    "lua_type": "Region3"
                },
                {
                    "name": "resolution",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Region3int16"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 33,
                "path": "src/terrainutils/src/Shared/TerrainUtils.lua"
            }
        },
        {
            "name": "getCorner",
            "desc": "Gets the corner of terrain for a region3",
            "params": [
                {
                    "name": "region3",
                    "desc": "",
                    "lua_type": "Region3"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 45,
                "path": "src/terrainutils/src/Shared/TerrainUtils.lua"
            }
        },
        {
            "name": "getCornerint16",
            "desc": "Gets the corner of the region in Vector3int16",
            "params": [
                {
                    "name": "region3",
                    "desc": "",
                    "lua_type": "Region3"
                },
                {
                    "name": "resolution",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3int16"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/terrainutils/src/Shared/TerrainUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "TerrainUtils",
    "desc": "Utility functions for manipulating terrain",
    "source": {
        "line": 5,
        "path": "src/terrainutils/src/Shared/TerrainUtils.lua"
    }
}