Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
See:
Extends
Members
与原始类型相关的功能ID;不要求唯一。
- Inherited From:
到达位置数组的末尾或下一个孔洞偏移量。
该多边形外线性环中顶点的数量。
VEC3 元素的数量。
集合位置数组中的偏移量到多边形外环的第一个顶点。
线性环,VEC3 元素的数量。
用户定义的拾取对象,如有。当原始对象被渲染后,
拾取对象便无法再被更改。
- Inherited From:
表示原始类型是否显示的布尔(0或1)标志。
- Inherited From:
Count of triangles in this polygon, number of VEC3 elements.
Count of positions (vertices) in this polygon, including both outer ring and
internal rings (holes), number of VEC3 elements.
Methods
static Cesium.BufferPolygon.clone(polygon, result) → BufferPolygon
将数据从源多边形复制到结果多边形。如果结果多边形不是
新的(集合中的最后一个多边形),则源和结果多边形必须具有相同的顶点数、洞数和三角形数。
must have the same vertex counts, hole counts, and triangle counts.
| Name | Type | Description |
|---|---|---|
polygon |
BufferPolygon | |
result |
BufferPolygon |
Returns:
在集合三角形数组中指向多边形第一个三角形的偏移量,
VEC3 元素的数量。
该多边形中三角形的数量,VEC3 元素的数量。
memory — changes to this array will not trigger render updates, which
requires `.setPositions()`.
| Name | Type | Description |
|---|---|---|
holeIndex |
number | |
result |
TypedArray | optional return {TypedArray} |
如果提供 ‘result’ 参数,则将孔洞索引写入该数组并返回。否则,返回集合内存中的 ArrayView —— 对该数组的修改不会触发渲染更新,需使用 `.setHoles()`。
设置该多边形的孔洞索引,每个孔洞表示为该多边形位置数组中的一个偏移量。每个孔洞隐含地
从该顶点偏移量开始沿着内部线性环继续,直到
到达位置数组的末尾或下一个孔洞偏移量。
如果提供 ‘result’ 参数,则将孔洞索引写入该数组并返回。否则,返回集合内存中的 ArrayView —— 对该数组的修改不会触发渲染更新,需使用 `.setHoles()`。
返回指定孔洞中 (VEC3) 顶点的数量。
返回指定孔洞内线性环顶点位置的数组视图。如果提供 ‘result’ 参数,则将顶点位置写入该数组并返回。否则,返回集合内存中的 ArrayView —— 对该数组的修改不会触发渲染更新,需使用 `.setPositions()`。
| Name | Type | Description |
|---|---|---|
result |
TypedArray | optional |
Returns:
否则,返回集合内存中的 ArrayView。
| Name | Type | Description |
|---|---|---|
holeIndex |
number |
Returns:
getMaterial(result) → BufferPrimitiveMaterial
| Name | Type | Description |
|---|---|---|
result |
BufferPrimitiveMaterial |
Returns:
- Inherited From:
返回该多边形外线性环顶点位置的数组视图。
如果提供 ‘result’ 参数,则将顶点位置写入该数组并返回。否则,返回集合内存中的 ArrayView —— 对该数组的修改不会触发渲染更新,需使用 `.setPositions()`。
在集合孔洞数组中指向多边形第一个孔洞的偏移量,以及
整数元素的数量。
该多边形中孔洞的索引数量。
| Name | Type | Description |
|---|---|---|
result |
TypedArray | optional |
Returns:
返回该多边形顶点位置的数组视图。如果给出 'result' 参数,
顶点位置将写入该数组并返回。
否则,返回集合内存上的 ArrayView — 对该数组的更改不会触发渲染更新,这需要使用 `.setPositions()`。
返回 {TypedArray}
| Name | Type | Description |
|---|---|---|
result |
TypedArray | optional return {TypedArray} |
返回一个该多边形三角形索引的数组视图,格式为:
每个三角形包含三个顶点索引。
如果提供 ‘result’ 参数,则将三角形索引写入该数组并返回。
否则,在集合内存中返回一个 ArrayView ——
对该数组的修改不会触发渲染更新,这需要调用
`.setTriangles()`。
| Name | Type | Description |
|---|---|---|
result |
TypedArray | optional |
Returns:
返回 {TypedArray}。
访问顶点位置的内部辅助函数。‘vertexOffset’ 参数
相对于多边形顶点块的起始位置,0 表示
多边形中的第一个顶点。如果提供 ‘result’ 参数,则将请求范围内的顶点写入结果数组并返回。
| Name | Type | Description |
|---|---|---|
holes |
TypedArray |
| Name | Type | Description |
|---|---|---|
material |
BufferPrimitiveMaterial |
- Inherited From:
| Name | Type | Description |
|---|---|---|
positions |
TypedArray |
设置该多边形的三角形索引,格式为每个三角形三个顶点索引。
| Name | Type | Description |
|---|---|---|
indices |
TypedArray |
返回一个可序列化为 JSON 的对象来表示该多边形。这种编码方式
不节省内存,通常适用于调试和
测试。
Returns:
JSON-serializable object.
- Inherited From:
