Heights
4 nodes
On this page 4
Composite Heights
FunctionThe world's terrain as its visible layers make it: each cell's height from the topmost layer painted there, or the deepest level where none is.
Signature
CompositeHeights(world: World) -> Scalar Field
ScalarField2D CompositeHeights(World world)
Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
Returns
| Heights | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heights
- Package
- Fantasy Planet Painter
Heights From Image File
FunctionA heightfield from a height image: a greyscale PNG, 8 or 16 bits, whose black is the lowest height and white the highest.
Signature
HeightsFromImageFile -> Scalar Field
path: Text
lowest: Number
highest: Number
width: Integer
height: IntegerScalarField2D HeightsFromImageFile(
string path,
double lowest = -4000,
double highest = 6000,
int width = 0,
int height = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The image file. |
| lowest | Number | -4000 | The height black stands for, in metres. |
| highest | Number | 6000 | The height white stands for, in metres. |
| width | Integer | 0 | Columns of the field; 0 keeps the image's. |
| height | Integer | 0 | Rows of the field; 0 keeps the image's. |
Returns
| Heights | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heights
- Package
- Fantasy Planet Painter
Layer Heights
FunctionOne layer's heights, in metres on the datum, each cell's exact height or its level's.
Signature
LayerHeights(world: World, layer: Integer) -> Scalar Field
ScalarField2D LayerHeights(World world, int layer = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| layer | Integer | 0 | Which layer, from the bottom at 0. |
Returns
| Heights | Scalar Field |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heights
- Package
- Fantasy Planet Painter
Set Layer Heights
FunctionThe world with one layer's heights replaced by a heightfield: each value becomes that cell's exact height, and a value that is not a number empties its cell.
Signature
SetLayerHeights -> World
world: World
heights: Scalar Field
layer: IntegerWorld SetLayerHeights(
World world,
ScalarField2D heights,
int layer = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| world | World | — | The world. |
| heights | Scalar Field | — | Heights in metres on the datum, row by row from the north. |
| layer | Integer | 0 | Which layer, from the bottom at 0. |
Returns
| World | World |
Remarks
A field of another size resizes the whole world's grid to it, at most 2,048 cells each way.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Heights
- Package
- Fantasy Planet Painter