class_docstr: Base class for TurntableCamera and ArcballCamera
docstr: The viewbox received a mouse event; update transform
  accordingly.
  
  Parameters
  ----------
  event : instance of Event
      The event.
docstr_tok: ["The","viewbox","received","a","mouse","event",";","update","transform","accordingly",".","Parameters","--","--","--","--","--","event",":","instance","of","Event","The","event","."]
code: def viewbox_mouse_event(self, event):
      """
      The viewbox received a mouse event; update transform
      accordingly.
  
      Parameters
      ----------
      event : instance of Event
          The event.
      """
      if event.handled or not self.interactive:
          return
  
      PerspectiveCamera.viewbox_mouse_event(self, event)
  
      if event.type == "mouse_release":
          self._event_value = None  # Reset
      elif event.type == "mouse_press":
          event.handled = True
      elif event.type == "mouse_move":
          if event.press_event is None:
              return
          if 1 in event.buttons and 2 in event.buttons:
              return
  
          modifiers = event.mouse_event.modifiers
          p1 = event.mouse_event.press_event.pos
          p2 = event.mouse_event.pos
          d = p2 - p1
  
          if 1 in event.buttons and not modifiers:
              # Rotate
              self._update_rotation(event)
  
          elif 2 in event.buttons and not modifiers:
              # Zoom
              if self._event_value is None:
                  self._event_value = (
                      self._scale_factor,
                      self._distance,
                  )
              zoomy = (1 + self.zoom_factor) ** d[1]
  
              self.scale_factor = self._event_value[0] * zoomy
              # Modify distance if its given
              if self._distance is not None:
                  self._distance = self._event_value[1] * zoomy
              self.view_changed()
  
          elif 1 in event.buttons and keys.SHIFT in modifiers:
              # Translate
              norm = np.mean(self._viewbox.size)
              if (
                  self._event_value is None
                  or len(self._event_value) == 2
              ):
                  self._event_value = self.center
              dist = (p1 - p2) / norm * self._scale_factor
              dist[1] *= -1
              # Black magic part 1: turn 2D into 3D translations
              dx, dy, dz = self._dist_to_trans(dist)
              # Black magic part 2: take up-vector and flipping into account
              ff = self._flip_factors
              up, forward, right = self._get_dim_vectors()
              dx, dy, dz = right * dx + forward * dy + up * dz
              dx, dy, dz = ff[0] * dx, ff[1] * dy, dz * ff[2]
              c = self._event_value
              self.center = c[0] + dx, c[1] + dy, c[2] + dz
  
          elif 2 in event.buttons and keys.SHIFT in modifiers:
              # Change fov
              if self._event_value is None:
                  self._event_value = self._fov
              fov = self._event_value - d[1] / 5.0
              self.fov = min(180.0, max(0.0, fov))
  
imports: from __future__ import division
  import math
  import numpy
  from .base_camera import BaseCamera
  from ...util import keys, transforms
  from ...visuals.transforms import MatrixTransform
label_desc: Use image node_id 4 for calling the Base3DRotationCamera obj's underlying member method code with example usage: obj.viewbox_mouse_event(event) without return types