- Timestamp:
- Nov 14, 2013, 3:44:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r3963 r4055 64 64 public method scale {args} 65 65 66 protected method CameraReset {} 66 67 protected method Connect {} 67 68 protected method CurrentDatasets {args} … … 288 289 -highlightthickness 0 \ 289 290 -image [Rappture::icon reset-view] \ 290 -command [itcl::code $this Zoom reset]291 -command [itcl::code $this CameraReset] 291 292 } { 292 293 usual … … 1150 1151 } 1151 1152 1153 itcl::body Rappture::VtkHeightmapViewer::CameraReset {} { 1154 array set _view { 1155 qw 0.36 1156 qx 0.25 1157 qy 0.50 1158 qz 0.70 1159 zoom 1.0 1160 xpan 0 1161 ypan 0 1162 } 1163 if { $_first != "" } { 1164 set location [$_first hints camera] 1165 if { $location != "" } { 1166 array set _view $location 1167 } 1168 } 1169 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1170 $_arcball quaternion $q 1171 if {$_settings(isHeightmap) } { 1172 DoRotate 1173 } 1174 SendCmd "camera reset" 1175 } 1176 1152 1177 # ---------------------------------------------------------------------- 1153 1178 # USAGE: Zoom in … … 1170 1195 "reset" { 1171 1196 array set _view { 1172 qw 0.361173 qx 0.251174 qy 0.501175 qz 0.701176 1197 zoom 1.0 1177 1198 xpan 0 1178 1199 ypan 0 1179 }1180 if { $_first != "" } {1181 set location [$_first hints camera]1182 if { $location != "" } {1183 array set _view $location1184 }1185 }1186 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]1187 $_arcball quaternion $q1188 if {$_settings(isHeightmap) } {1189 DoRotate1190 1200 } 1191 1201 SendCmd "camera reset" … … 1469 1479 SendCmd "dataset scalar $_curFldName" 1470 1480 SendCmd "heightmap colormode scalar $_curFldName" 1471 SendCmd "camera reset"1481 Zoom reset 1472 1482 UpdateContourList 1473 1483 DrawLegend … … 1549 1559 bind $c <ButtonRelease-1> {} 1550 1560 } 1551 SendCmd "camera reset"1561 Zoom reset 1552 1562 # Fix the mouse bindings for rotation/panning and the 1553 1563 # camera mode. Ideally we'd create a bindtag for these. … … 1645 1655 SendCmd "camera aspect native" 1646 1656 } 1657 Zoom reset 1647 1658 } 1648 1659 "wireframe" {
Note: See TracChangeset
for help on using the changeset viewer.