Changeset 1219 for trunk/packages/vizservers
- Timestamp:
- Nov 17, 2008 2:18:41 PM (15 years ago)
- Location:
- trunk/packages/vizservers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Command.cpp
r1215 r1219 694 694 695 695 static int 696 Camera PanOp(ClientData cdata, Tcl_Interp *interp, int objc,696 CameraEyeOp(ClientData cdata, Tcl_Interp *interp, int objc, 697 697 Tcl_Obj *const *objv) 698 698 { 699 double dx, dy, dz; 700 if ((Tcl_GetDoubleFromObj(interp, objv[2], &dx) != TCL_OK) || 701 (Tcl_GetDoubleFromObj(interp, objv[3], &dy) != TCL_OK) || 702 (Tcl_GetDoubleFromObj(interp, objv[4], &dz) != TCL_OK)) { 703 return TCL_ERROR; 704 } 705 NanoVis::cam->aim(dx, dy, dz); 706 NanoVis::cam->x(dx); 707 NanoVis::cam->y(dy); 708 NanoVis::cam->z(dz); 699 float x, y, z; 700 if ((GetFloatFromObj(interp, objv[2], &x) != TCL_OK) || 701 (GetFloatFromObj(interp, objv[3], &y) != TCL_OK) || 702 (GetFloatFromObj(interp, objv[4], &z) != TCL_OK)) { 703 return TCL_ERROR; 704 } 705 NanoVis::cam->x(x); 706 NanoVis::cam->y(y); 707 NanoVis::cam->z(z); 709 708 return TCL_OK; 710 709 } … … 714 713 Tcl_Obj *const *objv) 715 714 { 716 doublex, y, z;717 if (( Tcl_GetDoubleFromObj(interp, objv[2], &x) != TCL_OK) ||718 ( Tcl_GetDoubleFromObj(interp, objv[3], &y) != TCL_OK) ||719 ( Tcl_GetDoubleFromObj(interp, objv[4], &z) != TCL_OK)) {715 float x, y, z; 716 if ((GetFloatFromObj(interp, objv[2], &x) != TCL_OK) || 717 (GetFloatFromObj(interp, objv[3], &y) != TCL_OK) || 718 (GetFloatFromObj(interp, objv[4], &z) != TCL_OK)) { 720 719 return TCL_ERROR; 721 720 } … … 753 752 {"aim", 2, CameraAimOp, 5, 5, "x y z",}, 754 753 {"angle", 2, CameraAngleOp, 5, 5, "xAngle yAngle zAngle",}, 755 {" pan", 1, CameraPanOp, 5, 5, "x y z",},754 {"eye", 1, CameraEyeOp, 5, 5, "x y z",}, 756 755 {"zoom", 1, CameraZoomOp, 3, 3, "factor",}, 757 756 }; -
trunk/packages/vizservers/nanovis/nanovis.cpp
r1215 r1219 170 170 // Variables for mouse events 171 171 172 // Object rotation angles 173 const float def_rot_x = 90.; 174 const float def_rot_y = 180.; 175 const float def_rot_z = -135; 176 177 // Object translation location from the origin 178 const float def_obj_x = -0.0; 179 const float def_obj_y = -0.0; 180 const float def_obj_z = -2.5; 172 // Default camera rotation angles. 173 const float def_rot_x = 90.0f; 174 const float def_rot_y = 180.0f; 175 const float def_rot_z = -135.0f; 176 177 // Default camera target. 178 const float def_target_x = 0.0f; 179 const float def_target_y = 0.0f; 180 const float def_target_z = 100.0f; 181 182 // Default camera location. 183 const float def_eye_x = -0.0f; 184 const float def_eye_y = -0.0f; 185 const float def_eye_z = -2.5f; 181 186 182 187 … … 877 882 //create the camera with default setting 878 883 cam = new NvCamera(0, 0, win_width, win_height, 879 def_ obj_x, def_obj_y, def_obj_z,880 0., 0., 100.,881 def_rot_x, def_rot_y, def_rot_z); 884 def_eye_x, def_eye_y, def_eye_z, /* location. */ 885 def_target_x, def_target_y, def_target_z, /* target. */ 886 def_rot_x, def_rot_y, def_rot_z); /* angle. */ 882 887 883 888 glEnable(GL_TEXTURE_2D); -
trunk/packages/vizservers/pymolproxy/pymolproxy.c
r1215 r1219 1139 1139 proxyPtr->invalidate_cache = 1; 1140 1140 if (x != 0.0) { 1141 Send(proxyPtr,"move x,%f\n", x * 0.0 05);1141 Send(proxyPtr,"move x,%f\n", x * 0.05); 1142 1142 } 1143 1143 if (y != 0.0) { 1144 Send(proxyPtr,"move y,%f\n", -y * 0.0 05);1144 Send(proxyPtr,"move y,%f\n", -y * 0.05); 1145 1145 } 1146 1146 return proxyPtr->status;
Note: See TracChangeset
for help on using the changeset viewer.