Changeset 6657
- Timestamp:
- Dec 5, 2016 12:58:07 PM (8 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/map.tcl
r6651 r6657 614 614 foreach key [array names styleinfo] { 615 615 set valid 0 616 foreach validkey {-ambient -color -edgecolor -edges -lighting -linewidth - vertscale -wireframe} {616 foreach validkey {-ambient -color -edgecolor -edges -lighting -linewidth -time -vertscale -wireframe} { 617 617 if {$key == $validkey} { 618 618 set valid 1 -
trunk/gui/scripts/mapviewer.tcl
r6563 r6657 92 92 private method Camera {option args} 93 93 private method Connect {} 94 private method ConvertTime { timeval } 94 95 private method CurrentLayers {args} 95 96 private method DisablePanningMouseBindings {} … … 2654 2655 } 2655 2656 2657 # Convert from Tcl integer epoch time value to hours as a double 2658 itcl::body Rappture::MapViewer::ConvertTime { timeval } { 2659 set hrs [clock format $timeval -format %k -gmt 1] 2660 set min [clock format $timeval -format %M -gmt 1] 2661 set sec [clock format $timeval -format %S -gmt 1] 2662 set val [expr {$hrs + $min/60.0 + $sec/3600.0}] 2663 } 2664 2656 2665 itcl::body Rappture::MapViewer::SetTerrainStyle { style } { 2657 2666 array set settings { … … 2662 2671 -lighting 1 2663 2672 -linewidth 1.0 2673 -time now 2664 2674 -vertscale 1.0 2665 2675 -wireframe 0 … … 2673 2683 SendCmd "map terrain color [Color2RGB $settings(-color)]" 2674 2684 #SendCmd "map terrain colormode constant" 2685 if {$settings(-time) eq "now"} { 2686 set settings(-time) [ConvertTime [clock seconds]] 2687 } else { 2688 set settings(-time) [ConvertTime [clock scan $settings(-time) -gmt 1]] 2689 } 2690 SendCmd "map time $settings(-time)" 2691 set _settings(time) $settings(-time) 2675 2692 SendCmd "map terrain lighting $settings(-lighting)" 2676 2693 set _settings(terrain-lighting) $settings(-lighting)
Note: See TracChangeset
for help on using the changeset viewer.