DelegateInputHandler.flight constructor

DelegateInputHandler.flight(
  1. ThermionViewer viewer, {
  2. PickDelegate? pickDelegate,
  3. bool freeLook = false,
  4. double panSensitivity = 0.1,
  5. double zoomSensitivity = 0.1,
  6. double movementSensitivity = 0.1,
  7. double rotateSensitivity = 0.01,
  8. double? clampY,
  9. ThermionEntity? entity,
})

Implementation

factory DelegateInputHandler.flight(ThermionViewer viewer,
        {PickDelegate? pickDelegate,
        bool freeLook = false,
        double panSensitivity = 0.1,
        double zoomSensitivity = 0.1,
        double movementSensitivity = 0.1,
        double rotateSensitivity = 0.01,
        double? clampY,
        ThermionEntity? entity}) =>
    DelegateInputHandler(
        viewer: viewer,
        pickDelegate: pickDelegate,
        transformDelegate: FreeFlightInputHandlerDelegate(viewer,
            clampY: clampY,
            entity: entity,
            rotationSensitivity: rotateSensitivity,
            zoomSensitivity:zoomSensitivity,
            panSensitivity: panSensitivity,
            movementSensitivity: movementSensitivity),
        actions: {
          InputType.MMB_HOLD_AND_MOVE: InputAction.ROTATE,
          InputType.SCROLLWHEEL: InputAction.ZOOM,
          InputType.LMB_HOLD_AND_MOVE: InputAction.TRANSLATE,
          InputType.KEYDOWN_A: InputAction.TRANSLATE,
          InputType.KEYDOWN_W: InputAction.TRANSLATE,
          InputType.KEYDOWN_S: InputAction.TRANSLATE,
          InputType.KEYDOWN_D: InputAction.TRANSLATE,
          InputType.SCALE1: InputAction.TRANSLATE,
          InputType.SCALE2: InputAction.ZOOM,
          if (freeLook) InputType.POINTER_MOVE: InputAction.ROTATE,
        });