MCPcopy Create free account
hub / github.com/Kitware/VTK / mouseMiddleMove

Function mouseMiddleMove

Interaction/Style/Testing/Python/TestStyleUser.py:84–95  ·  view source on GitHub ↗
(iRen,ren)

Source from the content-addressed store, hash-verified

82
83# Mouse middle button up/down is elevation, and left and right is azimuth
84def mouseMiddleMove(iRen,ren):
85 getMotion(iRen,ren)
86 if abs(motionD[0]) > abs(motionD[1]):
87 cam.Azimuth(-2.0*motionD[0])
88 else:
89 vup = cam.GetViewUp()
90 normalize(vup)
91 dop = cam.GetDirectionOfProjection();
92 normalize(dop)
93 theta = math.degrees( math.acos(-dot(vup,dop)) )
94 cam.Elevation(-motionD[1])
95 iRen.Render()
96
97# Right mouse button is rotate (left/right movement) and zoom in/out (up/down
98# movement)

Callers 1

mouseMoveFunction · 0.85

Calls 8

getMotionFunction · 0.85
GetViewUpMethod · 0.80
normalizeFunction · 0.70
dotFunction · 0.70
RenderMethod · 0.65
absFunction · 0.50
AzimuthMethod · 0.45
ElevationMethod · 0.45

Tested by

no test coverage detected