Appearance
KBE3D / KBCore / Cesium / TerrainData
类: TerrainData
Terrain data for a single tile. This type describes an interface and is not intended to be instantiated directly.
属性
credits
credits:
Credit[]
An array of credits for this tile.
waterMask
waterMask:
HTMLCanvasElement|HTMLImageElement|ImageBitmap|Uint8Array<ArrayBufferLike> |undefined
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.
方法
interpolateHeight()
interpolateHeight(
rectangle:Rectangle,longitude:number,latitude:number):number
Computes the terrain height at a specified longitude and latitude.
参数
rectangle
The rectangle covered by this terrain data.
longitude
number
The longitude in radians.
latitude
number
The latitude in radians.
返回
number
The terrain height at the specified position. If the position is outside the rectangle, this method will extrapolate the height, which is likely to be wildly incorrect for positions far outside the rectangle.
isChildAvailable()
isChildAvailable(
thisX:number,thisY:number,childX:number,childY:number):boolean
Determines if a given child tile is available, based on the TerrainData#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.
参数
thisX
number
The tile X coordinate of this (the parent) tile.
thisY
number
The tile Y coordinate of this (the parent) tile.
childX
number
The tile X coordinate of the child tile to check for availability.
childY
number
The tile Y coordinate of the child tile to check for availability.
返回
boolean
True if the child tile is available; otherwise, false.
upsample()
upsample(
tilingScheme:TilingScheme,thisX:number,thisY:number,thisLevel:number,descendantX:number,descendantY:number,descendantLevel:number):Promise<TerrainData> |undefined
Upsamples this terrain data for use by a descendant tile.
参数
tilingScheme
The tiling scheme of this terrain data.
thisX
number
The X coordinate of this tile in the tiling scheme.
thisY
number
The Y coordinate of this tile in the tiling scheme.
thisLevel
number
The level of this tile in the tiling scheme.
descendantX
number
The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
descendantY
number
The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
descendantLevel
number
The level within the tiling scheme of the descendant tile for which we are upsampling.
返回
Promise<TerrainData> | undefined
A promise for upsampled terrain data for the descendant tile, or undefined if too many asynchronous upsample operations are in progress and the request has been deferred.
wasCreatedByUpsampling()
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 TerrainData#upsample.
返回
boolean
True if this instance was created by upsampling; otherwise, false.
构造函数
构造函数
new TerrainData():
TerrainData
返回
TerrainData
