docstr: Moves the center (look-at) position while holding the camera in place. 
  
  ==============  =======================================================
  **Arguments:**
  *dx*            Distance to pan in x direction
  *dy*            Distance to pan in y direction
  *dz*            Distance to pan in z direction
  *relative*      String that determines the direction of dx,dy,dz. 
                  If "global", then the global coordinate system is used.
                  If "view", then the z axis is aligned with the view
                  direction, and x and y axes are in the plane of the
                  view: +x points right, +y points up. 
                  If "view-upright", then x is in the global xy plane and
                  points to the right side of the view, y is in the
                  global xy plane and orthogonal to x, and z points in
                  the global z direction.
  ==============  =======================================================
  
  Distances are scaled roughly such that a value of 1.0 moves
  by one pixel on screen.
docstr_tok: ["Moves","the","center","(","look-at",")","position","while","holding","the","camera","in","place",".","==============","=======================================================","*","*","Arguments",":","*","*","*","dx","*","Distance","to","pan","in","x","direction","*","dy","*","Distance","to","pan","in","y","direction","*","dz","*","Distance","to","pan","in","z","direction","*","relative","*","String","that","determines","the","direction","of","dx",",","dy",",","dz",".","If","``","global","''",",","then","the","global","coordinate","system","is","used",".","If","``","view","''",",","then","the","z","axis","is","aligned","with","the","view","direction",",","and","x","and","y","axes","are","in","the","plane","of","the","view",":","+x","points","right",",","+y","points","up",".","If","``","view-upright","''",",","then","x","is","in","the","global","xy","plane","and","points","to","the","right","side","of","the","view",",","y","is","in","the","global","xy","plane","and","orthogonal","to","x",",","and","z","points","in","the","global","z","direction",".","==============","=======================================================","Distances","are","scaled","roughly","such","that","a","value","of","1.0","moves","by","one","pixel","on","screen","."]
code: def pan(self, dx, dy, dz, relative="global"):
      """
      Moves the center (look-at) position while holding the camera in place.
  
      ==============  =======================================================
      **Arguments:**
      *dx*            Distance to pan in x direction
      *dy*            Distance to pan in y direction
      *dz*            Distance to pan in z direction
      *relative*      String that determines the direction of dx,dy,dz.
                      If "global", then the global coordinate system is used.
                      If "view", then the z axis is aligned with the view
                      direction, and x and y axes are in the plane of the
                      view: +x points right, +y points up.
                      If "view-upright", then x is in the global xy plane and
                      points to the right side of the view, y is in the
                      global xy plane and orthogonal to x, and z points in
                      the global z direction.
      ==============  =======================================================
  
      Distances are scaled roughly such that a value of 1.0 moves
      by one pixel on screen.
      """
      if relative == "global":
          self.opts["center"] += QtGui.QVector3D(dx, dy, dz)
      elif relative == "view-upright":
          cPos = self.cameraPosition()
          cVec = self.opts["center"] - cPos
          dist = cVec.length()  ## distance from camera to center
          xDist = (
              dist * 2.0 * tan(0.5 * radians(self.opts["fov"]))
          )  ## approx. width of view at distance of center point
          xScale = xDist / self.width()
          zVec = QtGui.QVector3D(0, 0, 1)
          xVec = QtGui.QVector3D.crossProduct(zVec, cVec).normalized()
          yVec = QtGui.QVector3D.crossProduct(xVec, zVec).normalized()
          self.opts["center"] = (
              self.opts["center"]
              + xVec * xScale * dx
              + yVec * xScale * dy
              + zVec * xScale * dz
          )
      elif relative == "view":
          # pan in plane of camera
  
          if self.opts["rotationMethod"] == "quaternion":
              # obtain basis vectors
              qc = self.opts["rotation"].conjugated()
              xv = qc.rotatedVector(Vector(1, 0, 0))
              yv = qc.rotatedVector(Vector(0, 1, 0))
              zv = qc.rotatedVector(Vector(0, 0, 1))
  
              scale_factor = self.pixelSize(self.opts["center"])
  
              # apply translation
              self.opts["center"] += scale_factor * (
                  xv * -dx + yv * dy + zv * dz
              )
          else:  # use default euler rotation method
              elev = radians(self.opts["elevation"])
              azim = radians(self.opts["azimuth"])
              fov = radians(self.opts["fov"])
              dist = (
                  self.opts["center"] - self.cameraPosition()
              ).length()
              fov_factor = tan(fov / 2) * 2
              scale_factor = dist * fov_factor / self.width()
              z = scale_factor * cos(elev) * dy
              x = scale_factor * (
                  sin(azim) * dx - sin(elev) * cos(azim) * dy
              )
              y = scale_factor * (
                  cos(azim) * dx + sin(elev) * sin(azim) * dy
              )
              self.opts["center"] += QtGui.QVector3D(x, -y, z)
      else:
          raise ValueError(
              "relative argument must be global, view, or view-upright"
          )
  
      self.update()
  
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 23 for calling the GLViewMixin obj's underlying member method code with example usage: obj.pan(dx, dy, dz, relative) without return types