(iRen,ren)
| 82 | |
| 83 | # Mouse middle button up/down is elevation, and left and right is azimuth |
| 84 | def 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) |