实验性 Experimental
此功能不是最终版本,可能会在没有 Cesium 标准弃用政策的情况下进行更改。 This feature is not final and is subject to change without Cesium's standard deprecation policy.
另见: See:
继承 Extends
成员 Members
与图元关联的特征 ID;不要求是唯一的。 Feature ID associated with the primitive; not required to be unique.
- 继承自: Inherited From:
该多边形中的孔(索引)计数。 Count of holes (indices) in this polygon.
该多边形外部线性环中的位置(顶点)计数,VEC3 元素的数量。 Count of positions (vertices) in this polygon's outer linear ring, number of VEC3 elements.
集合位置数组中到多边形外线性环中第一个顶点的偏移量,VEC3 元素的数量。 Offset in collection position array to first vertex in polygon's outer linear ring, number of VEC3 elements.
是否显示原语。 Whether primitive is shown.
- 继承自: Inherited From:
该多边形中的三角形数量,VEC3 元素数量。 Count of triangles in this polygon, number of VEC3 elements.
该多边形中的位置(顶点)计数,包括外环和内环(孔)、VEC3 元素的数量。 Count of positions (vertices) in this polygon, including both outer ring and internal rings (holes), number of VEC3 elements.
方法 Methods
将数据从源多边形复制到结果。如果结果多边形不是新的(集合中的最后一个多边形),则源多边形和结果多边形必须具有相同的顶点数、孔数和三角形数。 Copies data from source polygon to result. If the result polygon is not new (the last polygon in the collection) then source and result polygons must have the same vertex counts, hole counts, and triangle counts.
返回: Returns:
返回指定孔的内部线性环顶点位置的数组视图。如果给出“结果”参数,则顶点位置将写入该数组并返回。否则,在集合内存上返回一个 ArrayView - 对此数组的更改不会触发渲染更新,这需要“.setPositions()”。 Returns an array view of the inner linear ring vertex positions for the specified hole. If 'result' argument is given, vertex positions are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires `.setPositions()`.
| 名称 Name |
类型 Type |
说明 Description |
holeIndex |
number
|
|
result |
TypedArray
|
可选 optional
返回 {TypedArray} return {TypedArray} |
获取此多边形的孔索引,每个孔表示为此多边形位置数组中的单个偏移量。每个孔隐式地从该顶点偏移沿着内部线性环继续,直到到达位置数组的末尾或下一个孔偏移。如果给出“结果”参数,则孔索引将写入该数组并返回。否则,在集合内存上返回一个 ArrayView - 对此数组的更改不会触发渲染更新,这需要“.setHoles()”。 Gets this polygon's hole indices, with each hole represented as a single offset into this polygon's positions array. Each hole implicitly continues along an internal linear ring from that vertex offset until reaching either the end of the positions array, or the next hole offset. If 'result' argument is given, hole indices are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires `.setHoles()`.
| 名称 Name |
类型 Type |
说明 Description |
result |
TypedArray
|
可选 optional
|
返回: Returns:
返回指定孔中的 (VEC3) 顶点数。 Returns the number of (VEC3) vertices in the specified hole.
| 名称 Name |
类型 Type |
说明 Description |
holeIndex |
number
|
|
返回: Returns:
返回: Returns:
- 继承自: Inherited From:
返回此多边形的外部线性环顶点位置的数组视图。如果给出“结果”参数,则顶点位置将写入该数组并返回。否则,在集合内存上返回一个 ArrayView - 对此数组的更改不会触发渲染更新,这需要“.setPositions()”。 Returns an array view of this polygon's outer linear ring vertex positions. If 'result' argument is given, vertex positions are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires `.setPositions()`.
| 名称 Name |
类型 Type |
说明 Description |
result |
TypedArray
|
可选 optional
|
返回: Returns:
返回此多边形顶点位置的数组视图。如果给出“结果”参数,则顶点位置将写入该数组并返回。否则,在集合内存上返回一个 ArrayView - 对此数组的更改不会触发渲染更新,这需要“.setPositions()”。 Returns an array view of this polygon's vertex positions. If 'result' argument is given, vertex positions are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires `.setPositions()`.
| 名称 Name |
类型 Type |
说明 Description |
result |
TypedArray
|
可选 optional
返回 {TypedArray} return {TypedArray} |
返回此多边形的三角形索引的数组视图,表示为每个三角形的三个顶点索引。如果给出“结果”参数,则三角形索引将写入该数组并返回。否则,在集合内存上返回一个 ArrayView - 对此数组的更改不会触发渲染更新,这需要`.setTriangles()`。 Returns an array view of this polygon's triangle indices, represented as three vertex indices per triangle. If 'result' argument is given, triangle indices are written to that array and returned. Otherwise, returns an ArrayView on collection memory — changes to this array will not trigger render updates, which requires `.setTriangles()`.
| 名称 Name |
类型 Type |
说明 Description |
result |
TypedArray
|
可选 optional
|
返回: Returns:
设置此多边形的孔索引,孔表示为此多边形位置数组中的单个偏移量。每个孔隐式地从该顶点偏移沿着内部线性环继续,直到到达位置数组的末尾或下一个孔偏移。 Sets this polygon's hole indices, with holes represented as a single offset into this polygon's positions array. Each hole implicitly continues along an internal linear ring from that vertex offset until reaching either the end of the positions array, or the next hole offset.
- 继承自: Inherited From:
| 名称 Name |
类型 Type |
说明 Description |
positions |
TypedArray
|
|
设置此多边形的三角形索引,表示为每个三角形的三个顶点索引。 Sets this polygon's triangle indices, represented as three vertex indices per triangle.
返回表示多边形的 JSON 可序列化对象。这种编码不节省内存,通常应该用于调试和测试。 Returns a JSON-serializable object representing the polygon. This encoding is not memory-efficient, and should generally be used for debugging and testing.
返回: Returns:
JSON 可序列化对象。 JSON-serializable object.
- 继承自: Inherited From: