new Cesium.QuantizedMeshTerrainData(options)

地形数据以定量网格表示的单一瓦片的地形数据。 数量化 mesh由三个顶点属性,经度,纬度,高度组成. 所有属性都表示 作为0至32767之间的16位值。 西南角的经度和纬度为零 瓷砖和 32767 在东北角。 砖块最小高度为零 和32767 在瓦片的最大高度.
Name Type Description
options object 下列属性的对象 :
Name Type Default Description
quantizedVertices Uint16Array 包含被量化的网格的缓冲器.
indices Uint16Array | Uint32Array 说明如何将量化的顶点联系起来的指数 组成三角形 每三个指数都指定一个三角形.
minimumHeight number 砖块内最低地形高度,以椭圆形以上米数表示.
maximumHeight number 瓦片内最大地形高度,以椭圆形上方米为单位.
boundingSphere BoundingSphere 覆盖网状所有顶点的球体.
orientedBoundingBox OrientedBoundingBox optional 一个东方波纹框 将网状的所有顶点都连接起来.
horizonOcclusionPoint Cartesian3 网状的地平线隐蔽点 如果这一点 地平线以下,整个瓦片也假定在地平线以下. 该点以椭圆形坐标表示.
westIndices Array.<number> 瓦片西缘的顶点指数.
southIndices Array.<number> 瓦片南缘的顶点指数.
eastIndices Array.<number> 瓷砖东缘的顶点指数.
northIndices Array.<number> 瓦片北缘的顶点指数.
westSkirtHeight number 裙高在瓦片的西侧边缘添加.
southSkirtHeight number 裙高以加于瓷砖南缘.
eastSkirtHeight number 裙子的高度在瓷砖的东侧边缘添加.
northSkirtHeight number 裙高以加于瓦片北缘.
childTileMask number 15 optional 一个小面具,表示这瓷砖的四个孩子中哪一个存在. 如果设定了孩子的位数, 将会要求该瓦片的几何以及当它 需要帮助。 如果比特被清除,则不要求使用孩子的瓦片和几何形状 而不是从父母那里做样本。 位值如下: ============================================================================================================================================================================ -NT############################################################################################################################################################################################################################################################# NT+0+NT+1+1+NT+2+NT+3+2+NT+4+NT+5+5+东南+NT+6+NT+7+ -NT############################################################################################################################################################################################################################################################# ~NT+0+NT+1+3+NT+2+NT+3+8+NT+4+NT+5+5+东北 NT+6+NT+7+
createdByUpsampling boolean false optional True if this instance was created by upsampling another instance; otherwise, false.
encodedNormals Uint8Array optional 包含每个顶点正常值的缓冲器, 使用“ oct” 编码
waterMask Uint8Array optional 包含水缸的缓冲器.
credits Array.<Credit> optional 这瓷砖的功劳.
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>

此牌的记分数列 .

waterMask : Uint8Array|HTMLImageElement|HTMLCanvasElement|undefined

包括在这个地形数据中的水面具,如果有的话。 水面罩是长方形 Uint8 箭头或图像,其中值为 255 表示水,值为 0 表示土地. 0至255之间的数值也能够顺利地混合土地和水.

Methods

interpolateHeight(rectangle, longitude, latitude)number

计算特定经度和纬度的地形高度.
Name Type Description
rectangle Rectangle 此地形数据覆盖的矩形.
longitude number 弧度的经度.
latitude number 弧度的纬度.
Returns:
指定位置的地形高度. 位置被夹住 长方形,所以在长方形以外的位置上预计结果不正确.

isChildAvailable(thisX, thisY, childX, childY)boolean

确定是否可以根据 QuantizedMeshTerrainData.childTileMask. The given child tile coordinates are assumed 成为这瓷砖的四个孩子之一 如果非孩子的砖块坐标是 如果有的话,则归还东南地区儿童瓷砖.
Name Type Description
thisX number 此( 母) 瓦片的 X 坐标 .
thisY number 此( 母) 瓦的 Y 坐标 .
childX number 儿童瓷砖的瓦片X坐标以检查可用性.
childY number 儿童瓷砖的Y瓦坐标以检查是否有可用.
Returns:
如果有孩子的瓷砖,则属实;否则,为假.

upsample(tilingScheme, thisX, thisY, thisLevel, descendantX, descendantY, descendantLevel)Promise.<QuantizedMeshTerrainData>|undefined

上标此地形数据,供后代瓷砖使用. 由此产生的实例将包含一个子集 这种情况下的顶点,必要时插上.
Name Type Description
tilingScheme TilingScheme 地形数据图案.
thisX number X 协调这个平板图中的砖块.
thisY number T图中的此瓦的Y坐标.
thisLevel number 这种瓦片在平板图中的级别.
descendantX number X在我们正在取样的后裔瓷砖的平底图中进行协调.
descendantY number Y在我们所调查的后代瓷砖的平板图中进行协调.
descendantLevel number 我们所调查的后裔瓦片的平底图中的水平.
Returns:
对高地图数据进行抽样检测的承诺, 或未定义,如果正在同步进行太多的升级操作,而且请求已经 deferred.

wasCreatedByUpsampling()boolean

获得一个数值,显示此地形数据是否通过对下分辨率进行抽样创建 地形数据。 如果该值不正确,则数据来自其他来源,例如: 如从远程服务器下载。 此方法对于实例应返回真实值 returned from a call to HeightmapTerrainData#upsample.
Returns:
如果这个实例是通过抽样创建的,否则就是虚假的.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.