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

Method record

SRC/tcl/TclFeViewer.cpp:274–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274int
275TclFeViewer::record(int cTag, double timeStamp)
276{
277
278#ifdef _NOGRAPHICS
279 // if no graphics .. just return 0
280 return 0;
281#else
282
283 if (theRenderer == 0)
284 return 0;
285
286
287 // theRenderer->displayModel(thetheEleMode, theNodeMode, theDisplayFact);
288
289 // loop over the elements getting each to display itself
290 // using theRenderer and displayTag as arguments.
291 // first clear the image
292 int res = 0;
293 // where relDeltaTTol is the maximum reliable ratio between analysis time step and deltaT
294 // and provides tolerance for floating point precision (see floating-point-tolerance-for-recorder-time-step.md)
295 if (deltaT == 0.0 || timeStamp - nextTimeStampToRecord >= -deltaT * relDeltaTTol) {
296
297 if (deltaT != 0.0)
298 nextTimeStampToRecord = timeStamp + deltaT;
299
300 if (wipeFlag == 1)
301 theRenderer->clearImage();
302
303 // set some quantities if not set
304 if (vrpSet == 0 || vpwindowSet == 0 || clippingPlaneDistancesSet == 0) {
305 const Vector &theBounds = theDomain->getPhysicalBounds();
306 double xAvg = (theBounds(0) + theBounds(3))/2.0;
307 double yAvg = (theBounds(1) + theBounds(4))/2.0;
308 double zAvg = (theBounds(2) + theBounds(5))/2.0;
309
310 if (vrpSet == 0)
311 this->setVRP(float(xAvg), float(yAvg), float(zAvg));
312
313 double diff, xDiff, yDiff, zDiff;
314 xDiff = (theBounds(3) - theBounds(0));
315 yDiff = (theBounds(4) - theBounds(1));
316 zDiff = (theBounds(5) - theBounds(2));
317 diff = xDiff;
318 if (yDiff > diff)
319 diff = yDiff;
320 if (zDiff > diff)
321 diff = zDiff;
322
323 diff *= 1.25 * 0.5;
324
325 if (vpwindowSet == 0)
326 this->setViewWindow(float(-diff),float(diff),float(-diff),float(diff));
327
328 if (clippingPlaneDistancesSet == 0) {
329 diff = sqrt(xDiff*xDiff + yDiff*yDiff + zDiff * zDiff);
330 this->setPlaneDist(float(diff),float(-diff));
331 }

Callers 4

displayModelMethod · 0.95
OPS_recordFunction · 0.45
recordFunction · 0.45

Calls 10

setVRPMethod · 0.95
setViewWindowMethod · 0.95
setPlaneDistMethod · 0.95
getNodesMethod · 0.80
clearImageMethod · 0.45
startImageMethod · 0.45
getElementsMethod · 0.45
displaySelfMethod · 0.45
getTagMethod · 0.45
doneImageMethod · 0.45