Changeset 1250 for trunk/gui/scripts/heightmapviewer.tcl
- Timestamp:
- Dec 1, 2008, 2:05:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/heightmapviewer.tcl
r1246 r1250 1 1 2 # ---------------------------------------------------------------------- 2 3 # COMPONENT: heightmapviewer - 3D volume rendering … … 67 68 protected method _send_dataobjs {} 68 69 protected method ReceiveImage {option size} 69 private method ReceiveLegend { ivolvmin vmax size}70 private method ReceiveLegend {tf vmin vmax size} 70 71 protected method _receive_echo {channel {data ""}} 71 72 … … 236 237 -command [itcl::code $this _fixSettings wireframe] 237 238 grid $inner.f.wireframe -row 3 -column 0 -sticky w 238 239 set ::Rappture::HeightmapViewer::settings_($this-shading) "smooth"240 ::checkbutton $inner.f.shading \241 -text "Flat Shading" \242 -onvalue "flat" -offvalue "smooth" \243 -variable ::Rappture::HeightmapViewer::settings_($this-shading) \244 -command [itcl::code $this _fixSettings shading]245 grid $inner.f.shading -row 4 -column 0 -sticky w246 239 247 240 # Legend … … 676 669 677 670 # ---------------------------------------------------------------------- 678 # USAGE: ReceiveLegend < volume> <vmin> <vmax> <size>671 # USAGE: ReceiveLegend <tf> <vmin> <vmax> <size> 679 672 # 680 673 # Invoked automatically whenever the "legend" command comes in from … … 682 675 # specified <size> will follow. 683 676 # ---------------------------------------------------------------------- 684 itcl::body Rappture::HeightmapViewer::ReceiveLegend { ivolvmin vmax size} {677 itcl::body Rappture::HeightmapViewer::ReceiveLegend {tf vmin vmax size} { 685 678 if { [IsConnected] } { 686 679 set bytes [ReceiveBytes $size] … … 766 759 _send "grid linecolor [Color2RGB $itk_option(-plotoutline)]" 767 760 } 768 _fixSettings shading769 761 _fixSettings wireframe 770 762 _fixSettings grid … … 857 849 click { 858 850 $itk_component(3dview) configure -cursor fleur 859 array set click [subst {851 array set click_ [subst { 860 852 x $x 861 853 y $y … … 878 870 set dx [expr {double($x-$click_(x))/$w}] 879 871 set dy [expr {double($y-$click_(y))/$h}] 880 }] } {872 }] != 0 } { 881 873 return 882 874 } … … 977 969 } 978 970 } 979 "shading" {980 if { [IsConnected] } {981 _send "heightmap shading $settings_($this-shading)"982 }983 }984 971 "wireframe" { 985 972 if { [IsConnected] } {
Note: See TracChangeset
for help on using the changeset viewer.