Border

Description

Name

class Tinman.Heightmap.Border

Derived from

Heightmap

This class wraps another rectangular heightmap (see (w|h) below), pads it to the size (s|s) and adds a smooth border falloff towards the right and bottom heightmap edges:

(0|0)
  +---------+----+-----+               Y-
  |         |    |     |               |
  |         |    |     |          X- --O-- X+
  |         |    |     |               |
  +---------+    |     |               Y+
  |       (w|h)  |     |
  |--------------+     |      w := heightmap width, minus one
  |          (w+f|h+f) |      h := height height, minus one
  |                    |      s := 1 + 2^ceiling(log2(max(w + f,h + f)))
  +--------------------+      f := border fallof
                     (s|s)

This is to avoid sharp edges at the heightmap border which would cause unnecessary triangles during tessellation.

Fields / Required

heightmap

Type

Heightmap

Constraint

# != null

The heightmap to wrap.


falloff

Type

number

Constraint

# >= 0

The width and height of the border region, i.e. the transition between the edge samples of the wrapped heightmap and the specified border sample.

Fields / Optional

sample

Type

Sample

Default

null

The heightmap sample to use for the border region.

Fields / External

id

Type

Dataset.Id

Returns a unique identifier for this dataset.


metadata

Returns dataset metadata information.


georef

Returns geo-referencing information.


info

Holds detail information about this heightmap.