MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / TclFeViewer_setPlaneDist

Function TclFeViewer_setPlaneDist

SRC/tcl/TclFeViewer.cpp:712–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710#endif
711}
712int
713TclFeViewer_setPlaneDist(ClientData clientData, Tcl_Interp *interp, int argc,
714 TCL_Char **argv)
715{
716#ifdef _NOGRAPHICS
717 // if no graphics .. just return 0
718 return TCL_OK;
719#else
720
721 // check destructor has not been called
722 if (theTclFeViewer == 0)
723 return TCL_OK;
724
725 // check num args
726 if (argc < 3) {
727 opserr << "WARNING args incorrect - dist near far \n";
728 return TCL_ERROR;
729 }
730 // get distances to near view and far planes
731 double anear, afar;
732 if (Tcl_GetDouble(interp, argv[1], &anear) != TCL_OK) {
733 opserr << "WARNING invalid near - vup near far\n";
734 return TCL_ERROR;
735 }
736 if (Tcl_GetDouble(interp, argv[2], &afar) != TCL_OK) {
737 opserr << "WARNING invalid far - vup near far\n";
738 return TCL_ERROR;
739 }
740
741 theTclFeViewer->setPlaneDist(float(anear),float(afar));
742 return TCL_OK;
743#endif
744}
745
746int
747TclFeViewer_setProjectionMode(ClientData clientData, Tcl_Interp *interp, int argc,

Callers

nothing calls this directly

Calls 1

setPlaneDistMethod · 0.45

Tested by

no test coverage detected