Skip to content

KBE3D / KBCore / Cesium / TimeDynamicPointCloud

类: TimeDynamicPointCloud

Provides playback of time-dynamic point cloud data. <p> 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. </p>

参数

Object with the following properties:

参数

A Clock instance that is used when determining the value for the time dimension.

参数

A TimeIntervalCollection with its data property being an object containing a <code>uri</code> to a 3D Tiles Point Cloud tile and an optional <code>transform</code>.

参数

Determines if the point cloud will be shown.

参数

A 4x4 transformation matrix that transforms the point cloud.

参数

Determines whether the point cloud casts or receives shadows from light sources.

参数

The maximum amount of memory in MB that can be used by the point cloud.

参数

Options for constructing a PointCloudShading object to control point attenuation and eye dome lighting.

参数

The style, defined using the 3D Tiles Styling language

, applied to each point in the point cloud.

参数

The ClippingPlaneCollection used to selectively disable rendering the point cloud.

属性

show

show: boolean

Determines if the point cloud will be shown.


modelMatrix

modelMatrix: Matrix4

A 4x4 transformation matrix that transforms the point cloud.


shadows

shadows: ShadowMode

Determines whether the point cloud casts or receives shadows from light sources. <p> 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. </p> <p> Shadows are rendered only when Viewer#shadows is <code>true</code>. </p>


maximumMemoryUsage

maximumMemoryUsage: number

The maximum amount of GPU memory (in MB) that may be used to cache point cloud frames. <p> Frames that are not being loaded or rendered are unloaded to enforce this. </p> <p> If decreasing this value results in unloading tiles, the tiles are unloaded the next frame. </p>


shading

shading: PointCloudShading

Options for controlling point size based on geometric error and eye dome lighting.


style

style: Cesium3DTileStyle

The style, defined using the 3D Tiles Styling language

, applied to each point in the point cloud. <p> Assign <code>undefined</code> to remove the style, which will restore the visual appearance of the point cloud to its default when no style was applied. </p>

示例

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

frameFailed

frameFailed: Event

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. <p> If there are no event listeners, error messages will be logged to the console. </p> <p> The error object passed to the listener contains two properties: <ul> <li><code>uri</code>: the uri of the failed frame.</li> <li><code>message</code>: the error message.</li> </ul>

示例

ts
pointCloud.frameFailed.addEventListener(function(error) {
    console.log(`An error occurred loading frame: ${error.uri}`);
    console.log(`Error: ${error.message}`);
});

frameChanged

frameChanged: Event

The event fired to indicate that a new frame was rendered. <p> The time dynamic point cloud TimeDynamicPointCloud is passed to the event listener. </p>

示例

ts
pointCloud.frameChanged.addEventListener(function(timeDynamicPointCloud) {
    viewer.camera.viewBoundingSphere(timeDynamicPointCloud.boundingSphere);
});

clippingPlanes

clippingPlanes: ClippingPlaneCollection

The ClippingPlaneCollection used to selectively disable rendering the point cloud.


totalMemoryUsageInBytes

readonly totalMemoryUsageInBytes: number

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


boundingSphere

readonly boundingSphere: BoundingSphere

The bounding sphere of the frame being rendered. Returns <code>undefined</code> if no frame is being rendered.

方法

makeStyleDirty()

makeStyleDirty(): void

Marks the point cloud's TimeDynamicPointCloud#style as dirty, which forces all points to re-evaluate the style in the next frame.

返回

void


isDestroyed()

isDestroyed(): boolean

Returns true if this object was destroyed; otherwise, false. <br /><br /> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception.

返回

boolean

true if this object was destroyed; otherwise, false.


destroy()

destroy(): void

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. <br /><br /> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example.

返回

void

示例

ts
pointCloud = pointCloud && pointCloud.destroy();

构造函数

构造函数

new TimeDynamicPointCloud(options: { clock: Clock; intervals: TimeIntervalCollection; show?: boolean; modelMatrix?: Matrix4; shadows?: ShadowMode; maximumMemoryUsage?: number; shading?: any; style?: Cesium3DTileStyle; clippingPlanes?: ClippingPlaneCollection; }): TimeDynamicPointCloud

参数

options
clock

Clock

intervals

TimeIntervalCollection

show?

boolean

modelMatrix?

Matrix4

shadows?

ShadowMode

maximumMemoryUsage?

number

shading?

any

style?

Cesium3DTileStyle

clippingPlanes?

ClippingPlaneCollection

返回

TimeDynamicPointCloud

KBE3D @3.0.0 Copyright © 2024-present KBE3D