Changeset 3517 for trunk/gui/scripts/vtkstreamlinesviewer.tcl
- Timestamp:
- Mar 17, 2013, 9:46:35 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r3482 r3517 107 107 private method SetObjectStyle { dataobj comp } 108 108 private method Slice {option args} 109 private method SetOrientation { side } 109 110 110 111 private variable _arcball "" … … 1868 1869 $inner configure -borderwidth 4 1869 1870 1871 label $inner.view_l -text "view" -font "Arial 9" 1872 set f [frame $inner.view] 1873 foreach side { front back left right top bottom } { 1874 button $f.$side -image [Rappture::icon view$side] \ 1875 -command [itcl::code $this SetOrientation $side] 1876 Rappture::Tooltip::for $f.$side "Change the view to $side" 1877 pack $f.$side -side left 1878 } 1879 1880 blt::table $inner \ 1881 0,0 $inner.view_l -anchor e -pady 2 \ 1882 0,1 $inner.view -anchor w -pady 2 1883 1870 1884 set labels { qx qy qz qw xpan ypan zoom } 1871 set row 01885 set row 1 1872 1886 foreach tag $labels { 1873 1887 label $inner.${tag}label -text $tag -font "Arial 9" … … 1892 1906 incr row 1893 1907 1894 blt::table configure $inner c 0 c1-resize none1908 blt::table configure $inner c* r* -resize none 1895 1909 blt::table configure $inner c2 -resize expand 1896 1910 blt::table configure $inner r$row -resize expand … … 2448 2462 } 2449 2463 2464 itcl::body Rappture::VtkStreamlinesViewer::SetOrientation { side } { 2465 array set positions { 2466 front "1 0 0 0" 2467 back "0 0 1 0" 2468 left "0.707107 0 -0.707107 0" 2469 right "0.707107 0 0.707107 0" 2470 top "0.707107 -0.707107 0 0" 2471 bottom "0.707107 0.707107 0 0" 2472 } 2473 foreach name { qw qx qy qz } value $positions($side) { 2474 set _view($name) $value 2475 } 2476 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 2477 $_arcball quaternion $q 2478 SendCmd "camera orient $q" 2479 } 2480
Note: See TracChangeset
for help on using the changeset viewer.