parameters: (self, state)
docstring: Virtual trackball rotation of widget
docstring_summary: Virtual trackball rotation of widget
docstring_tokens: Virtual trackball rotation of widget
function: def rotate2D(self, state):
          """ Virtual trackball rotation of widget """
          # Reset init flag in case we switch to another mode
          self.fHitInit = 1
          # Reset scaling init flag
          self.fScaleInit = 1
          tumbleRate = 360
          # If moving outside of center, ignore motion perpendicular to edge
          if ((state.constrainedDir == 'y') and (abs(SEditor.dr.mouseX) > 0.9)):
              deltaX = 0
              deltaY = SEditor.dr.mouseDeltaY
          elif ((state.constrainedDir == 'x') and (abs(SEditor.dr.mouseY) > 0.9)):
              deltaX = SEditor.dr.mouseDeltaX
              deltaY = 0
          else:
              deltaX = SEditor.dr.mouseDeltaX
              deltaY = SEditor.dr.mouseDeltaY
          # Mouse motion edge to edge of display region results in one full turn
          relHpr(SEditor.widget, SEditor.camera, deltaX * tumbleRate,
                 -deltaY * tumbleRate, 0)
function_tokens: def rotate2D ( self , state ) : # Reset init flag in case we switch to another mode self . fHitInit = 1 # Reset scaling init flag self . fScaleInit = 1 tumbleRate = 360 # If moving outside of center, ignore motion perpendicular to edge if ( ( state . constrainedDir == 'y' ) and ( abs ( SEditor . dr . mouseX ) > 0.9 ) ) : deltaX = 0 deltaY = SEditor . dr . mouseDeltaY elif ( ( state . constrainedDir == 'x' ) and ( abs ( SEditor . dr . mouseY ) > 0.9 ) ) : deltaX = SEditor . dr . mouseDeltaX deltaY = 0 else : deltaX = SEditor . dr . mouseDeltaX deltaY = SEditor . dr . mouseDeltaY # Mouse motion edge to edge of display region results in one full turn relHpr ( SEditor . widget , SEditor . camera , deltaX * tumbleRate , - deltaY * tumbleRate , 0 )