- Timestamp:
- Sep 10, 2013 9:25:31 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r3899 r3915 253 253 $this-streams 0 254 254 $this-volume 1 255 $this-ambient 20 256 $this-diffuse 80 257 $this-light2side 1 258 $this-opacity 100 259 $this-specularLevel 30 260 $this-specularExponent 90 261 $this-thickness 350 262 $this-transp 50 255 263 $this-cutplaneVisible 0 256 264 $this-xcutplane 1 … … 1256 1264 1257 1265 # Reset the camera and other view parameters 1258 InitSettings light2side light transp isosurface grid axes volume outline \ 1266 InitSettings light2side ambient diffuse specularLevel specularExponent \ 1267 transp isosurface grid axes volume outline \ 1259 1268 cutplaneVisible xcutplane ycutplane zcutplane 1260 1269 1261 1270 # nothing to send -- activate the proper volume 1262 1271 if {"" != $_first} { 1263 AdjustSetting light1264 AdjustSetting transp1265 1272 set axis [$_first hints updir] 1266 1273 if {"" != $axis} { … … 1639 1646 #ResetColormap $color 1640 1647 } 1641 light {1648 ambient { 1642 1649 if { $_first != "" } { 1643 1650 set comp [lindex [$_first components] 0] 1644 1651 set tag $_first-$comp 1645 set diffuse [expr {0.01*$_settings($this-light)}] 1646 set ambient [expr {1.0 - $diffuse}] 1647 set specularLevel 0.3 1648 set specularExp 90.0 1649 SendCmd "$tag configure -ambient $ambient -diffuse $diffuse -specularLevel $specularLevel -specularExp $specularExp" 1652 set val $_settings($this-ambient) 1653 set val [expr {0.01*$val}] 1654 SendCmd "$tag configure -ambient $val" 1655 } 1656 } 1657 diffuse { 1658 if { $_first != "" } { 1659 set comp [lindex [$_first components] 0] 1660 set tag $_first-$comp 1661 set val $_settings($this-diffuse) 1662 set val [expr {0.01*$val}] 1663 SendCmd "$tag configure -diffuse $val" 1664 } 1665 } 1666 specularLevel { 1667 if { $_first != "" } { 1668 set comp [lindex [$_first components] 0] 1669 set tag $_first-$comp 1670 set val $_settings($this-specularLevel) 1671 set val [expr {0.01*$val}] 1672 SendCmd "$tag configure -specularLevel $val" 1673 } 1674 } 1675 specularExponent { 1676 if { $_first != "" } { 1677 set comp [lindex [$_first components] 0] 1678 set tag $_first-$comp 1679 set val $_settings($this-specularExponent) 1680 SendCmd "$tag configure -specularExp $val" 1650 1681 } 1651 1682 } … … 2207 2238 2208 2239 itcl::body Rappture::FlowvisViewer::BuildVolumeTab {} { 2209 foreach { key value } {2210 light2side 12211 light 402212 transp 502213 opacity 1002214 thickness 3502215 } {2216 set _settings($this-$key) $value2217 }2218 2219 2240 set inner [$itk_component(main) insert end \ 2220 2241 -title "Volume Settings" \ … … 2237 2258 -command [itcl::code $this AdjustSetting light2side] 2238 2259 2239 label $inner. dim -text "Glow" -font $fg2240 ::scale $inner. light -from 0 -to 100 -orient horizontal \2241 -variable [itcl::scope _settings($this- light)] \2260 label $inner.ambient_l -text "Ambient" -font $fg 2261 ::scale $inner.ambient -from 0 -to 100 -orient horizontal \ 2262 -variable [itcl::scope _settings($this-ambient)] \ 2242 2263 -width 10 \ 2243 -showvalue off -command [itcl::code $this AdjustSetting light] 2244 label $inner.bright -text "Surface" -font $fg 2245 2246 label $inner.fog -text "Clear" -font $fg 2264 -showvalue off -command [itcl::code $this AdjustSetting ambient] 2265 2266 label $inner.diffuse_l -text "Diffuse" -font $fg 2267 ::scale $inner.diffuse -from 0 -to 100 -orient horizontal \ 2268 -variable [itcl::scope _settings($this-diffuse)] \ 2269 -width 10 \ 2270 -showvalue off -command [itcl::code $this AdjustSetting diffuse] 2271 2272 label $inner.specularLevel_l -text "Specular" -font $fg 2273 ::scale $inner.specularLevel -from 0 -to 100 -orient horizontal \ 2274 -variable [itcl::scope _settings($this-specularLevel)] \ 2275 -width 10 \ 2276 -showvalue off -command [itcl::code $this AdjustSetting specularLevel] 2277 2278 label $inner.specularExponent_l -text "Shininess" -font $fg 2279 ::scale $inner.specularExponent -from 10 -to 128 -orient horizontal \ 2280 -variable [itcl::scope _settings($this-specularExponent)] \ 2281 -width 10 \ 2282 -showvalue off -command [itcl::code $this AdjustSetting specularExponent] 2283 2284 label $inner.clear -text "Clear" -font $fg 2247 2285 ::scale $inner.transp -from 0 -to 100 -orient horizontal \ 2248 2286 -variable [itcl::scope _settings($this-transp)] \ 2249 2287 -width 10 \ 2250 2288 -showvalue off -command [itcl::code $this AdjustSetting transp] 2251 label $inner.plastic -text "Opaque" -font $fg2252 2253 label $inner.clear -text "Clear" -font $fg2254 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \2255 -variable [itcl::scope _settings($this-opacity)] \2256 -width 10 \2257 -showvalue off -command [itcl::code $this AdjustSetting opacity]2258 2289 label $inner.opaque -text "Opaque" -font $fg 2259 2290 … … 2297 2328 1,0 $inner.shading -cspan 4 -anchor w -pady {10 2} \ 2298 2329 2,0 $inner.light2side -cspan 4 -anchor w -pady 2 \ 2299 3,0 $inner.dim -anchor e -pady 2 \ 2300 3,1 $inner.light -cspan 2 -pady 2 -fill x \ 2301 3,3 $inner.bright -anchor w -pady 2 \ 2302 4,0 $inner.fog -anchor e -pady 2 \ 2303 4,1 $inner.transp -cspan 2 -pady 2 -fill x \ 2304 4,3 $inner.plastic -anchor w -pady 2 \ 2305 5,0 $inner.thin -anchor e -pady 2 \ 2306 5,1 $inner.thickness -cspan 2 -pady 2 -fill x\ 2307 5,3 $inner.thick -anchor w -pady 2 2330 3,0 $inner.ambient_l -anchor e -pady 2 \ 2331 3,1 $inner.ambient -cspan 3 -pady 2 -fill x \ 2332 4,0 $inner.diffuse_l -anchor e -pady 2 \ 2333 4,1 $inner.diffuse -cspan 3 -pady 2 -fill x \ 2334 5,0 $inner.specularLevel_l -anchor e -pady 2 \ 2335 5,1 $inner.specularLevel -cspan 3 -pady 2 -fill x \ 2336 6,0 $inner.specularExponent_l -anchor e -pady 2 \ 2337 6,1 $inner.specularExponent -cspan 3 -pady 2 -fill x \ 2338 7,0 $inner.clear -anchor e -pady 2 \ 2339 7,1 $inner.transp -cspan 2 -pady 2 -fill x \ 2340 7,3 $inner.opaque -anchor w -pady 2 \ 2341 8,0 $inner.thin -anchor e -pady 2 \ 2342 8,1 $inner.thickness -cspan 2 -pady 2 -fill x \ 2343 8,3 $inner.thick -anchor w -pady 2 2308 2344 2309 2345 blt::table configure $inner c0 c1 c3 r* -resize none 2310 blt::table configure $inner r 6-resize expand2346 blt::table configure $inner r9 -resize expand 2311 2347 } 2312 2348 -
trunk/gui/scripts/nanovisviewer.tcl
r3913 r3915 1758 1758 -variable [itcl::scope _settings($this-volume)] \ 1759 1759 -command [itcl::code $this AdjustSetting volume] 1760 1760 1761 label $inner.shading -text "Shading:" -font $fg 1761 1762 … … 1846 1847 7,3 $inner.opaque -anchor w -pady 2 \ 1847 1848 8,0 $inner.thin -anchor e -pady 2 \ 1848 8,1 $inner.thickness -cspan 2 -pady 2 -fill x \1849 8,1 $inner.thickness -cspan 2 -pady 2 -fill x \ 1849 1850 8,3 $inner.thick -anchor w -pady 2 1850 1851
Note: See TracChangeset
for help on using the changeset viewer.