- Timestamp:
- Mar 24, 2011, 9:16:33 PM (14 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/resultviewer.tcl
r2144 r2149 220 220 if {![info exists _mode2widget($mode)]} { 221 221 set w $itk_interior.vtkviewer 222 Rappture::VtkViewer $w 222 catch { Rappture::VtkViewer $w } errs 223 puts stderr errs=$errs 223 224 set _mode2widget($mode) $w 224 225 } -
trunk/gui/scripts/vtkviewer.tcl
r2148 r2149 477 477 xpos 1.73477e-06 ypos 74.7518 zpos -1.73477e-06 478 478 xviewup 5.38569e-16 yviewup 2.32071e-08 zviewup 1.0 479 xfocal 0.0 yfocal 0.0 zfocal 0.0 479 xfocal 0.0 yfocal 0.0 zfocal 0.0 480 angle 30 480 481 } 481 482 set dataobj [lindex $_dlist end] … … 483 484 array set camera [$dataobj hints camera] 484 485 } 486 if { [info exists camera(clipmin)] } { 487 $cam SetClippingRange $camera(clipmin) $camera(clipmax) 488 } 489 if { [info exists camera(parallelscale)] } { 490 $cam SetParallelScale $camera(parallelscale) 491 } 492 $cam SetViewAngle $camera(angle) 485 493 $cam SetFocalPoint $camera(xfocal) $camera(yfocal) $camera(zfocal) 486 494 $cam SetPosition $camera(xpos) $camera(ypos) $camera(zpos) … … 489 497 set _settings($this-$key) $camera($key) 490 498 } 499 $cam ComputeViewPlaneNormal 491 500 $_window Render 492 501 } … … 572 581 # ---------------------------------------------------------------------- 573 582 itcl::body Rappture::VtkViewer::_3dView {theta phi} { 583 return 574 584 set deg2rad 0.0174532927778 575 585 set xn [expr {sin($theta*$deg2rad)*cos($phi*$deg2rad)}] … … 907 917 pt [$cam GetFocalPoint] \ 908 918 up [$cam GetViewUp] \ 909 919 pos [$cam GetPosition] { 910 920 set _settings($this-${key}focal) $pt 911 921 set _settings($this-${key}up) $up 912 922 set _settings($this-${key}pos) $pos 913 923 } 924 foreach {min max} [$cam GetClippingRange] break 925 set _settings($this-clipmin) $min 926 set _settings($this-clipmax) $max 927 set _settings($this-parallelscale) [$cam GetParallelScale] 928 set _settings($this-angle) [$cam GetViewAngle] 929 foreach key { xpos ypos zpos xviewup yviewup zviewup 930 xfocal yfocal zfocal angle clipmin clipmax parallelscale 931 } { 932 set out($key) $_settings($this-$key) 933 } 934 puts \"[array get out]\" 914 935 } 915 936 … … 942 963 entry $inner.zfocal -bg white \ 943 964 -textvariable [itcl::scope _settings($this-zfocal)] 965 label $inner.anglel -text "View Angle" 966 entry $inner.angle -bg white \ 967 -textvariable [itcl::scope _settings($this-angle)] 968 label $inner.clipl -text "Clipping Range" 969 entry $inner.clipmin -bg white \ 970 -textvariable [itcl::scope _settings($this-clipmin)] 971 entry $inner.clipmax -bg white \ 972 -textvariable [itcl::scope _settings($this-clipmax)] 973 label $inner.pscalel -text "Parallel Scale" 974 entry $inner.pscale -bg white \ 975 -textvariable [itcl::scope _settings($this-parallelscale)] 944 976 945 977 button $inner.refresh -text "Refresh" \ … … 958 990 10,0 $inner.yfocal -pady 2 -fill x \ 959 991 11,0 $inner.zfocal -pady 2 -fill x \ 960 12,0 $inner.refresh 992 16,0 $inner.anglel -anchor w -pady 2 \ 993 17,0 $inner.angle -pady 2 -fill x \ 994 18,0 $inner.clipl -anchor w -pady 2 \ 995 19,0 $inner.clipmin -pady 2 -fill x \ 996 20,0 $inner.clipmax -pady 2 -fill x \ 997 21,0 $inner.pscalel -anchor w -pady 2 \ 998 22,0 $inner.pscale -pady 2 -fill x \ 999 23,0 $inner.refresh 961 1000 962 1001 blt::table configure $inner r* c* -resize none 963 1002 blt::table configure $inner c0 -resize expand 964 blt::table configure $inner r 13-resize expand1003 blt::table configure $inner r24 -resize expand 965 1004 } 966 1005
Note: See TracChangeset
for help on using the changeset viewer.