提供时间动态点云数据的播放功能。
点云帧按照由平均帧加载时间和当前时钟速度决定的间隔进行预取。 如果中间帧无法及时加载以满足播放速度,它们将被跳过。如果帧足够 小或时钟足够慢,则不会跳过任何帧。
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Object with the following properties:
|
Members
readonly boundingSphere : BoundingSphere
正在渲染的帧的包围球。如果没有正在渲染的帧,则返回
undefined。
clippingPlanes : ClippingPlaneCollection
用于选择性禁用点云渲染的
ClippingPlaneCollection。
frameChanged : Event
指示已渲染新帧时触发的事件。
时间动态点云 TimeDynamicPointCloud 会传递给事件监听器。
-
Default Value:
new Event()
Example:
pointCloud.frameChanged.addEventListener(function(timeDynamicPointCloud) {
viewer.camera.viewBoundingSphere(timeDynamicPointCloud.boundingSphere);
});
frameFailed : Event
指示某帧加载失败而触发的事件。如果对其 uri 的请求失败,或由于内容无效导致处理失败,
该帧可能无法加载。
如果没有事件监听器,错误消息将被记录到控制台。
传递给监听器的错误对象包含两个属性:
uri:失败帧的 uri。message:错误消息。
-
Default Value:
new Event()
Example:
pointCloud.frameFailed.addEventListener(function(error) {
console.log(`An error occurred loading frame: ${error.uri}`);
console.log(`Error: ${error.message}`);
});
可用于缓存点云帧的最大 GPU 内存量(以 MB 为单位)。
未处于加载或渲染状态的帧将被卸载以强制执行此限制。
如果减小此值导致瓦片被卸载,这些瓦片将在下一帧被卸载。
-
Default Value:
256
See:
modelMatrix : Matrix4
变换该点云的 4x4 变换矩阵。
-
Default Value:
Matrix4.IDENTITY
基于几何误差和眼睛穹顶光照控制点大小的选项。
确定该点云是否投射或接收来自光源的阴影。
Enabling shadows has a performance impact. A point cloud that casts shadows must be rendered twice, once from the camera and again from the light's point of view.
Shadows are rendered only when Viewer#shadows is true.
-
Default Value:
ShadowMode.ENABLED
确定是否显示该点云。
-
Default Value:
true
应用于点云中每个点的样式,使用 3D Tiles 样式语言 定义。
Assign undefined to remove the style, which will restore the visual
appearance of the point cloud to its default when no style was applied.
Example:
pointCloud.style = new Cesium.Cesium3DTileStyle({
color : {
conditions : [
['${Classification} === 0', 'color("purple", 0.5)'],
['${Classification} === 1', 'color("red")'],
['true', '${COLOR}']
]
},
show : '${Classification} !== 2'
});
See:
该点云使用的 GPU 内存总量(以字节为单位)。
Methods
销毁此对象持有的 WebGL 资源。销毁对象可以实现对 WebGL 资源的确定性
释放,而不是依赖垃圾回收器来销毁此对象。
对象一旦被销毁就不应再使用;调用除
对象一旦被销毁就不应再使用;调用除
isDestroyed 以外的任何函数都将导致 DeveloperError 异常。因此,
应像示例中那样将返回值(undefined)赋给该对象。
Throws:
-
DeveloperError :此对象已被销毁,即已调用 destroy()。
Example:
pointCloud = pointCloud && pointCloud.destroy();
See:
Returns:
true 表示此对象已被销毁,否则为 false。
将点云的
TimeDynamicPointCloud#style 标记为脏,从而强制所有
点在下一帧重新评估样式。
