Changeset 2223 for trunk/gui/scripts


Ignore:
Timestamp:
Apr 22, 2011, 6:07:58 PM (14 years ago)
Author:
ldelgass
Message:

Enable panning for testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkviewer2.tcl

    r2220 r2223  
    935935
    936936itcl::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"
    944946}
    945947
     
    985987                set q [$_arcball rotate $x $y $_click(x) $_click(y)]
    986988                SendCmd "camera orient $q"
    987                 #SendCmd "camera orient $q"
    988989                puts stderr "rotate q=$q"
    989990                puts stderr "arcball matrix=[$_arcball matrix]"
     
    10191020            set w [winfo width $itk_component(view)]
    10201021            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)]
    10231024            set _view(pan-x) [expr $_view(pan-x) + $x]
    10241025            set _view(pan-y) [expr $_view(pan-y) + $y]
Note: See TracChangeset for help on using the changeset viewer.