单个瓦片的地形数据,其中地形数据表示为量化网格。 量化的
网格由三个顶点属性组成,即 Longitude、latitude 和 Height。 所有属性都表示
作为 0 到 32767 范围内的 16 位值。 经度和纬度在西南角为零
的瓦片和 32767 在东北角。 在磁贴的最小高度处,Height 为零
和 32767 位于瓦片中的最大高度。
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
对象,具有以下属性:
|
Example:
const data = new Cesium.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 Cesium.BoundingSphere(new Cesium.Cartesian3(1.0, 2.0, 3.0), 10000),
orientedBoundingBox : new Cesium.OrientedBoundingBox(new Cesium.Cartesian3(1.0, 2.0, 3.0), Cesium.Matrix3.fromRotationX(Cesium.Math.PI, new Cesium.Matrix3())),
horizonOcclusionPoint : new Cesium.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:
Members
credits : Array.<Credit>
此磁贴的制作人员名单数组。
此地形数据中包含的水面罩(如果有)。 水面罩是矩形的
Uint8Array 或图像,其中值 255 表示水,值 0 表示陆地。
允许介于 0 和 255 之间的值,以便在陆地和水之间平滑混合。
Methods
计算指定经纬度处的地形高度。
Name | Type | Description |
---|---|---|
rectangle |
Rectangle | 此地形数据覆盖的矩形。 |
longitude |
number | 以弧度为单位的经度。 |
latitude |
number | 以弧度为单位的纬度。 |
Returns:
指定位置的地形高度。 位置被钳制到
矩形,因此对于远在矩形之外的位置,预期结果会不正确。
根据
HeightmapTerrainData.childTileMask
中。 假定给定的子图块坐标
成为此牌的四个子牌之一。 如果非子图块坐标为
给定,则返回 southeast child tile 的可用性。
Name | Type | Description |
---|---|---|
thisX |
number | 此(父)瓦片的瓦片 X 坐标。 |
thisY |
number | 此(父)瓦片的瓦片 Y 坐标。 |
childX |
number | 用于检查可用性的子磁贴的磁贴 X 坐标。 |
childY |
number | 要检查可用性的子磁贴的磁贴 Y 坐标。 |
Returns:
如果子磁贴可用,则为 True;否则为 false。
upsample(tilingScheme, thisX, thisY, thisLevel, descendantX, descendantY, descendantLevel) → Promise.<QuantizedMeshTerrainData>|undefined
对此地形数据进行上采样,以供后代瓦片使用。 生成的实例将包含
顶点,必要时进行插值。
Name | Type | Description |
---|---|---|
tilingScheme |
TilingScheme | 此地形数据的平铺方案。 |
thisX |
number | 平铺方案中此瓦片的 X 坐标。 |
thisY |
number | 此瓦片在切片方案中的 Y 坐标。 |
thisLevel |
number | 此瓦片在平铺方案中的级别。 |
descendantX |
number | 我们正在上采样的后代瓦片的平铺方案中的 X 坐标。 |
descendantY |
number | 我们正在进行上采样的后代瓦片的平铺方案中的 Y 坐标。 |
descendantLevel |
number | 我们正在上采样的后代瓦片的平铺方案中的级别。 |
Returns:
为后代瓦片的上采样高度贴图地形数据的承诺,
或 undefined 如果正在进行的异步 Upsample 操作过多,并且请求已被
递 延。
获取一个值,该值指示此地形数据是否是通过对较低分辨率的上采样创建的
地形数据。 如果此值为 false,则数据是从其他来源获取的,例如
从远程服务器下载。 对于实例,此方法应返回 true
从调用
HeightmapTerrainData#upsample
返回。
Returns:
如果此实例是通过上采样创建的,则为 True;否则为 false。