| 556 | |
| 557 | |
| 558 | int |
| 559 | TclFeViewer_setVRP(ClientData clientData, Tcl_Interp *interp, int argc, |
| 560 | TCL_Char **argv) |
| 561 | { |
| 562 | #ifdef _NOGRAPHICS |
| 563 | // if no graphics .. just return 0 |
| 564 | return TCL_OK; |
| 565 | #else |
| 566 | // check destructor has not been called |
| 567 | if (theTclFeViewer == 0) |
| 568 | return TCL_OK; |
| 569 | |
| 570 | // ensure corrcet num arguments |
| 571 | if (argc < 4) { |
| 572 | opserr << "WARNING args incorrect - vrp xloc yloc zloc \n"; |
| 573 | return TCL_ERROR; |
| 574 | } |
| 575 | |
| 576 | // get the xLoc, yLoc and zLoc |
| 577 | double xLoc, yLoc, zLoc; |
| 578 | if (Tcl_GetDouble(interp, argv[1], &xLoc) != TCL_OK) { |
| 579 | opserr << "WARNING invalid x_loc - vrp x_loc y_loc z_loc\n"; |
| 580 | return TCL_ERROR; |
| 581 | } |
| 582 | if (Tcl_GetDouble(interp, argv[2], &yLoc) != TCL_OK) { |
| 583 | opserr << "WARNING invalid y_loc - vrp x_loc y_loc z_loc\n"; |
| 584 | return TCL_ERROR; |
| 585 | } |
| 586 | if (Tcl_GetDouble(interp, argv[3], &zLoc) != TCL_OK) { |
| 587 | opserr << "WARNING invalid z_loc - vrp x_loc y_loc z_loc\n"; |
| 588 | return TCL_ERROR; |
| 589 | } |
| 590 | |
| 591 | theTclFeViewer->setVRP(float(xLoc),float(yLoc),float(zLoc)); |
| 592 | return TCL_OK; |
| 593 | #endif |
| 594 | } |
| 595 | |
| 596 | int |
| 597 | TclFeViewer_setVPN(ClientData clientData, Tcl_Interp *interp, int argc, |