Viewer - Interaction
    Preparing search index...

    Class DragManager

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get effectMaterial(): IMaterialAbstractData | undefined

      The effect material that is applied to the node once the effect (selection, hovering or dragging) is active. If no effect material is applied, the effect will not be changed. (Note that this is only for backwards compatibility, use interactionEffect instead)

      Returns IMaterialAbstractData | undefined

    • set effectMaterial(value: IMaterialAbstractData | undefined): void

      The effect material that is applied to the node once the effect (selection, hovering or dragging) is active. If no effect material is applied, the effect will not be changed. (Note that this is only for backwards compatibility, use interactionEffect instead)

      Parameters

      • value: IMaterialAbstractData | undefined

      Returns void

    • get gatheredGroupedNodes(): { [key: string]: ITreeNode[] }

      Returns { [key: string]: ITreeNode[] }

    • get id(): string

      The unique id of the interaction manager.

      Returns string

    • get interactionEffect(): IInteractionEffect | undefined

      The effect that is applied to the node once the effect (selection, hovering or dragging) is active. If no interaction effect is applied, the effect will not be changed.

      Returns IInteractionEffect | undefined

    • set interactionEffect(value: IInteractionEffect | undefined): void

      The effect that is applied to the node once the effect (selection, hovering or dragging) is active. If no interaction effect is applied, the effect will not be changed.

      Parameters

      • value: IInteractionEffect | undefined

      Returns void

    • get viewport(): IViewportApi | undefined

      The reference to the viewer.

      Returns IViewportApi | undefined

    • set viewport(value: IViewportApi | undefined): void

      The reference to the viewer.

      Parameters

      Returns void

    Methods

    • Add a new drag constraint. Returns a token that is used for removing the drag constraint via removeRestriction.

      Parameters

      • constraint: IDragConstraint

      Returns string | undefined

      This method is deprecated. Please use addRestriction instead.

    • For onDown events (pointerdown) this method is called. The pointer event is already translated into a ray. An array of intersections is provided that is the result of an intersection with the ray and the scene with the applied filters. (Note that filters of other InteractionManagers may also apply, therefore you need to sanitize the intersections in that case)

      Parameters

      Returns void

    • For onEnd events (pointerup, pointerout) this method is called. The pointer event is already translated into a ray. An array of intersections is provided that is the result of an intersection with the ray and the scene with the applied filters. (Note that filters of other InteractionManagers may also apply, therefore you need to sanitize the intersections in that case)

      Parameters

      Returns void

    • For onKeyDown events this method is called.

      Parameters

      • event: KeyboardEvent
      • pointerInCanvas: boolean

      Returns void

    • For onKeyUp events this method is called.

      Parameters

      • event: KeyboardEvent
      • pointerInCanvas: boolean

      Returns void

    • For onMove events (pointermove) this method is called. The pointer event is already translated into a ray. An array of intersections is provided that is the result of an intersection with the ray and the scene with the applied filters. (Note that filters of other InteractionManagers may also apply, therefore you need to sanitize the intersections in that case)

      Parameters

      Returns void

    • Remove the drag constraint that was added via removeRestriction.

      Parameters

      • token: string

      Returns boolean

      This method is deprecated. Please use removeRestriction instead.

    • Remove the node as the currently used drag node.

      Parameters

      • Optionalevent: PointerEvent
      • Optionalray: IRay

      Returns void

    • Removes the restriction with the given token.

      Parameters

      • token: string

      Returns boolean

    • Removes all restrictions.

      Returns false | undefined

    • Set the current dragged node. This will serve as the start of the drag event. This function is also called internally at onDown events.

      Parameters

      • node: ITreeNode
      • OptionalgeometryData: IGeometryData
      • distance: number = 0
      • intersectionPoint: vec3 = ...
      • Optionalevent: PointerEvent
      • ray: IRay = ...

      Returns void