- Timestamp:
- Feb 8, 2015 6:51:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/vtkstreamlinesviewer.tcl
r4928 r4983 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 # COMPONENT: vtk viewer - Vtk drawingobject viewer3 # COMPONENT: vtkstreamlinesviewer - Vtk streamlines object viewer 4 4 # 5 5 # It connects to the Vtk server running on a rendering farm, … … 7 7 # ====================================================================== 8 8 # AUTHOR: Michael McLennan, Purdue University 9 # Copyright (c) 2004-201 2HUBzero Foundation, LLC9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 10 10 # 11 11 # See the file "license.terms" for information on usage and … … 62 62 public method scale {args} 63 63 64 protected method Connect {}65 protected method CurrentDatasets {args}66 protected method Disconnect {}67 protected method DoResize {}68 protected method DoReseed {}69 protected method DoRotate {}70 protected method AdjustSetting {what {value ""}}71 protected method InitSettings { args }72 protected method Pan {option x y}73 protected method Pick {x y}74 protected method Rebuild {}75 protected method ReceiveDataset { args }76 protected method ReceiveImage { args }77 protected method ReceiveLegend { colormap title vmin vmax size }78 protected method Rotate {option x y}79 protected method Zoom {option}80 81 64 # The following methods are only used by this class. 65 private method AdjustSetting {what {value ""}} 82 66 private method BuildAxisTab {} 83 67 private method BuildCameraTab {} … … 89 73 private method DrawLegend {} 90 74 private method Combo { option } 75 private method Connect {} 76 private method CurrentDatasets {args} 77 private method Disconnect {} 78 private method DoResize {} 79 private method DoReseed {} 80 private method DoRotate {} 91 81 private method EnterLegend { x y } 92 82 private method EventuallyResize { w h } … … 96 86 private method GetImage { args } 97 87 private method GetVtkData { args } 88 private method InitSettings { args } 98 89 private method IsValidObject { dataobj } 99 90 private method LeaveLegend {} 100 91 private method MotionLegend { x y } 92 private method Pan {option x y} 101 93 private method PanCamera {} 94 private method Pick {x y} 95 private method QuaternionToView { q } { 96 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break 97 } 98 private method Rebuild {} 99 private method ReceiveDataset { args } 100 private method ReceiveImage { args } 101 private method ReceiveLegend { colormap title vmin vmax size } 102 102 private method RequestLegend {} 103 private method Rotate {option x y} 103 104 private method SetColormap { dataobj comp } 104 105 private method ChangeColormap { dataobj comp color } … … 107 108 private method Slice {option args} 108 109 private method SetOrientation { side } 110 private method ViewToQuaternion {} { 111 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)] 112 } 113 private method Zoom {option} 109 114 110 115 private variable _arcball "" … … 189 194 $_dispatcher register !xcutplane 190 195 $_dispatcher dispatch $this !xcutplane \ 191 "[itcl::code $this AdjustSetting cutplaneXPosition]; list"196 "[itcl::code $this AdjustSetting -cutplanexposition]; list" 192 197 193 198 # Y-Cutplane event 194 199 $_dispatcher register !ycutplane 195 200 $_dispatcher dispatch $this !ycutplane \ 196 "[itcl::code $this AdjustSetting cutplaneYPosition]; list"201 "[itcl::code $this AdjustSetting -cutplaneyposition]; list" 197 202 198 203 # Z-Cutplane event 199 204 $_dispatcher register !zcutplane 200 205 $_dispatcher dispatch $this !zcutplane \ 201 "[itcl::code $this AdjustSetting cutplaneZPosition]; list"206 "[itcl::code $this AdjustSetting -cutplanezposition]; list" 202 207 203 208 # … … 210 215 # Initialize the view to some default parameters. 211 216 array set _view { 212 qw 0.853553213 qx -0.353553214 qy0.353553215 qz 0.146447216 zoom 1.0217 xpan 0218 ypan 0219 ortho0217 -ortho 0 218 -qw 0.853553 219 -qx -0.353553 220 -qy 0.353553 221 -qz 0.146447 222 -xpan 0 223 -ypan 0 224 -zoom 1.0 220 225 } 221 226 set _arcball [blt::arcball create 100 100] 222 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 223 $_arcball quaternion $q 227 $_arcball quaternion [ViewToQuaternion] 224 228 225 229 array set _settings [subst { 226 axesVisible 1 227 axisLabelsVisible 1 228 axisXGrid 0 229 axisYGrid 0 230 axisZGrid 0 231 cutplaneEdges 0 232 cutplaneLighting 1 233 cutplaneOpacity 100 234 cutplaneVisible 0 235 cutplaneWireframe 0 236 cutplaneXPosition 50 237 cutplaneXVisible 1 238 cutplaneYPosition 50 239 cutplaneYVisible 1 240 cutplaneZPosition 50 241 cutplaneZVisible 1 242 legendVisible 1 243 streamlinesLighting 1 244 streamlinesMode lines 245 streamlinesNumSeeds 200 246 streamlinesOpacity 100 247 streamlinesScale 1 248 streamlinesSeedsVisible 0 249 streamlinesVisible 1 250 volumeEdges 0 251 volumeLighting 1 252 volumeOpacity 40 253 volumeVisible 1 254 volumeWireframe 0 230 -axesvisible 1 231 -axislabelsvisible 1 232 -axisminorticks 1 233 -axismode "static" 234 -cutplaneedges 0 235 -cutplanelighting 1 236 -cutplaneopacity 100 237 -cutplanevisible 0 238 -cutplanewireframe 0 239 -cutplanexposition 50 240 -cutplanexvisible 1 241 -cutplaneyposition 50 242 -cutplaneyvisible 1 243 -cutplanezposition 50 244 -cutplanezvisible 1 245 -legendvisible 1 246 -streamlineslighting 1 247 -streamlinesmode lines 248 -streamlinesnumseeds 200 249 -streamlinesopacity 100 250 -streamlinesscale 1 251 -streamlinesseedsvisible 0 252 -streamlinesvisible 1 253 -volumeedges 0 254 -volumelighting 1 255 -volumeopacity 40 256 -volumevisible 1 257 -volumewireframe 0 258 -xgrid 0 259 -ygrid 0 260 -zgrid 0 255 261 }] 256 262 … … 331 337 -onimage [Rappture::icon volume-on] \ 332 338 -offimage [Rappture::icon volume-off] \ 333 -variable [itcl::scope _settings( volumeVisible)] \334 -command [itcl::code $this AdjustSetting volumeVisible]339 -variable [itcl::scope _settings(-volumevisible)] \ 340 -command [itcl::code $this AdjustSetting -volumevisible] 335 341 } 336 342 $itk_component(volume) select … … 343 349 -onimage [Rappture::icon streamlines-on] \ 344 350 -offimage [Rappture::icon streamlines-off] \ 345 -variable [itcl::scope _settings( streamlinesVisible)] \346 -command [itcl::code $this AdjustSetting streamlinesVisible] \351 -variable [itcl::scope _settings(-streamlinesvisible)] \ 352 -command [itcl::code $this AdjustSetting -streamlinesvisible] \ 347 353 } 348 354 $itk_component(streamlines) select … … 355 361 -onimage [Rappture::icon cutbutton] \ 356 362 -offimage [Rappture::icon cutbutton] \ 357 -variable [itcl::scope _settings( cutplaneVisible)] \358 -command [itcl::code $this AdjustSetting cutplaneVisible]363 -variable [itcl::scope _settings(-cutplanevisible)] \ 364 -command [itcl::code $this AdjustSetting -cutplanevisible] 359 365 } 360 366 Rappture::Tooltip::for $itk_component(cutplane) \ … … 399 405 bind $itk_component(view) <ButtonRelease-1> \ 400 406 [itcl::code $this Rotate release %x %y] 401 bind $itk_component(view) <Configure> \ 402 [itcl::code $this EventuallyResize %w %h] 403 404 if 0 { 405 bind $itk_component(view) <Configure> \ 406 [itcl::code $this EventuallyResize %w %h] 407 } 407 408 408 # Bindings for panning via mouse 409 409 bind $itk_component(view) <ButtonPress-2> \ … … 480 480 481 481 itcl::body Rappture::VtkStreamlinesViewer::DoRotate {} { 482 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 483 SendCmd "camera orient $q" 482 SendCmd "camera orient [ViewToQuaternion]" 484 483 set _rotatePending 0 485 484 } … … 515 514 516 515 itcl::body Rappture::VtkStreamlinesViewer::EventuallyRotate { q } { 517 foreach { _view(qw) _view(qx) _view(qy) _view(qz) } $q break516 QuaternionToView $q 518 517 if { !$_rotatePending } { 519 518 set _rotatePending 1 … … 787 786 if { $_reportClientInfo } { 788 787 # Tell the server the viewer, hub, user and session. 789 # Do this immediately on connect before buff ing any commands788 # Do this immediately on connect before buffering any commands 790 789 global env 791 790 … … 877 876 if { $info(-type) == "image" } { 878 877 if 0 { 879 set f [open "last.ppm" "w"] 880 puts $f $bytes 878 set f [open "last.ppm" "w"] 879 fconfigure $f -encoding binary 880 puts -nonewline $f $bytes 881 881 close $f 882 882 } … … 968 968 $_arcball resize $w $h 969 969 DoResize 970 InitSettings axisXGrid axisYGrid axisZGrid axis-mode \971 axesVisible axisLabelsVisible970 InitSettings -xgrid -ygrid -zgrid -axismode \ 971 -axesvisible -axislabelsvisible -axisminorticks 972 972 # This "imgflush" is to force an image returned before vtkvis starts 973 973 # reading a (big) dataset. This will display an empty plot with axes … … 991 991 set f [open /tmp/vtkstreamlines.vtk "w"] 992 992 fconfigure $f -translation binary -encoding binary 993 puts $f $bytes993 puts -nonewline $f $bytes 994 994 close $f 995 995 } … … 1025 1025 set label [$_first hints ${axis}label] 1026 1026 if { $label != "" } { 1027 SendCmd "axis name $axis $label"1027 SendCmd [list axis name $axis $label] 1028 1028 } 1029 1029 set units [$_first hints ${axis}units] 1030 1030 if { $units != "" } { 1031 SendCmd "axis units $axis $units"1031 SendCmd [list axis units $axis $units] 1032 1032 } 1033 1033 } … … 1062 1062 1063 1063 if { $_reset } { 1064 InitSettings streamlinesSeedsVisible streamlinesOpacity \1065 streamlinesVisible streamlinesColormap \1066 streamlinesLighting \1067 streamlinesColormapfield \1068 volumeVisible volumeEdges volumeLighting volumeOpacity \1069 volumeWireframe \1070 cutplaneVisible \1071 cutplaneXPosition cutplaneYPosition cutplaneZPosition \1072 cutplaneXVisible cutplaneYVisible cutplaneZVisible1064 InitSettings -streamlinesseedsvisible -streamlinesopacity \ 1065 -streamlinesvisible -streamlinescolormap \ 1066 -streamlineslighting \ 1067 -streamlinescolormap -field \ 1068 -volumevisible -volumeedges -volumelighting -volumeopacity \ 1069 -volumewireframe \ 1070 -cutplanevisible \ 1071 -cutplanexposition -cutplaneyposition -cutplanezposition \ 1072 -cutplanexvisible -cutplaneyvisible -cutplanezvisible 1073 1073 1074 1074 # Reset the camera and other view parameters 1075 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1076 $_arcball quaternion $q 1077 if {$_view(ortho)} { 1075 $_arcball quaternion [ViewToQuaternion] 1076 if {$_view(-ortho)} { 1078 1077 SendCmd "camera mode ortho" 1079 1078 } else { … … 1149 1148 switch -- $option { 1150 1149 "in" { 1151 set _view( zoom) [expr {$_view(zoom)*1.25}]1152 SendCmd "camera zoom $_view( zoom)"1150 set _view(-zoom) [expr {$_view(-zoom)*1.25}] 1151 SendCmd "camera zoom $_view(-zoom)" 1153 1152 } 1154 1153 "out" { 1155 set _view( zoom) [expr {$_view(zoom)*0.8}]1156 SendCmd "camera zoom $_view( zoom)"1154 set _view(-zoom) [expr {$_view(-zoom)*0.8}] 1155 SendCmd "camera zoom $_view(-zoom)" 1157 1156 } 1158 1157 "reset" { 1159 1158 array set _view { 1160 qw 0.8535531161 qx -0.3535531162 qy 0.3535531163 qz 0.1464471164 zoom 1.01165 xpan 01166 ypan01159 -qw 0.853553 1160 -qx -0.353553 1161 -qy 0.353553 1162 -qz 0.146447 1163 -xpan 0 1164 -ypan 0 1165 -zoom 1.0 1167 1166 } 1168 1167 if { $_first != "" } { … … 1172 1171 } 1173 1172 } 1174 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1175 $_arcball quaternion $q 1173 $_arcball quaternion [ViewToQuaternion] 1176 1174 DoRotate 1177 1175 SendCmd "camera reset" … … 1181 1179 1182 1180 itcl::body Rappture::VtkStreamlinesViewer::PanCamera {} { 1183 set x $_view( xpan)1184 set y $_view( ypan)1181 set x $_view(-xpan) 1182 set y $_view(-ypan) 1185 1183 SendCmd "camera pan $x $y" 1186 1184 } 1187 1188 1185 1189 1186 # ---------------------------------------------------------------------- … … 1260 1257 set x [expr $x / double($w)] 1261 1258 set y [expr $y / double($h)] 1262 set _view( xpan) [expr $_view(xpan) + $x]1263 set _view( ypan) [expr $_view(ypan) + $y]1259 set _view(-xpan) [expr $_view(-xpan) + $x] 1260 set _view(-ypan) [expr $_view(-ypan) + $y] 1264 1261 PanCamera 1265 1262 return … … 1283 1280 set _click(x) $x 1284 1281 set _click(y) $y 1285 set _view( xpan) [expr $_view(xpan) - $dx]1286 set _view( ypan) [expr $_view(ypan) - $dy]1282 set _view(-xpan) [expr $_view(-xpan) - $dx] 1283 set _view(-ypan) [expr $_view(-ypan) - $dy] 1287 1284 PanCamera 1288 1285 } … … 1306 1303 itcl::body Rappture::VtkStreamlinesViewer::InitSettings { args } { 1307 1304 foreach spec $args { 1308 if { [info exists _settings($_first -$spec)] } {1305 if { [info exists _settings($_first${spec})] } { 1309 1306 # Reset global setting with dataobj specific setting 1310 set _settings($spec) $_settings($_first -$spec)1307 set _settings($spec) $_settings($_first${spec}) 1311 1308 } 1312 1309 AdjustSetting $spec … … 1326 1323 } 1327 1324 switch -- $what { 1328 "volumeOpacity" { 1329 set val $_settings(volumeOpacity) 1330 set sval [expr { 0.01 * double($val) }] 1331 SendCmd "polydata opacity $sval" 1332 } 1333 "volumeWireframe" { 1334 set bool $_settings(volumeWireframe) 1335 SendCmd "polydata wireframe $bool" 1336 } 1337 "volumeVisible" { 1338 set bool $_settings(volumeVisible) 1339 SendCmd "polydata visible $bool" 1340 if { $bool } { 1341 Rappture::Tooltip::for $itk_component(volume) \ 1342 "Hide the volume" 1343 } else { 1344 Rappture::Tooltip::for $itk_component(volume) \ 1345 "Show the volume" 1346 } 1347 } 1348 "volumeLighting" { 1349 set bool $_settings(volumeLighting) 1350 SendCmd "polydata lighting $bool" 1351 } 1352 "volumeEdges" { 1353 set bool $_settings(volumeEdges) 1354 SendCmd "polydata edges $bool" 1355 } 1356 "axesVisible" { 1357 set bool $_settings(axesVisible) 1325 "-axesvisible" { 1326 set bool $_settings($what) 1358 1327 SendCmd "axis visible all $bool" 1359 1328 } 1360 " axisLabelsVisible" {1361 set bool $_settings( axisLabelsVisible)1329 "-axislabelsvisible" { 1330 set bool $_settings($what) 1362 1331 SendCmd "axis labels all $bool" 1363 1332 } 1364 "axisXGrid" - "axisYGrid" - "axisZGrid" { 1365 set axis [string tolower [string range $what 4 4]] 1333 "-axisminorticks" { 1366 1334 set bool $_settings($what) 1367 SendCmd "axis grid $axis$bool"1368 } 1369 " axis-mode" {1335 SendCmd "axis minticks all $bool" 1336 } 1337 "-axismode" { 1370 1338 set mode [$itk_component(axismode) value] 1371 1339 set mode [$itk_component(axismode) translate $mode] … … 1373 1341 SendCmd "axis flymode $mode" 1374 1342 } 1375 " cutplaneEdges" {1343 "-cutplaneedges" { 1376 1344 set bool $_settings($what) 1377 1345 SendCmd "cutplane edges $bool" 1378 1346 } 1379 " cutplaneVisible" {1347 "-cutplanevisible" { 1380 1348 set bool $_settings($what) 1381 1349 SendCmd "cutplane visible $bool" 1382 1350 } 1383 " cutplaneWireframe" {1351 "-cutplanewireframe" { 1384 1352 set bool $_settings($what) 1385 1353 SendCmd "cutplane wireframe $bool" 1386 1354 } 1387 " cutplaneLighting" {1355 "-cutplanelighting" { 1388 1356 set bool $_settings($what) 1389 1357 SendCmd "cutplane lighting $bool" 1390 1358 } 1391 " cutplaneOpacity" {1359 "-cutplaneopacity" { 1392 1360 set val $_settings($what) 1393 1361 set sval [expr { 0.01 * double($val) }] 1394 1362 SendCmd "cutplane opacity $sval" 1395 1363 } 1396 " cutplaneXVisible" - "cutplaneYVisible" - "cutplaneZVisible" {1397 set axis [string tolower [string range $what 8 8]]1364 "-cutplanexvisible" - "-cutplaneyvisible" - "-cutplanezvisible" { 1365 set axis [string range $what 9 9] 1398 1366 set bool $_settings($what) 1399 1367 if { $bool } { … … 1406 1374 SendCmd "cutplane axis $axis $bool" 1407 1375 } 1408 " cutplaneXPosition" - "cutplaneYPosition" - "cutplaneZPosition" {1409 set axis [string tolower [string range $what 8 8]]1376 "-cutplanexposition" - "-cutplaneyposition" - "-cutplanezposition" { 1377 set axis [string range $what 9 9] 1410 1378 set pos [expr $_settings($what) * 0.01] 1411 1379 SendCmd "cutplane slice ${axis} ${pos}" 1412 1380 set _cutplanePending 0 1413 1381 } 1414 "streamlinesSeedsVisible" { 1382 "-field" { 1383 set label [$itk_component(field) value] 1384 set fname [$itk_component(field) translate $label] 1385 set _settings($what) $fname 1386 if { [info exists _fields($fname)] } { 1387 foreach { label units components } $_fields($fname) break 1388 if { $components > 1 } { 1389 set _colorMode vmag 1390 } else { 1391 set _colorMode scalar 1392 } 1393 set _curFldName $fname 1394 set _curFldLabel $label 1395 } else { 1396 puts stderr "unknown field \"$fname\"" 1397 return 1398 } 1399 # Get the new limits because the field changed. 1400 if { ![info exists _limits($_curFldName)] } { 1401 SendCmd "dataset maprange all" 1402 } else { 1403 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1404 } 1405 SendCmd "streamlines colormode $_colorMode $_curFldName" 1406 SendCmd "cutplane colormode $_colorMode $_curFldName" 1407 DrawLegend 1408 } 1409 "-streamlinesseedsvisible" { 1415 1410 set bool $_settings($what) 1416 1411 SendCmd "streamlines seed visible $bool" 1417 1412 } 1418 " streamlinesNumSeeds" {1413 "-streamlinesnumseeds" { 1419 1414 set density $_settings($what) 1420 1415 EventuallyReseed $density 1421 1416 } 1422 " streamlinesVisible" {1417 "-streamlinesvisible" { 1423 1418 set bool $_settings($what) 1424 1419 SendCmd "streamlines visible $bool" … … 1431 1426 } 1432 1427 } 1433 " streamlinesMode" {1428 "-streamlinesmode" { 1434 1429 set mode [$itk_component(streammode) value] 1435 set _settings( streamlinesMode) $mode1430 set _settings($what) $mode 1436 1431 switch -- $mode { 1437 1432 "lines" { … … 1446 1441 } 1447 1442 } 1448 " streamlinesColormap" {1443 "-streamlinescolormap" { 1449 1444 set colormap [$itk_component(colormap) value] 1450 set _settings( streamlinesColormap) $colormap1445 set _settings($what) $colormap 1451 1446 foreach dataset [CurrentDatasets -visible $_first] { 1452 1447 foreach {dataobj comp} [split $dataset -] break … … 1455 1450 set _legendPending 1 1456 1451 } 1457 " streamlinesOpacity" {1458 set val $_settings( streamlinesOpacity)1452 "-streamlinesopacity" { 1453 set val $_settings($what) 1459 1454 set sval [expr { 0.01 * double($val) }] 1460 1455 SendCmd "streamlines opacity $sval" 1461 1456 } 1462 " streamlinesScale" {1463 set val $_settings( streamlinesScale)1457 "-streamlinesscale" { 1458 set val $_settings($what) 1464 1459 set sval [expr { 0.01 * double($val) }] 1465 1460 SendCmd "streamlines scale $sval $sval $sval" 1466 1461 } 1467 " streamlinesLighting" {1468 set bool $_settings( streamlinesLighting)1462 "-streamlineslighting" { 1463 set bool $_settings($what) 1469 1464 SendCmd "streamlines lighting $bool" 1470 1465 } 1471 "field" { 1472 set label [$itk_component(field) value] 1473 set fname [$itk_component(field) translate $label] 1474 set _settings(field) $fname 1475 if { [info exists _fields($fname)] } { 1476 foreach { label units components } $_fields($fname) break 1477 if { $components > 1 } { 1478 set _colorMode vmag 1479 } else { 1480 set _colorMode scalar 1481 } 1482 set _curFldName $fname 1483 set _curFldLabel $label 1466 "-volumeopacity" { 1467 set val $_settings($what) 1468 set sval [expr { 0.01 * double($val) }] 1469 SendCmd "polydata opacity $sval" 1470 } 1471 "-volumewireframe" { 1472 set bool $_settings($what) 1473 SendCmd "polydata wireframe $bool" 1474 } 1475 "-volumevisible" { 1476 set bool $_settings($what) 1477 SendCmd "polydata visible $bool" 1478 if { $bool } { 1479 Rappture::Tooltip::for $itk_component(volume) \ 1480 "Hide the volume" 1484 1481 } else { 1485 puts stderr "unknown field \"$fname\"" 1486 return 1487 } 1488 # Get the new limits because the field changed. 1489 SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName" 1490 SendCmd "streamlines colormode $_colorMode $_curFldName" 1491 SendCmd "cutplane colormode $_colorMode $_curFldName" 1492 DrawLegend 1482 Rappture::Tooltip::for $itk_component(volume) \ 1483 "Show the volume" 1484 } 1485 } 1486 "-volumelighting" { 1487 set bool $_settings($what) 1488 SendCmd "polydata lighting $bool" 1489 } 1490 "-volumeedges" { 1491 set bool $_settings($what) 1492 SendCmd "polydata edges $bool" 1493 } 1494 "-xgrid" - "-ygrid" - "-zgrid" { 1495 set axis [string range $what 1 1] 1496 set bool $_settings($what) 1497 SendCmd "axis grid $axis $bool" 1493 1498 } 1494 1499 default { … … 1508 1513 set font "Arial 8" 1509 1514 set lineht [font metrics $font -linespace] 1510 set c $itk_component(legend)1511 1515 set w 12 1512 1516 set h [expr {$_height - 3 * ($lineht + 2)}] 1513 if { $h < 1 } {1517 if { $h < 1 } { 1514 1518 return 1515 1519 } … … 1576 1580 } 1577 1581 1578 1579 1582 # 1580 1583 # BuildColormap -- … … 1586 1589 set cmap "0.0 0.0 0.0 0.0 1.0 1.0 1.0 1.0" 1587 1590 } 1588 if { ![info exists _settings( volumeOpacity)] } {1589 set _settings( volumeOpacity) $style(-opacity)1590 } 1591 set max $_settings( volumeOpacity)1591 if { ![info exists _settings(-volumeopacity)] } { 1592 set _settings(-volumeopacity) $style(-opacity) 1593 } 1594 set max $_settings(-volumeopacity) 1592 1595 1593 1596 set wmap "0.0 1.0 1.0 1.0" … … 1600 1603 itcl::configbody Rappture::VtkStreamlinesViewer::plotbackground { 1601 1604 if { [isconnected] } { 1602 foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break1603 SendCmd "screen bgcolor $r $g $b"1605 set rgb [Color2RGB $itk_option(-plotbackground)] 1606 SendCmd "screen bgcolor $rgb" 1604 1607 } 1605 1608 } … … 1610 1613 itcl::configbody Rappture::VtkStreamlinesViewer::plotforeground { 1611 1614 if { [isconnected] } { 1612 foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break 1613 #fix this! 1614 #SendCmd "color background $r $g $b" 1615 set rgb [Color2RGB $itk_option(-plotforeground)] 1616 SendCmd "axis color all $rgb" 1617 SendCmd "outline color $rgb" 1618 SendCmd "cutplane color $rgb" 1615 1619 } 1616 1620 } … … 1628 1632 checkbutton $inner.volume \ 1629 1633 -text "Show Volume" \ 1630 -variable [itcl::scope _settings( volumeVisible)] \1631 -command [itcl::code $this AdjustSetting volumeVisible] \1634 -variable [itcl::scope _settings(-volumevisible)] \ 1635 -command [itcl::code $this AdjustSetting -volumevisible] \ 1632 1636 -font "Arial 9" 1633 1637 1634 1638 checkbutton $inner.wireframe \ 1635 1639 -text "Show Wireframe" \ 1636 -variable [itcl::scope _settings( volumeWireframe)] \1637 -command [itcl::code $this AdjustSetting volumeWireframe] \1640 -variable [itcl::scope _settings(-volumewireframe)] \ 1641 -command [itcl::code $this AdjustSetting -volumewireframe] \ 1638 1642 -font "Arial 9" 1639 1643 1640 1644 checkbutton $inner.lighting \ 1641 1645 -text "Enable Lighting" \ 1642 -variable [itcl::scope _settings( volumeLighting)] \1643 -command [itcl::code $this AdjustSetting volumeLighting] \1646 -variable [itcl::scope _settings(-volumelighting)] \ 1647 -command [itcl::code $this AdjustSetting -volumelighting] \ 1644 1648 -font "Arial 9" 1645 1649 1646 1650 checkbutton $inner.edges \ 1647 1651 -text "Show Edges" \ 1648 -variable [itcl::scope _settings( volumeEdges)] \1649 -command [itcl::code $this AdjustSetting volumeEdges] \1652 -variable [itcl::scope _settings(-volumeedges)] \ 1653 -command [itcl::code $this AdjustSetting -volumeedges] \ 1650 1654 -font "Arial 9" 1651 1655 1652 1656 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1653 1657 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1654 -variable [itcl::scope _settings( volumeOpacity)] \1658 -variable [itcl::scope _settings(-volumeopacity)] \ 1655 1659 -width 10 \ 1656 1660 -showvalue off \ 1657 -command [itcl::code $this AdjustSetting volumeOpacity]1661 -command [itcl::code $this AdjustSetting -volumeopacity] 1658 1662 1659 1663 blt::table $inner \ … … 1668 1672 } 1669 1673 1670 1671 1674 itcl::body Rappture::VtkStreamlinesViewer::BuildStreamsTab {} { 1672 1675 … … 1681 1684 checkbutton $inner.streamlines \ 1682 1685 -text "Show Streamlines" \ 1683 -variable [itcl::scope _settings( streamlinesVisible)] \1684 -command [itcl::code $this AdjustSetting streamlinesVisible] \1686 -variable [itcl::scope _settings(-streamlinesvisible)] \ 1687 -command [itcl::code $this AdjustSetting -streamlinesvisible] \ 1685 1688 -font "Arial 9" 1686 1689 1687 1690 checkbutton $inner.lighting \ 1688 1691 -text "Enable Lighting" \ 1689 -variable [itcl::scope _settings( streamlinesLighting)] \1690 -command [itcl::code $this AdjustSetting streamlinesLighting] \1692 -variable [itcl::scope _settings(-streamlineslighting)] \ 1693 -command [itcl::code $this AdjustSetting -streamlineslighting] \ 1691 1694 -font "Arial 9" 1692 1695 1693 1696 checkbutton $inner.seeds \ 1694 1697 -text "Show Seeds" \ 1695 -variable [itcl::scope _settings( streamlinesSeedsVisible)] \1696 -command [itcl::code $this AdjustSetting streamlinesSeedsVisible] \1698 -variable [itcl::scope _settings(-streamlinesseedsvisible)] \ 1699 -command [itcl::code $this AdjustSetting -streamlinesseedsvisible] \ 1697 1700 -font "Arial 9" 1698 1701 … … 1705 1708 "ribbons" "ribbons" \ 1706 1709 "tubes" "tubes" 1707 $itk_component(streammode) value $_settings( streamlinesMode)1708 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting streamlinesMode]1710 $itk_component(streammode) value $_settings(-streamlinesmode) 1711 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -streamlinesmode] 1709 1712 1710 1713 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1711 1714 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1712 -variable [itcl::scope _settings( streamlinesOpacity)] \1715 -variable [itcl::scope _settings(-streamlinesopacity)] \ 1713 1716 -width 10 \ 1714 1717 -showvalue off \ 1715 -command [itcl::code $this AdjustSetting streamlinesOpacity]1718 -command [itcl::code $this AdjustSetting -streamlinesopacity] 1716 1719 1717 1720 label $inner.density_l -text "No. Seeds" -font "Arial 9" 1718 1721 ::scale $inner.density -from 1 -to 1000 -orient horizontal \ 1719 -variable [itcl::scope _settings( streamlinesNumSeeds)] \1722 -variable [itcl::scope _settings(-streamlinesnumseeds)] \ 1720 1723 -width 10 \ 1721 1724 -showvalue on \ 1722 -command [itcl::code $this AdjustSetting streamlinesNumSeeds]1725 -command [itcl::code $this AdjustSetting -streamlinesnumseeds] 1723 1726 1724 1727 label $inner.scale_l -text "Scale" -font "Arial 9" 1725 1728 ::scale $inner.scale -from 1 -to 100 -orient horizontal \ 1726 -variable [itcl::scope _settings( streamlinesScale)] \1729 -variable [itcl::scope _settings(-streamlinesscale)] \ 1727 1730 -width 10 \ 1728 1731 -showvalue off \ 1729 -command [itcl::code $this AdjustSetting streamlinesScale]1732 -command [itcl::code $this AdjustSetting -streamlinesscale] 1730 1733 1731 1734 label $inner.field_l -text "Color by" -font "Arial 9" … … 1734 1737 } 1735 1738 bind $inner.field <<Value>> \ 1736 [itcl::code $this AdjustSetting field]1739 [itcl::code $this AdjustSetting -field] 1737 1740 1738 1741 label $inner.colormap_l -text "Colormap" -font "Arial 9" … … 1740 1743 Rappture::Combobox $inner.colormap -width 10 -editable no 1741 1744 } 1742 $inner.colormap choices insert end \ 1743 "BCGYR" "BCGYR" \ 1744 "BGYOR" "BGYOR" \ 1745 "blue" "blue" \ 1746 "blue-to-brown" "blue-to-brown" \ 1747 "blue-to-orange" "blue-to-orange" \ 1748 "blue-to-grey" "blue-to-grey" \ 1749 "green-to-magenta" "green-to-magenta" \ 1750 "greyscale" "greyscale" \ 1751 "nanohub" "nanohub" \ 1752 "rainbow" "rainbow" \ 1753 "spectral" "spectral" \ 1754 "ROYGB" "ROYGB" \ 1755 "RYGCB" "RYGCB" \ 1756 "brown-to-blue" "brown-to-blue" \ 1757 "grey-to-blue" "grey-to-blue" \ 1758 "orange-to-blue" "orange-to-blue" 1745 $inner.colormap choices insert end [GetColormapList] 1759 1746 1760 1747 $itk_component(colormap) value "BCGYR" 1761 1748 bind $inner.colormap <<Value>> \ 1762 [itcl::code $this AdjustSetting streamlinesColormap]1749 [itcl::code $this AdjustSetting -streamlinescolormap] 1763 1750 1764 1751 blt::table $inner \ … … 1787 1774 set inner [$itk_component(main) insert end \ 1788 1775 -title "Axis Settings" \ 1789 -icon [Rappture::icon axis 1]]1776 -icon [Rappture::icon axis2]] 1790 1777 $inner configure -borderwidth 4 1791 1778 1792 1779 checkbutton $inner.visible \ 1793 -text " ShowAxes" \1794 -variable [itcl::scope _settings( axesVisible)] \1795 -command [itcl::code $this AdjustSetting axesVisible] \1780 -text "Axes" \ 1781 -variable [itcl::scope _settings(-axesvisible)] \ 1782 -command [itcl::code $this AdjustSetting -axesvisible] \ 1796 1783 -font "Arial 9" 1797 1784 1798 1785 checkbutton $inner.labels \ 1799 -text " ShowAxis Labels" \1800 -variable [itcl::scope _settings( axisLabelsVisible)] \1801 -command [itcl::code $this AdjustSetting axisLabelsVisible] \1786 -text "Axis Labels" \ 1787 -variable [itcl::scope _settings(-axislabelsvisible)] \ 1788 -command [itcl::code $this AdjustSetting -axislabelsvisible] \ 1802 1789 -font "Arial 9" 1803 1790 label $inner.grid_l -text "Grid" -font "Arial 9" 1804 1791 checkbutton $inner.xgrid \ 1805 -text " Show X Grid" \1806 -variable [itcl::scope _settings( axisXGrid)] \1807 -command [itcl::code $this AdjustSetting axisXGrid] \1792 -text "X" \ 1793 -variable [itcl::scope _settings(-xgrid)] \ 1794 -command [itcl::code $this AdjustSetting -xgrid] \ 1808 1795 -font "Arial 9" 1809 1796 checkbutton $inner.ygrid \ 1810 -text " Show Y Grid" \1811 -variable [itcl::scope _settings( axisYGrid)] \1812 -command [itcl::code $this AdjustSetting axisYGrid] \1797 -text "Y" \ 1798 -variable [itcl::scope _settings(-ygrid)] \ 1799 -command [itcl::code $this AdjustSetting -ygrid] \ 1813 1800 -font "Arial 9" 1814 1801 checkbutton $inner.zgrid \ 1815 -text "Show Z Grid" \ 1816 -variable [itcl::scope _settings(axisZGrid)] \ 1817 -command [itcl::code $this AdjustSetting axisZGrid] \ 1802 -text "Z" \ 1803 -variable [itcl::scope _settings(-zgrid)] \ 1804 -command [itcl::code $this AdjustSetting -zgrid] \ 1805 -font "Arial 9" 1806 checkbutton $inner.minorticks \ 1807 -text "Minor Ticks" \ 1808 -variable [itcl::scope _settings(-axisminorticks)] \ 1809 -command [itcl::code $this AdjustSetting -axisminorticks] \ 1818 1810 -font "Arial 9" 1819 1811 … … 1826 1818 "static_triad" "static" \ 1827 1819 "closest_triad" "closest" \ 1828 "furthest_triad" "f urthest" \1820 "furthest_triad" "farthest" \ 1829 1821 "outer_edges" "outer" 1830 $itk_component(axismode) value "static"1831 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axis-mode]1822 $itk_component(axismode) value $_settings(-axismode) 1823 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode] 1832 1824 1833 1825 blt::table $inner \ 1834 0,0 $inner.visible -anchor w -cspan 2 \ 1835 1,0 $inner.labels -anchor w -cspan 2 \ 1836 2,0 $inner.xgrid -anchor w -cspan 2 \ 1837 3,0 $inner.ygrid -anchor w -cspan 2 \ 1838 4,0 $inner.zgrid -anchor w -cspan 2 \ 1839 5,0 $inner.mode_l -anchor w -cspan 2 -padx { 2 0 } \ 1840 6,0 $inner.mode -fill x -cspan 2 1826 0,0 $inner.visible -anchor w -cspan 4 \ 1827 1,0 $inner.labels -anchor w -cspan 4 \ 1828 2,0 $inner.minorticks -anchor w -cspan 4 \ 1829 4,0 $inner.grid_l -anchor w \ 1830 4,1 $inner.xgrid -anchor w \ 1831 4,2 $inner.ygrid -anchor w \ 1832 4,3 $inner.zgrid -anchor w \ 1833 5,0 $inner.mode_l -anchor w -padx { 2 0 } \ 1834 5,1 $inner.mode -fill x -cspan 3 1841 1835 1842 1836 blt::table configure $inner r* c* -resize none 1843 blt::table configure $inner r7 c 1-resize expand1844 } 1845 1837 blt::table configure $inner r7 c6 -resize expand 1838 blt::table configure $inner r3 -height 0.125i 1839 } 1846 1840 1847 1841 itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} { … … 1863 1857 0,0 $inner.view_l -anchor e -pady 2 \ 1864 1858 0,1 $inner.view -anchor w -pady 2 1859 blt::table configure $inner r0 -resize none 1865 1860 1866 1861 set labels { qx qy qz qw xpan ypan zoom } … … 1869 1864 label $inner.${tag}label -text $tag -font "Arial 9" 1870 1865 entry $inner.${tag} -font "Arial 9" -bg white \ 1871 -textvariable [itcl::scope _view($tag)] 1872 bind $inner.${tag} <KeyPress-Return> \ 1873 [itcl::code $this camera set ${tag}] 1866 -textvariable [itcl::scope _view(-$tag)] 1867 bind $inner.${tag} <Return> \ 1868 [itcl::code $this camera set -${tag}] 1869 bind $inner.${tag} <KP_Enter> \ 1870 [itcl::code $this camera set -${tag}] 1874 1871 blt::table $inner \ 1875 1872 $row,0 $inner.${tag}label -anchor e -pady 2 \ … … 1880 1877 checkbutton $inner.ortho \ 1881 1878 -text "Orthographic Projection" \ 1882 -variable [itcl::scope _view( ortho)] \1883 -command [itcl::code $this camera set ortho] \1879 -variable [itcl::scope _view(-ortho)] \ 1880 -command [itcl::code $this camera set -ortho] \ 1884 1881 -font "Arial 9" 1885 1882 blt::table $inner \ … … 1888 1885 incr row 1889 1886 1890 blt::table configure $inner c* r*-resize none1887 blt::table configure $inner c* -resize none 1891 1888 blt::table configure $inner c2 -resize expand 1892 1889 blt::table configure $inner r$row -resize expand … … 1905 1902 checkbutton $inner.visible \ 1906 1903 -text "Show Cutplanes" \ 1907 -variable [itcl::scope _settings( cutplaneVisible)] \1908 -command [itcl::code $this AdjustSetting cutplaneVisible] \1904 -variable [itcl::scope _settings(-cutplanevisible)] \ 1905 -command [itcl::code $this AdjustSetting -cutplanevisible] \ 1909 1906 -font "Arial 9" 1910 1907 1911 1908 checkbutton $inner.wireframe \ 1912 1909 -text "Show Wireframe" \ 1913 -variable [itcl::scope _settings( cutplaneWireframe)] \1914 -command [itcl::code $this AdjustSetting cutplaneWireframe] \1910 -variable [itcl::scope _settings(-cutplanewireframe)] \ 1911 -command [itcl::code $this AdjustSetting -cutplanewireframe] \ 1915 1912 -font "Arial 9" 1916 1913 1917 1914 checkbutton $inner.lighting \ 1918 1915 -text "Enable Lighting" \ 1919 -variable [itcl::scope _settings( cutplaneLighting)] \1920 -command [itcl::code $this AdjustSetting cutplaneLighting] \1916 -variable [itcl::scope _settings(-cutplanelighting)] \ 1917 -command [itcl::code $this AdjustSetting -cutplanelighting] \ 1921 1918 -font "Arial 9" 1922 1919 1923 1920 checkbutton $inner.edges \ 1924 1921 -text "Show Edges" \ 1925 -variable [itcl::scope _settings( cutplaneEdges)] \1926 -command [itcl::code $this AdjustSetting cutplaneEdges] \1922 -variable [itcl::scope _settings(-cutplaneedges)] \ 1923 -command [itcl::code $this AdjustSetting -cutplaneedges] \ 1927 1924 -font "Arial 9" 1928 1925 1929 1926 label $inner.opacity_l -text "Opacity" -font "Arial 9" 1930 1927 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1931 -variable [itcl::scope _settings( cutplaneOpacity)] \1928 -variable [itcl::scope _settings(-cutplaneopacity)] \ 1932 1929 -width 10 \ 1933 1930 -showvalue off \ 1934 -command [itcl::code $this AdjustSetting cutplaneOpacity]1935 $inner.opacity set $_settings( cutplaneOpacity)1931 -command [itcl::code $this AdjustSetting -cutplaneopacity] 1932 $inner.opacity set $_settings(-cutplaneopacity) 1936 1933 1937 1934 # X-value slicer... … … 1940 1937 -onimage [Rappture::icon x-cutplane-red] \ 1941 1938 -offimage [Rappture::icon x-cutplane-red] \ 1942 -command [itcl::code $this AdjustSetting cutplaneXVisible] \1943 -variable [itcl::scope _settings( cutplaneXVisible)]1939 -command [itcl::code $this AdjustSetting -cutplanexvisible] \ 1940 -variable [itcl::scope _settings(-cutplanexvisible)] 1944 1941 } 1945 1942 Rappture::Tooltip::for $itk_component(xCutButton) \ … … 1952 1949 -borderwidth 1 -highlightthickness 0 \ 1953 1950 -command [itcl::code $this EventuallySetCutplane x] \ 1954 -variable [itcl::scope _settings( cutplaneXPosition)] \1951 -variable [itcl::scope _settings(-cutplanexposition)] \ 1955 1952 -foreground red3 -font "Arial 9 bold" 1956 1953 } { … … 1969 1966 -onimage [Rappture::icon y-cutplane-green] \ 1970 1967 -offimage [Rappture::icon y-cutplane-green] \ 1971 -command [itcl::code $this AdjustSetting cutplaneYVisible] \1972 -variable [itcl::scope _settings( cutplaneYVisible)]1968 -command [itcl::code $this AdjustSetting -cutplaneyvisible] \ 1969 -variable [itcl::scope _settings(-cutplaneyvisible)] 1973 1970 } 1974 1971 Rappture::Tooltip::for $itk_component(yCutButton) \ … … 1981 1978 -borderwidth 1 -highlightthickness 0 \ 1982 1979 -command [itcl::code $this EventuallySetCutplane y] \ 1983 -variable [itcl::scope _settings( cutplaneYPosition)] \1980 -variable [itcl::scope _settings(-cutplaneyposition)] \ 1984 1981 -foreground green3 -font "Arial 9 bold" 1985 1982 } { … … 1998 1995 -onimage [Rappture::icon z-cutplane-blue] \ 1999 1996 -offimage [Rappture::icon z-cutplane-blue] \ 2000 -command [itcl::code $this AdjustSetting cutplaneZVisible] \2001 -variable [itcl::scope _settings( cutplaneZVisible)]1997 -command [itcl::code $this AdjustSetting -cutplanezvisible] \ 1998 -variable [itcl::scope _settings(-cutplanezvisible)] 2002 1999 } 2003 2000 Rappture::Tooltip::for $itk_component(zCutButton) \ … … 2010 2007 -borderwidth 1 -highlightthickness 0 \ 2011 2008 -command [itcl::code $this EventuallySetCutplane z] \ 2012 -variable [itcl::scope _settings( cutplaneZPosition)] \2009 -variable [itcl::scope _settings(-cutplanezposition)] \ 2013 2010 -foreground blue3 -font "Arial 9 bold" 2014 2011 } { … … 2047 2044 } 2048 2045 "set" { 2049 set wh o[lindex $args 0]2050 set x $_view($wh o)2046 set what [lindex $args 0] 2047 set x $_view($what) 2051 2048 set code [catch { string is double $x } result] 2052 2049 if { $code != 0 || !$result } { 2053 2050 return 2054 2051 } 2055 switch -- $wh o{2056 " ortho" {2057 if {$_view( ortho)} {2052 switch -- $what { 2053 "-ortho" { 2054 if {$_view($what)} { 2058 2055 SendCmd "camera mode ortho" 2059 2056 } else { … … 2061 2058 } 2062 2059 } 2063 " xpan" - "ypan" {2060 "-xpan" - "-ypan" { 2064 2061 PanCamera 2065 2062 } 2066 " qx" - "qy" - "qz" - "qw" {2067 set q [ list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]2063 "-qx" - "-qy" - "-qz" - "-qw" { 2064 set q [ViewToQuaternion] 2068 2065 $_arcball quaternion $q 2069 2066 EventuallyRotate $q 2070 2067 } 2071 " zoom" {2072 SendCmd "camera zoom $_view( zoom)"2068 "-zoom" { 2069 SendCmd "camera zoom $_view($what)" 2073 2070 } 2074 2071 } … … 2160 2157 } 2161 2158 array set settings $style 2159 StartBufferingCommands 2162 2160 SendCmd "streamlines add $tag" 2163 2161 SendCmd "streamlines seed visible off $tag" … … 2166 2164 set length [string length $seeds] 2167 2165 SendCmd "streamlines seed fmesh 200 data follows $length $tag" 2168 SendCmd "$seeds"2166 append _outbuf $seeds 2169 2167 set _seeds($dataobj) 1 2170 2168 } … … 2172 2170 SendCmd "polydata add $tag" 2173 2171 SendCmd "polydata colormode constant {} $tag" 2174 set _settings(volumeEdges) $settings(-edges) 2175 set _settings(volumeLighting) $settings(-lighting) 2176 set _settings(volumeOpacity) $settings(-opacity) 2177 set _settings(volumeWireframe) $settings(-wireframe) 2178 set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0] 2172 set _settings(-volumeedges) $settings(-edges) 2173 set _settings(-volumelighting) $settings(-lighting) 2174 set _settings(-volumeopacity) $settings(-opacity) 2175 set _settings(-volumewireframe) $settings(-wireframe) 2176 set _settings(-volumeopacity) [expr $settings(-opacity) * 100.0] 2177 StopBufferingCommands 2179 2178 SetColormap $dataobj $comp 2180 2179 } … … 2233 2232 set title $fname 2234 2233 } 2235 if { $_settings( legendVisible) } {2234 if { $_settings(-legendvisible) } { 2236 2235 set x [expr $w - 2] 2237 2236 if { [$c find withtag "legend"] == "" } { … … 2364 2363 "move" { 2365 2364 set axis [lindex $args 0] 2366 set oldval $_settings(axis-${axis}position)2367 2365 set newval [lindex $args 1] 2368 2366 if {[llength $args] != 2} { … … 2412 2410 invoke { 2413 2411 $itk_component(field) value $_curFldLabel 2414 AdjustSetting field2412 AdjustSetting -field 2415 2413 } 2416 2414 default { … … 2429 2427 bottom "0.707107 0.707107 0 0" 2430 2428 } 2431 foreach name { qw qx qyqz } value $positions($side) {2429 foreach name { -qw -qx -qy -qz } value $positions($side) { 2432 2430 set _view($name) $value 2433 2431 } 2434 set q [ list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]2432 set q [ViewToQuaternion] 2435 2433 $_arcball quaternion $q 2436 2434 SendCmd "camera orient $q" 2437 2435 SendCmd "camera reset" 2438 set _view( xpan) 02439 set _view( ypan) 02440 set _view( zoom) 1.02441 } 2436 set _view(-xpan) 0 2437 set _view(-ypan) 0 2438 set _view(-zoom) 1.0 2439 }
Note: See TracChangeset
for help on using the changeset viewer.