Changeset 3421 for trunk/gui/scripts/vtkviewer.tcl
- Timestamp:
- Mar 3, 2013, 12:52:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkviewer.tcl
r3418 r3421 59 59 public method isconnected {} 60 60 public method limits { colormap } 61 public method sendto { string }62 61 public method parameters {title args} { 63 62 # do nothing … … 79 78 protected method ReceiveLegend { colormap title vmin vmax size } 80 79 protected method Rotate {option x y} 81 protected method SendCmd {string}82 80 protected method Zoom {option} 83 81 … … 109 107 110 108 private variable _arcball "" 111 private variable _outbuf; # buffer for outgoing commands112 113 109 private variable _dlist ""; # list of data objects 114 110 private variable _allDataObjs … … 136 132 private variable _first "" ;# This is the topmost dataset. 137 133 private variable _start 0 138 private variable _buffering 0139 134 private variable _title "" 140 135 … … 176 171 $_dispatcher register !rotate 177 172 $_dispatcher dispatch $this !rotate "[itcl::code $this DoRotate]; list" 178 179 set _outbuf ""180 173 181 174 # … … 313 306 Rappture::Tooltip::for $itk_component(zoomout) "Zoom out" 314 307 315 puts stderr "BuildMeshTab"316 308 if { [catch { BuildMeshTab } errs ] != 0 } { 317 309 puts stderr "errs=$errs" 318 310 } 319 puts stderr "BuildMoleculeTab"320 311 if { [catch { BuildMoleculeTab } errs ] != 0 } { 321 312 global errorInfo … … 431 422 set _start [clock clicks -milliseconds] 432 423 SendCmd "screen size $_width $_height" 433 #SendCmd "imgflush"434 435 424 # Must reset camera to have object scaling to take effect. 436 #SendCmd "camera reset" 437 #SendCmd "camera zoom $_view(zoom)" 425 SendCmd "camera reset" 438 426 set _resizePending 0 439 427 } … … 755 743 756 744 # disconnected -- no more data sitting on server 757 set _outbuf ""758 745 array unset _datasets 759 746 array unset _data 760 747 array unset _colormaps 761 }762 763 #764 # sendto --765 #766 itcl::body Rappture::VtkViewer::sendto { bytes } {767 SendBytes "$bytes\n"768 }769 770 #771 # SendCmd772 #773 # Send commands off to the rendering server. If we're currently774 # sending data objects to the server, buffer the commands to be775 # sent later.776 #777 itcl::body Rappture::VtkViewer::SendCmd {string} {778 if { $_buffering } {779 append _outbuf $string "\n"780 } else {781 SendBytes "$string\n"782 }783 748 } 784 749 … … 878 843 # be preempted by a server disconnect/reconnect (which automatically 879 844 # generates a new call to Rebuild). 880 set _buffering 1845 StartBufferingCommands 881 846 882 847 if { $_reset } { 883 if 1{848 if { $_reportClientInfo } { 884 849 # Tell the server the name of the tool, the version, and dataset 885 850 # that we are rendering. Have to do it here because we don't know … … 930 895 } 931 896 set length [string length $bytes] 932 if 1{897 if { $_reportClientInfo } { 933 898 set info {} 934 899 lappend info "tool_id" [$dataobj hints toolId] … … 941 906 SendCmd [list "clientinfo" $info] 942 907 } 943 append _outbuf "dataset add $tag data follows $length\n"908 SendCmd "dataset add $tag data follows $length" 944 909 append _outbuf $bytes 945 910 set _datasets($tag) 1 … … 988 953 SendCmd "dataset maprange visible" 989 954 990 set _buffering 0; # Turn off buffering.991 955 set _reset 0 992 956 … … 994 958 # care. We're finished here. 995 959 blt::busy hold $itk_component(hull) 996 S endBytes $_outbuf;960 StopBufferingCommands 997 961 blt::busy release $itk_component(hull) 998 set _outbuf ""; # Clear the buffer.999 962 } 1000 963 … … 1589 1552 # 1590 1553 itcl::body Rappture::VtkViewer::BuildColormap { name styles } { 1591 puts stderr name=$name1592 1554 if { $name == "elementDefault" } { 1593 1555 return
Note: See TracChangeset
for help on using the changeset viewer.