1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/v3d/manipulator/drag_pan_zoom
sshutina 3421323164 0032879: Visualization, AIS_ViewController - define separate gesture mappings for dragging
Fixed problem of usage of objects dragging during zoom and pan
Added new draw command to change gesture for muse buttons
Added test
2023-07-18 16:20:12 +01:00

44 lines
1.2 KiB
Plaintext

puts "=============================================="
puts "0032879: Visualization - Separate pan/zoom and move the object behavior in AIS_ViewController"
puts "=============================================="
puts ""
pload MODELING VISUALIZATION
vinit View1
pcylinder c1 5 10
vdisplay c1
vsetdispmode 1
vmanipulator m -attach c1 -adjustPosition 1 -adjustSize 0 -enableModes 1 -size 40
vfit
# note: mouse events cannot be emulated here, so the original bug cannot be reproduced by this test case
# pan for the left mouse button
vchangemousegesture -button left -gesture pan
set mouse_pick {204 194}
set mouse_drag {369 35}
vmoveto {*}$mouse_pick
vselect {*}$mouse_pick
vmanipulator m -startTransform {*}$mouse_pick
vmanipulator m -transform {*}$mouse_drag
vmanipulator m -stopTransform
vselect 0 0
vdump $imagedir/${casename}_pan.png
# zoom for the left mouse button
vchangemousegesture -button left -gesture zoom
set mouse_pick {206 32}
set mouse_drag {365 330}
vmoveto {*}$mouse_pick
vselect {*}$mouse_pick
vmanipulator m -startTransform {*}$mouse_pick
vmanipulator m -transform {*}$mouse_drag
vmanipulator m -stopTransform
vselect 0 0
vdump $imagedir/${casename}_zoom.png