docstr: Mixin class providing functionality for GLViewWidget
  
  ================ ==============================================================
  **Arguments:**
  rotationMethod   (str): Mechanism to drive the rotation method, options are
                   'euler' and 'quaternion'. Defaults to 'euler'.
  ================ ==============================================================
docstr_tok: ["Mixin","class","providing","functionality","for","GLViewWidget","================","==============================================================","*","*","Arguments",":","*","*","rotationMethod","(","str",")",":","Mechanism","to","drive","the","rotation","method",",","options","are","'euler","'","and","'quaternion","'",".","Defaults","to","'euler","'",".","================","=============================================================="]
code: def __init__(self, *args, rotationMethod="euler", **kwargs):
      """
      Mixin class providing functionality for GLViewWidget
  
      ================ ==============================================================
      **Arguments:**
      rotationMethod   (str): Mechanism to drive the rotation method, options are
                       'euler' and 'quaternion'. Defaults to 'euler'.
      ================ ==============================================================
      """
      super().__init__(*args, **kwargs)
  
      if rotationMethod not in ["euler", "quaternion"]:
          raise ValueError(
              "Rotation method should be either 'euler' or 'quaternion'"
          )
  
      self.opts = {
          "center": Vector(
              0, 0, 0
          ),  ## will always appear at the center of the widget
          "rotation": QtGui.QQuaternion(
              1, 0, 0, 0
          ),  ## camera rotation (quaternion:wxyz)
          "distance": 10.0,  ## distance of camera from center
          "fov": 60,  ## horizontal field of view in degrees
          "elevation": 30,  ## camera's angle of elevation in degrees
          "azimuth": 45,  ## camera's azimuthal angle in degrees
          ## (rotation around z-axis 0 points along x-axis)
          "viewport": None,  ## glViewport params; None == whole widget
          ## note that 'viewport' is in device pixels
          "rotationMethod": rotationMethod,
      }
      self.reset()
      self.items = []
  
      self.noRepeatKeys = [
          QtCore.Qt.Key.Key_Right,
          QtCore.Qt.Key.Key_Left,
          QtCore.Qt.Key.Key_Up,
          QtCore.Qt.Key.Key_Down,
          QtCore.Qt.Key.Key_PageUp,
          QtCore.Qt.Key.Key_PageDown,
      ]
      self.keysPressed = {}
      self.keyTimer = QtCore.QTimer()
      self.keyTimer.timeout.connect(self.evalKeyState)
  
imports: from OpenGL.GL import *
  import OpenGL.GL.framebufferobjects
  from math import cos, radians, sin, tan
  import numpy
  from ..None import Vector
  from ..None import functions
  from ..None import getConfigOption
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 1 to create a new GLViewMixin object  with example: obj = GLViewMixin()