点云帧的预取间隔由平均帧加载时间和当前时钟速度确定。如果中间帧无法及时加载以满足播放速度,则会跳过它们。如果帧足够小或者时钟足够慢,则不会跳过任何帧。 Point cloud frames are prefetched in intervals determined by the average frame load time and the current clock speed. If intermediate frames cannot be loaded in time to meet playback speed, they will be skipped. If frames are sufficiently small or the clock is sufficiently slow then no frames will be skipped.
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
成员 Members
readonly boundingSphere : BoundingSphere
undefined 如果没有渲染任何帧。 if no frame is being rendered.
clippingPlanes : ClippingPlaneCollection
ClippingPlaneCollection 用于选择性地禁用点云渲染。 used to selectively disable rendering the point cloud.
frameChanged : Event
时间动态点云 The time dynamic point cloud TimeDynamicPointCloud 被传递给事件监听器。 is passed to the event listener.
-
默认值: Default Value:
new Event()
示例: Example:
pointCloud.frameChanged.addEventListener(function(timeDynamicPointCloud) {
viewer.camera.viewBoundingSphere(timeDynamicPointCloud.boundingSphere);
});
frameFailed : Event
如果没有事件侦听器,错误消息将记录到控制台。 If there are no event listeners, error messages will be logged to the console.
传递给侦听器的错误对象包含两个属性: The error object passed to the listener contains two properties:
uri:失败帧的 uri。 : the uri of the failed frame.message: 错误信息。 : the error 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}`);
});
未加载或渲染的帧将被卸载以强制执行此操作。 Frames that are not being loaded or rendered are unloaded to enforce this.
如果减小该值会导致卸载图块,则将在下一帧卸载图块。 If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
-
默认值: Default Value:
256
另见: See:
modelMatrix : Matrix4
-
默认值: 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
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:
方法 Methods
一旦对象被销毁,就不应再使用;调用除 Once an object is destroyed, it should not be used; calling any function other than
isDestroyed 将导致 will result in a DeveloperError 例外。因此,分配返回值( exception. Therefore, assign the return value (undefined) 到对象,如示例中所做的那样。 ) to the object as done in the example.
抛出: Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
示例: Example:
pointCloud = pointCloud && pointCloud.destroy();
另见: See:
如果该对象被破坏,则不应使用它;调用除 If this object was destroyed, it should not be used; calling any function other than
isDestroyed 将导致 will result in a DeveloperError exception.
返回: Returns:
true 如果该物体被摧毁;否则, if this object was destroyed; otherwise, false.
另见: See:
TimeDynamicPointCloud#style 为脏,这会迫使所有点重新评估下一帧中的样式。 as dirty, which forces all points to re-evaluate the style in the next frame.
