Changeset 4315 for trunk/packages/vizservers
- Timestamp:
- Apr 2, 2014, 12:27:36 AM (10 years ago)
- Location:
- trunk/packages/vizservers/geovis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/geovis/Renderer.cpp
r4313 r4315 984 984 void Renderer::zoomCamera(double z) 985 985 { 986 TRACE("Enter: z: %g ", z);986 TRACE("Enter: z: %g camDist: %g", z, _manipulator->getDistance()); 987 987 988 988 if (_manipulator.valid()) { … … 992 992 double dist = _manipulator->getDistance(); 993 993 dist *= (1.0 + z); 994 _manipulator->setDistance(dist); 995 996 _needsRedraw = true; 997 } 998 } 999 1000 /** 1001 * \brief Dolly camera to set distance from focal point 1002 * 1003 * \param[in] dist distance in map? coordinates 1004 */ 1005 void Renderer::setCameraDistance(double dist) 1006 { 1007 TRACE("Enter: dist: %g camDist: %g", dist, _manipulator->getDistance()); 1008 1009 if (_manipulator.valid()) { 994 1010 _manipulator->setDistance(dist); 995 1011 -
trunk/packages/vizservers/geovis/Renderer.h
r4313 r4315 319 319 void zoomCamera(double z); 320 320 321 void setCameraDistance(double dist); 322 321 323 // Keyboard events 322 324 -
trunk/packages/vizservers/geovis/RendererCmd.cpp
r4313 r4315 329 329 330 330 static int 331 CameraSetDistanceOp(ClientData clientData, Tcl_Interp *interp, int objc, 332 Tcl_Obj *const *objv) 333 { 334 double dist; 335 336 if (Tcl_GetDoubleFromObj(interp, objv[2], &dist) != TCL_OK) { 337 return TCL_ERROR; 338 } 339 340 g_renderer->setCameraDistance(dist); 341 return TCL_OK; 342 } 343 344 static int 331 345 CameraZoomOp(ClientData clientData, Tcl_Interp *interp, int objc, 332 Tcl_Obj *const *objv)346 Tcl_Obj *const *objv) 333 347 { 334 348 double z; … … 343 357 344 358 static CmdSpec cameraOps[] = { 359 {"dist", 1, CameraSetDistanceOp, 3, 3, "dist"}, 345 360 {"get", 1, CameraGetViewpointOp, 2, 2, ""}, 346 361 {"orient", 1, CameraOrientOp, 6, 6, "qw qx qy qz"},
Note: See TracChangeset
for help on using the changeset viewer.