options |
Object
|
Object with the following properties:
Name |
Type |
Default |
Description |
buffer |
TypedArray
|
|
The buffer containing height data. |
width |
Number
|
|
The width (longitude direction) of the heightmap, in samples. |
height |
Number
|
|
The height (latitude direction) of the heightmap, in samples. |
childTileMask |
Number
|
15
|
optional
A bit mask indicating which of this tile's four children exist.
If a child's bit is set, geometry will be requested for that tile as well when it
is needed. If the bit is cleared, the child tile is not requested and geometry is
instead upsampled from the parent. The bit values are as follows:
Bit Position | Bit Value | Child Tile |
0 | 1 | Southwest |
1 | 2 | Southeast |
2 | 4 | Northwest |
3 | 8 | Northeast |
|
structure |
Object
|
|
optional
An object describing the structure of the height data.
Name |
Type |
Default |
Description |
heightScale |
Number
|
1.0
|
optional
The factor by which to multiply height samples in order to obtain
the height above the heightOffset, in meters. The heightOffset is added to the resulting
height after multiplying by the scale. |
heightOffset |
Number
|
0.0
|
optional
The offset to add to the scaled height to obtain the final
height in meters. The offset is added after the height sample is multiplied by the
heightScale. |
elementsPerHeight |
Number
|
1
|
optional
The number of elements in the buffer that make up a single height
sample. This is usually 1, indicating that each element is a separate height sample. If
it is greater than 1, that number of elements together form the height sample, which is
computed according to the structure.elementMultiplier and structure.isBigEndian properties. |
stride |
Number
|
1
|
optional
The number of elements to skip to get from the first element of
one height to the first element of the next height. |
elementMultiplier |
Number
|
256.0
|
optional
The multiplier used to compute the height value when the
stride property is greater than 1. For example, if the stride is 4 and the strideMultiplier
is 256, the height is computed as follows:
`height = buffer[index] + buffer[index + 1] * 256 + buffer[index + 2] * 256 * 256 + buffer[index + 3] * 256 * 256 * 256`
This is assuming that the isBigEndian property is false. If it is true, the order of the
elements is reversed. |
isBigEndian |
Boolean
|
false
|
optional
Indicates endianness of the elements in the buffer when the
stride property is greater than 1. If this property is false, the first element is the
low-order element. If it is true, the first element is the high-order element. |
|
createdByUpsampling |
Boolean
|
false
|
optional
True if this instance was created by upsampling another instance;
otherwise, false. |
|