Class ClippingObjectManager

ClippingObjectManager, a singleton Class for managing [ClippingObjects]ClippingObject. The manager takes care to only apply a single [ClippingObject]ClippingObject to a target, such as a Cesium3DTileset or Entity. The manager ensures, [ClippingObjects]ClippingObject which can be manipulated by the user take precedence over other [ClippingObjects]ClippingObject. [ClippingObjects]ClippingObject with the same target get overwritten in the order they where added to the manager. Exclusive [ClippingObjects]ClippingObject are always applied last, even if a default [ClippingObject]ClippingObject is added after.

Accessors

Constructors

Methods

  • Add a default [ClippingObject] to the manager. The order in which objects are added, determines their priority. In case two objects have the same target, the one added last is applied. Should the last added object be removed, the first one is re-applied. An object may not be added if is already part of the manager, use [hasClippingObject] to test.

    Parameters

    Returns void

  • Clears the exclusive set of [ClippingObject]. If called with the silent flag, the removed callback is not called (eg. when removing exclusive clipping objects from the same context).

    Parameters

    • Optionalsilent: boolean

    Returns void

  • Sets an Array of [ClippingObjects] to be added to the managers context. Exclusive objects are intended for [ClippingObjects] which can be directly manipulated by the user. They are always applied last and will overwrite any managed default [ClippingObject] with the same targets. The manager will only allow a single context (eg. one widget/plugin) for exclusive objects. Should the current context be switched or cleared, the provided callback is called to inform the setting context of its removal.

    Parameters

    • clippingObjects: ClippingObject[]
    • removedCb: (() => void)
        • (): void
        • Returns void

    Returns void

    ClippingObjects is already managed

Properties

initialized: boolean = false