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

Method YsVisual

SRC/recorder/YsVisual.cpp:21–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19//////////////////////////////////////////////////////////////////////
20
21YsVisual::YsVisual(Element *theEle, const char *title, double scale,
22 int xLoc, int yLoc, int width, int height)
23 :Recorder(RECORDER_TAGS_YsVisual),
24 pView(0), theMap(0), displayMode(0)
25{
26 const char *argv[1] = {"ysVisual"};
27 Information eleInfo(1);
28 Response *theResponse = 0;
29
30 ysEle = theEle;
31
32 theResponse = theEle->setResponse(argv, 1, eleInfo);
33
34 if(theResponse)
35 displayMode = theResponse->getResponse();
36 else
37 opserr << "YsVisual only works on elements derived from InelasticYS2DGNL\n";
38
39#ifdef _GLX
40 theMap = new PlainMap();
41 pView = new OpenGLRenderer(title, xLoc, yLoc, width, height, *theMap);
42#endif
43
44#ifdef _X11
45 if(!pView) //_GLX and _X11 both defined
46 {
47 theMap = new PlainMap();
48 pView = new X11Renderer(title, xLoc, yLoc, width, height, *theMap);
49 }
50#endif
51
52 if(pView)
53 {
54 pView->setVRP(0.0, 0.0, 0.0);
55 pView->setVPN(0.0, 0.0, 1.0);
56 pView->setVUP(0.0, 1.0, 0.0);
57 pView->setFillMode("wire"); // wire mode
58 pView->setPlaneDist(1.0, -1.0);
59 pView->setPRP(0.0, 0.0, 10.0);
60 pView->setPortWindow(-1, 1, -1, 1); // use the whole window
61
62 pView->setViewWindow(-scale, scale, -scale, scale);
63
64 pView->clearImage();
65 pView->doneImage();
66 }
67 else
68 opserr << "WARNING: YsVisual::createView - Renderer not available\n";
69
70}
71
72YsVisual::~YsVisual()
73{

Callers

nothing calls this directly

Calls 12

setResponseMethod · 0.45
getResponseMethod · 0.45
setVRPMethod · 0.45
setVPNMethod · 0.45
setVUPMethod · 0.45
setFillModeMethod · 0.45
setPlaneDistMethod · 0.45
setPRPMethod · 0.45
setPortWindowMethod · 0.45
setViewWindowMethod · 0.45
clearImageMethod · 0.45
doneImageMethod · 0.45

Tested by

no test coverage detected