#NEWLINE# def drag( self , point ) : #NEWLINE# #INDENT# 'Update current cursor window coordinates.' #NEWLINE# vnow = arcball_map_to_sphere ( point , point . _center , self . _radius ) #NEWLINE# if ( self . _axis is not None ) : #NEWLINE# #INDENT# vnow = arcball_constrain_to_axis ( vnow , self . _axis ) #NEWLINE# #UNINDENT# self . _qpre = self . _qnow #NEWLINE# t = numpy . cross ( self . _vdown , vnow ) #NEWLINE# if ( numpy . dot ( t , t ) < _EPS ) : #NEWLINE# #INDENT# self . _qnow = self . _qdown #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# q = [ t [ 0 ] , t [ 1 ] , t [ 2 ] , numpy . dot ( self . _vdown , vnow ) ] #NEWLINE# self . _qnow = quaternion_multiply ( q , self . _qdown )