TimeDynamicPointCloud

new Cesium.TimeDynamicPointCloud(options)

Provides playback of time-dynamic point cloud data.

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.

参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 默认值 描述信息
clock Clock A Clock instance that is used when determining the value for the time dimension.
intervals TimeIntervalCollection A TimeIntervalCollection with its data property being an object containing a uri to a 3D Tiles Point Cloud tile and an optional transform.
show boolean true 可选 Determines if the point cloud will be shown.
modelMatrix Matrix4 Matrix4.IDENTITY 可选 A 4x4 transformation matrix that transforms the point cloud.
shadows ShadowMode ShadowMode.ENABLED 可选 Determines whether the point cloud casts or receives shadows from light sources.
maximumMemoryUsage number 256 可选 The maximum amount of memory in MB that can be used by the point cloud.
shading object 可选 Options for constructing a PointCloudShading object to control point attenuation and eye dome lighting.
style Cesium3DTileStyle 可选 The style, defined using the 3D Tiles Styling language, applied to each point in the point cloud.
clippingPlanes ClippingPlaneCollection 可选 The ClippingPlaneCollection used to selectively disable rendering the point cloud.

成员(属性)

The bounding sphere of the frame being rendered. Returns undefined if no frame is being rendered.
The ClippingPlaneCollection used to selectively disable rendering the point cloud.
The event fired to indicate that a new frame was rendered.

The time dynamic point cloud TimeDynamicPointCloud is passed to the event listener.

默认值: new Event()
使用示例:
pointCloud.frameChanged.addEventListener(function(timeDynamicPointCloud) {
    viewer.camera.viewBoundingSphere(timeDynamicPointCloud.boundingSphere);
});
The event fired to indicate that a frame failed to load. A frame may fail to load if the request for its uri fails or processing fails due to invalid content.

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: the uri of the failed frame.
  • message: the error message.
默认值: new Event()
使用示例:
pointCloud.frameFailed.addEventListener(function(error) {
    console.log(`An error occurred loading frame: ${error.uri}`);
    console.log(`Error: ${error.message}`);
});
The maximum amount of GPU memory (in MB) that may be used to cache point cloud frames.

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.

默认值: 256
参考:
A 4x4 transformation matrix that transforms the point cloud.
默认值: Matrix4.IDENTITY
Options for controlling point size based on geometric error and eye dome lighting.
Determines whether the point cloud casts or receives shadows from light sources.

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.

默认值: ShadowMode.ENABLED
Determines if the point cloud will be shown.
默认值: true
The style, defined using the 3D Tiles Styling language, applied to each point in the point cloud.

Assign undefined to remove the style, which will restore the visual appearance of the point cloud to its default when no style was applied.

使用示例:
pointCloud.style = new Cesium.Cesium3DTileStyle({
   color : {
       conditions : [
           ['${Classification} === 0', 'color("purple", 0.5)'],
           ['${Classification} === 1', 'color("red")'],
           ['true', '${COLOR}']
       ]
   },
   show : '${Classification} !== 2'
});
参考:

readonly totalMemoryUsageInBytes : number

The total amount of GPU memory in bytes used by the point cloud.
参考:

方法

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

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.
使用示例:
pointCloud = pointCloud && pointCloud.destroy();
参考:
Returns true if this object was destroyed; otherwise, false.

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.
返回值:
true if this object was destroyed; otherwise, false.
参考:
Marks the point cloud's TimeDynamicPointCloud#style as dirty, which forces all points to re-evaluate the style in the next frame.