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.

Hierarchy

  • ClippingObjectManager

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

    • Optional silent: 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

    Throws

    ClippingObjects is already managed

Properties

_activeMap: null | VcsMap<VisualisationType> = null
_defaultClippingObjects: Set<ClippingObject> = ...
_dirty: boolean = false
_exclusiveClippingObjects: null | ClippingObject[] = null
_exclusiveRemovedCb: null | (() => void) = null

Type declaration

    • (): void
    • Returns void

_layerChangedListener: (() => void)

Type declaration

    • (): void
    • Returns void

_layerCollection: LayerCollection
_listenersMap: Map<ClippingObject, (() => void)[]> = ...
_targetsMap: Map<ClippingTarget, ClippingObject> = ...
_updateSuspended: boolean = false
initialized: boolean = false

Generated using TypeDoc