PointerInfo

Interface PointerInfo

Holds the information about a pointer action in the viewer.

An object of this type is propagated by all the events of the ViewerInteractionAPI interface.

interface PointerInfo {
    actionTrigger: PointerActionTrigger;
    actionType: PointerActionType;
    canvasCoords: [number, number];
    nodeID: number;
    normal: [number, number, number];
    normalizedPointerCoords: [number, number];
    position: [number, number, number];
    targetNodeID: number;
    viewer: ViewerAPI;
    requestTopologyHandle(): Promise<TopologyHandle>;
}

Properties

actionTrigger: PointerActionTrigger

The trigger of the pointer action.

actionType: PointerActionType

The type of the pointer action.

canvasCoords: [number, number]

The canvas pointer coordinates in pixels.

nodeID: number

The current node ID of the pointer action depending on the expanded state of the node structure.

Note: The nodeID can be different from the targetNodeID depending on the expanded state of the instance graph. The nodeID property stores the deepest clicked node ID webvis can find that is not yet expanded whereas the targetNodeID property stores the leaf node ID at the current pointer position.

normal: [number, number, number]

The 3D normal vector at the current pointer coordinates.

normalizedPointerCoords: [number, number]

The normalized pointer coordinates between [0, 1].

position: [number, number, number]

The 3D position at the current pointer coordinates.

targetNodeID: number

The target node ID of the pointer action.

Note: The targetNodeID can be different from the nodeID depending on the expanded state of the instance graph. The targetNodeID property stores the leaf node ID at the current pointer position whereas the nodeID property stores the deepest clicked node ID webvis can find that is not yet expanded.

viewer: ViewerAPI

A reference to the related viewer.

Methods

  • Returns the handle to the topological entity at the current pointer coordinates

    Returns Promise<TopologyHandle>