Changeset 2223 for trunk/gui/scripts
- Timestamp:
- Apr 22, 2011, 6:07:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkviewer2.tcl
r2220 r2223 935 935 936 936 itcl::body Rappture::VtkViewer2::PanCamera {} { 937 set w [winfo width $itk_component(view)] 938 set h [winfo height $itk_component(view)] 939 set x [expr ($_view(pan-x)) / $w] 940 set y [expr ($_view(pan-y)) / $h] 941 set x [expr $x * $_limits(xmax) - $_limits(xmin)] 942 set y [expr $y * $_limits(ymax) - $_limits(ymin)] 943 #SendCmd "camera pan $x $y" 937 # set w [winfo width $itk_component(view)] 938 # set h [winfo height $itk_component(view)] 939 # set x [expr ($_view(pan-x)) / $w] 940 # set y [expr ($_view(pan-y)) / $h] 941 # set x [expr $x * $_limits(xmax) - $_limits(xmin)] 942 # set y [expr $y * $_limits(ymax) - $_limits(ymin)] 943 set x $_view(pan-x) 944 set y $_view(pan-y) 945 SendCmd "camera pan $x $y" 944 946 } 945 947 … … 985 987 set q [$_arcball rotate $x $y $_click(x) $_click(y)] 986 988 SendCmd "camera orient $q" 987 #SendCmd "camera orient $q"988 989 puts stderr "rotate q=$q" 989 990 puts stderr "arcball matrix=[$_arcball matrix]" … … 1019 1020 set w [winfo width $itk_component(view)] 1020 1021 set h [winfo height $itk_component(view)] 1021 set x [expr (($w - $x) / double($w))]1022 set y [expr (($h - $y) / double($h))]1022 set x [expr $x / double($w)] 1023 set y [expr $y / double($h)] 1023 1024 set _view(pan-x) [expr $_view(pan-x) + $x] 1024 1025 set _view(pan-y) [expr $_view(pan-y) + $y]
Note: See TracChangeset
for help on using the changeset viewer.