Changeset 3517 for trunk/gui/scripts/vtkheightmapviewer.tcl
- Timestamp:
- Mar 17, 2013, 9:46:35 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r3514 r3517 106 106 private method GetHeightmapScale {} 107 107 private method ResetAxes {} 108 private method SetOrientation { side } 108 109 109 110 private variable _arcball "" … … 1766 1767 set inner [$itk_component(main) insert end \ 1767 1768 -title "Contour/Surface Settings" \ 1768 -icon [Rappture::icon contour ]]1769 -icon [Rappture::icon contour2]] 1769 1770 $inner configure -borderwidth 4 1770 1771 … … 1958 1959 set inner [$itk_component(main) insert end \ 1959 1960 -title "Axis Settings" \ 1960 -icon [Rappture::icon axis 1]]1961 -icon [Rappture::icon axis2]] 1961 1962 $inner configure -borderwidth 4 1962 1963 … … 2030 2031 $inner configure -borderwidth 4 2031 2032 2033 label $inner.view_l -text "view" -font "Arial 9" 2034 set f [frame $inner.view] 2035 foreach side { front back left right top bottom } { 2036 button $f.$side -image [Rappture::icon view$side] \ 2037 -command [itcl::code $this SetOrientation $side] 2038 Rappture::Tooltip::for $f.$side "Change the view to $side" 2039 pack $f.$side -side left 2040 } 2041 2042 blt::table $inner \ 2043 0,0 $inner.view_l -anchor e -pady 2 \ 2044 0,1 $inner.view -anchor w -pady 2 2045 2032 2046 set labels { qx qy qz qw xpan ypan zoom } 2033 set row 02047 set row 1 2034 2048 foreach tag $labels { 2035 2049 label $inner.${tag}label -text $tag -font "Arial 9" … … 2056 2070 incr row 2057 2071 2058 blt::table configure $inner c 0 c1-resize none2072 blt::table configure $inner c* r* -resize none 2059 2073 blt::table configure $inner c2 -resize expand 2060 2074 blt::table configure $inner r$row -resize expand … … 2513 2527 } 2514 2528 2515 2516 2517 2529 itcl::body Rappture::VtkHeightmapViewer::SetOrientation { side } { 2530 array set positions { 2531 front "1 0 0 0" 2532 back "0 0 1 0" 2533 left "0.707107 0 -0.707107 0" 2534 right "0.707107 0 0.707107 0" 2535 top "0.707107 -0.707107 0 0" 2536 bottom "0.707107 0.707107 0 0" 2537 } 2538 foreach name { qw qx qy qz } value $positions($side) { 2539 set _view($name) $value 2540 } 2541 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 2542 $_arcball quaternion $q 2543 SendCmd "camera orient $q" 2544 } 2545 2546 2547 2548
Note: See TracChangeset
for help on using the changeset viewer.