| /** | /** | ||||
| * | * | ||||
| * Gets the mouse information for the mouse event | |||||
| * @param position | |||||
| * @private | |||||
| * | |||||
| * @param {*} position | |||||
| * @returns | |||||
| */ | */ | ||||
| _getMouseInfo(position) { | |||||
| _getMousePosition(position) { | |||||
| let scene = this._viewer.scene | let scene = this._viewer.scene | ||||
| let target = scene.pick(position) | |||||
| let cartesian = undefined | let cartesian = undefined | ||||
| let surfaceCartesian = undefined | let surfaceCartesian = undefined | ||||
| let wgs84Position = undefined | let wgs84Position = undefined | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return { | return { | ||||
| target: target, | |||||
| windowPosition: position, | windowPosition: position, | ||||
| position: cartesian, | position: cartesian, | ||||
| wgs84Position: wgs84Position, | wgs84Position: wgs84Position, | ||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * | |||||
| * Gets the mouse information for the mouse event | |||||
| * @param position | |||||
| * @private | |||||
| * | |||||
| */ | |||||
| _getMouseInfo(position) { | |||||
| let scene = this._viewer.scene | |||||
| return { | |||||
| ...this._getMousePosition(position), | |||||
| target: scene.pick(position), | |||||
| } | |||||
| } | |||||
| /** | /** | ||||
| * Gets the drill pick overlays for the mouse event | * Gets the drill pick overlays for the mouse event | ||||
| * @param position | * @param position | ||||
| ? 'pointer' | ? 'pointer' | ||||
| : 'default' | : 'default' | ||||
| this._raiseEvent(MouseEventType.MOUSE_MOVE, mouseInfo) | this._raiseEvent(MouseEventType.MOUSE_MOVE, mouseInfo) | ||||
| // add event for overlay | // add event for overlay | ||||
| if (this._enableMouseOver) { | if (this._enableMouseOver) { | ||||
| if ( | if ( | ||||
| } | } | ||||
| } | } | ||||
| } else { | } else { | ||||
| this._raiseEvent(MouseEventType.MOUSE_MOVE, { movement }) | |||||
| this._raiseEvent( | |||||
| MouseEventType.MOUSE_MOVE, | |||||
| this._getMousePosition(movement.endPosition) | |||||
| ) | |||||
| } | } | ||||
| } | } | ||||