单个图块的地形数据,其中地形数据表示为 glb(二进制 glTF)。 Terrain data for a single tile where the terrain data is represented as a glb (binary glTF).
| 名称 Name | 类型 Type | 说明 Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
实验性 Experimental
此功能不是最终版本,可能会在没有 Cesium 标准弃用政策的情况下进行更改。 This feature is not final and is subject to change without Cesium's standard deprecation policy.
另见: See:
成员 Members
credits : Array.<Credit>|undefined
该图块的一系列制作人员名单。 An array of credits for this tile.
该地形数据中包含的水掩模(如果有)。水蒙版是一个矩形 Uint8Array 或图像,其中值 255 表示水,值 0 表示陆地。 0 到 255 之间的值也允许在陆地和水之间平滑地混合。 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.
方法 Methods
返回指定经度和纬度处的地形高度,如果网格未定义,则返回未定义的高度。 Returns the terrain height at a specified longitude and latitude, or undefined if the mesh is undefined.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
rectangle |
Rectangle | 该地形数据覆盖的矩形。 The rectangle covered by this terrain data. |
longitude |
number | 以弧度表示的经度。 The longitude in radians. |
latitude |
number | 以弧度为单位的纬度。 The latitude in radians. |
返回: Returns:
指定位置处的地形高度,如果网格未定义则为未定义。如果位置位于矩形之外,此方法将推断高度,这对于远离矩形之外的位置可能非常不正确。 The terrain height at the specified position, or undefined if the mesh is undefined. 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.
根据以下条件确定给定的子图块是否可用 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.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
thisX |
number | 此(父)图块的图块 X 坐标。 The tile X coordinate of this (the parent) tile. |
thisY |
number | 此(父)图块的图块 Y 坐标。 The tile Y coordinate of this (the parent) tile. |
childX |
number | 用于检查可用性的子图块的图块 X 坐标。 The tile X coordinate of the child tile to check for availability. |
childY |
number | 用于检查可用性的子图块的图块 Y 坐标。 The tile Y coordinate of the child tile to check for availability. |
返回: Returns:
如果子图块可用,则为 True;否则为假。 True if the child tile is available; otherwise, false.
upsample(tilingScheme, thisX, thisY, thisLevel, descendantX, descendantY, descendantLevel) → Promise.<TerrainData>|undefined
对该地形数据进行上采样以供后代图块使用。 Upsamples this terrain data for use by a descendant tile.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
tilingScheme |
TilingScheme | 该地形数据的切片方案。 The tiling scheme of this terrain data. |
thisX |
number | 切片方案中该切片的 X 坐标。 The X coordinate of this tile in the tiling scheme. |
thisY |
number | 切片方案中该切片的 Y 坐标。 The Y coordinate of this tile in the tiling scheme. |
thisLevel |
number | 该切片在切片方案中的级别。 The level of this tile in the tiling scheme. |
descendantX |
number | 我们正在对其进行上采样的后代切片的切片方案中的 X 坐标。 The X coordinate within the tiling scheme of the descendant tile for which we are upsampling. |
descendantY |
number | 我们要对其进行上采样的后代切片的切片方案中的 Y 坐标。 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. |
返回: Returns:
对后代图块的上采样地形数据的承诺,或者如果尚未调用 createMesh 或正在进行太多异步上采样操作且请求已推迟,则为未定义。 A promise for upsampled terrain data for the descendant tile, or undefined if createMesh has not been called yet or too many asynchronous upsample operations are in progress and the request has been deferred.
获取一个值,该值指示此地形数据是否是通过对较低分辨率地形数据进行上采样而创建的。如果该值为 false,则数据是从其他来源获取的,例如从远程服务器下载。对于从调用返回的实例,此方法应返回 true 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
Cesium3DTilesTerrainData#upsample.
返回: Returns:
如果此实例是通过上采样创建的,则为 True;否则为假。 True if this instance was created by upsampling; otherwise, false.
