View bound to the underlying buffer data of a BufferPolygonCollection.

BufferPolygon instances are flyweights: 单个缓冲Polygon实例可暂时与任何概念结合 “波乐贡”在BufferPolygon Collection中,允许非常大的集合 iterated and updated with a minimal memory footprint.

^

代表为 1 (1) 外线环 3 (3) 以上位置. 可选择定义区域内一个或多个内部线性环(“孔”) 多边形。 每个孔都作为单个索引在位置阵列中表示, 其中该指数的顶点是一个内部线性环的起始点 沿着以下顶点继续,直到达到顶点之一 下一个孔的索引,或顶点列表的结尾。 存储预计算 三角化,以每 NT%% 1 个顶点指数表示

new Cesium.BufferPolygon()

Experimental

This feature is not final and is subject to change without Cesium's standard deprecation policy.

See:

Extends

Members

featureId : number

与原始人相关的特征ID;不需要独具特色.
Inherited From:

readonly holeCount : number

此多边形中的孔数( indices) .

readonly outerVertexCount : number

此多边形外线环中的位置( 垂直) 数, 数字 - NT=0=元素的单位.

readonly outerVertexOffset : number

在收藏位置阵列中偏移到多边形外部的第一个顶点 线性环,为 NT 0 元素.

show : boolean

是否显示原始 .
Inherited From:

readonly triangleCount : number

在这个多边形中三角形的计数,编号为 VEC3 元素.

readonly vertexCount : number

计算这个多边形中的位置(顶点),包括外环和 内环(孔),编号 VEC3 元素.

Methods

static Cesium.BufferPolygon.clone(polygon, result)BufferPolygon

从源多边形复制到结果的数据 。 如果结果多边形不是 new (the last polygon in the collection) then source and result polygons 必须有相同的顶点数、洞数和三角数.
Name Type Description
polygon BufferPolygon
result BufferPolygon
Returns:

getColor(result)Color

返回原始颜色.
Name Type Description
result Color
Returns:
Inherited From:

getHolePositions(holeIndex, result)

返回内线性环顶点位置的数组视图 指定孔。 如果给出“ 结果” 参数, 则写入顶点位置 到那个阵列然后返回。 否则,返回收藏上的矩阵View 内存 —— 此数组的更改不会触发渲染更新 requires `.setPositions()`.
Name Type Description
holeIndex number
result Float64Array optional return {Float64Array}

getHoles(result)Uint32Array

获得这个多边形的孔索引, 每个孔都作为单一 冲抵到多边形的位置阵列中。 每个洞都隐含着 沿一个内部线性环线继续从顶点抵消到 到达位置数组的末尾,或下一个孔的偏移. 如果给出了“ 结果” 参数, 洞索引会写到该数组和 返回 。 。 否则, 返回收藏内存上的矩阵View — 更改 to this array will not trigger render updates, which requires `.setHoles()`.
Name Type Description
result Uint32Array optional
Returns:

getHoleVertexCount(holeIndex)number

返回指定孔中的顶点( VEC3 )数.
Name Type Description
holeIndex number
Returns:

getOuterPositions(result)Float64Array

返回多边形外线环顶点位置的数组视图. 如果给出了“ 结果” 参数, 则将顶点位置写入该数组 然后就回来了。 否则,返回收藏内存上的 ArrayView —— 此数组的更改不会触发渲染更新, 这需要 `.setPositions()`.
Name Type Description
result Float64Array optional
Returns:

getPositions(result)

返回多边形顶点位置的数组视图。 如果“ 结果 ” 参数,顶点位置会写到该数组并返回. 否则, 返回收藏内存上的 ArrayView —— 更改此数组 将不会触发渲染更新, 这需要 `.setPositions()` .
Name Type Description
result Float64Array optional return {Float64Array}

getTriangles(result)Uint32Array

返回多边形三角形指数的数组视图,以 每个三角形有三个顶点指数. 如果给出了“ 结果” 参数, 三角形指数会写入该数组 然后就回来了。 否则,返回收藏内存上的 ArrayView —— 此数组的更改不会触发渲染更新, 这需要 `.setTriangles()`.
Name Type Description
result Uint32Array optional
Returns:

setColor(color)

更新原始颜色.
Name Type Description
color Color
Inherited From:

setHoles(holes)

设置此多边形的孔索引, 以孔为单数 冲抵到多边形的位置阵列中。 每个洞都隐含着 沿一个内部线性环线继续从顶点抵消到 到达位置数组的末尾,或下一个孔的偏移.
Name Type Description
holes Uint32Array

setPositions(positions)

Name Type Description
positions Float64Array

setTriangles(indices)

设置此多边形三角形指数, 表示为三个顶点指数 per triangle.
Name Type Description
indices Uint32Array

toJSON()Object

返回代表多边形的 NT 0 可串行对象。 此编码 没有内存效率,一般应用于调试和 testing.
Returns:
JSON-serializable object.
Inherited From:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.