Pyramid.Info

Description

Name

struct Tinman.Pyramid.Info

Used by

Pyramid.info

Provides detail information about a heightmap.

Fields / Required

levels

Type

number

The number of pyramid levels.


tile

Type

number

The size of a single map tile, in pixels.


size

Type

number

The size of the bottom-most pyramid level.

Fields / Optional

georef

Type

Tinman.Georef

Default

null

The georeference of the pyramid.


flags

Type

Pyramid.Flags[]

Default

[]

Additional behaviour flags of the pyramid.


format

Type

PixelFormat[]

Default

[Truecolor, Alpha, SixteenBits]

The pixel format hint of the pixel pyramid.


pad

Type

number

Default

0

The pad width of this pyramid.

Tile padding is used to avoid color bleeding that will occur when texture samples are filtered at the edge of a pyramid tile (assuming tiles are stored in some kind of texture atlas). The tile pad width gives the number of safety pixels at the that are borrowed from neighbouring pyramid tiles:

      8x8 tile, with a pad of 2:

    0   1   2   3   4   5   6   7
  +---+---+---+---+---+---+---+---+
0 |###|###|###|###|###|###|###|###|
  +---+---+---+---+---+---+---+---+
1 |###|###|###|###|###|###|###|###|
  +---+--(X)--+---+---+--(X)--+---+
2 |###|###|   |   |   |   |###|###|
  +---+---+---+---+---+---+---+---+
3 |###|###|   |   |   |   |###|###|
  +---+---+---+---+---+---+---+---+
4 |###|###|   |   |   |   |###|###|
  +---+---+---+---+---+---+---+---+
5 |###|###|   |   |   |   |###|###|
  +---+--(X)--+---+---+--(X)--+---+
6 |###|###|###|###|###|###|###|###|
  +---+---+---+---+---+---+---+---+
7 |###|###|###|###|###|###|###|###|
  +---+---+---+---+---+---+---+---+

The point coordinates marked with (X) will be mapped to the corner vertices of each terrain mesh sector. Only the effective region of a padded tile (i.e. the square surrounded by (X)) contains actual data. The padded pixels are sampled from neighbouring source tiles and carry redundant information.


resolution

Type

number[]

Default

null

For each pyramid level, holds the edge length of the square that has the same area as the parallelogram defined by the ground vectors corresponding to the raster steps of (1|0) and (0|1).