QuantizedMeshTerrainData

Terrain data for a single tile where the terrain data is represented as a quantized mesh. A quantized mesh consists of three vertex attributes, longitude, latitude, and height. All attributes are expressed as 16-bit values in the range 0 to 32767. Longitude and latitude are zero at the southwest corner of the tile and 32767 at the northeast corner. Height is zero at the minimum height in the tile and 32767 at the maximum height in the tile.

const data = new QuantizedMeshTerrainData({
minimumHeight : -100,
maximumHeight : 2101,
quantizedVertices : new Uint16Array([// order is SW NW SE NE
// longitude
0, 0, 32767, 32767,
// latitude
0, 32767, 0, 32767,
// heights
16384, 0, 32767, 16384]),
indices : new Uint16Array([0, 3, 1,
0, 2, 3]),
boundingSphere : new BoundingSphere(new Cartesian3(1.0, 2.0, 3.0), 10000),
orientedBoundingBox : new OrientedBoundingBox(new Cartesian3(1.0, 2.0, 3.0), Matrix3.fromRotationX(Math.PI, new Matrix3())),
horizonOcclusionPoint : new Cartesian3(3.0, 2.0, 1.0),
westIndices : [0, 1],
southIndices : [0, 1],
eastIndices : [2, 3],
northIndices : [1, 3],
westSkirtHeight : 1.0,
southSkirtHeight : 1.0,
eastSkirtHeight : 1.0,
northSkirtHeight : 1.0
});

See also

Constructors

Link copied to clipboard

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override var credits: ReadonlyArray<Credit>

An array of credits for this tile.

Link copied to clipboard
open override var waterMask: Any

The water mask included in this terrain data, if any. A water mask is a rectangular Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land. Values in between 0 and 255 are allowed as well to smoothly blend between land and water.

Functions

Link copied to clipboard
open override fun interpolateHeight(rectangle: Rectangle, longitude: Double, latitude: Double): Double

Computes the terrain height at a specified longitude and latitude.

Link copied to clipboard
open override fun isChildAvailable(thisX: Double, thisY: Double, childX: Double, childY: Double): Boolean

Determines if a given child tile is available, based on the HeightmapTerrainData.childTileMask. The given child tile coordinates are assumed to be one of the four children of this tile. If non-child tile coordinates are given, the availability of the southeast child tile is returned.

Link copied to clipboard
suspend fun upsample(tilingScheme: TilingScheme, thisX: Double, thisY: Double, thisLevel: Int, descendantX: Double, descendantY: Double, descendantLevel: Int): TerrainData?

Upsamples this terrain data for use by a descendant tile.

Link copied to clipboard
open override fun upsampleAsync(tilingScheme: TilingScheme, thisX: Double, thisY: Double, thisLevel: Int, descendantX: Double, descendantY: Double, descendantLevel: Int): Promise<QuantizedMeshTerrainData>?

Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the vertices in this instance, interpolated if necessary.

Link copied to clipboard
open override fun wasCreatedByUpsampling(): Boolean

Gets a value indicating whether or not this terrain data was created by upsampling lower resolution terrain data. If this value is false, the data was obtained from some other source, such as by downloading it from a remote server. This method should return true for instances returned from a call to HeightmapTerrainData.upsample.