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

Method displaySelf

SRC/element/PML/PML2D.cpp:463–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461
462
463int
464PML2D::displaySelf(Renderer &theViewer, int displayMode, float fact, const char **modes, int numMode)
465{
466 // get the end point display coords
467 static Vector v1(3);
468 static Vector v2(3);
469 static Vector v3(3);
470 static Vector v4(3);
471 nodePointers[0]->getDisplayCrds(v1, fact, displayMode);
472 nodePointers[1]->getDisplayCrds(v2, fact, displayMode);
473 nodePointers[2]->getDisplayCrds(v3, fact, displayMode);
474 nodePointers[3]->getDisplayCrds(v4, fact, displayMode);
475
476 // place values in coords matrix
477 static Matrix coords(4, 3);
478 for (int i = 0; i < 3; i++) {
479 coords(0, i) = v1(i);
480 coords(1, i) = v2(i);
481 coords(2, i) = v3(i);
482 coords(3, i) = v4(i);
483 }
484
485 // fill RGB vector
486 static Vector values(4);
487 for (int i = 0; i < 4; i++)
488 values(i) = 1.0;
489
490 // draw the polygon
491 return theViewer.drawPolygon(coords, values, this->getTag());
492}
493
494Response*
495PML2D::setResponse(const char **argv, int argc, OPS_Stream &output)

Callers

nothing calls this directly

Calls 3

getDisplayCrdsMethod · 0.45
drawPolygonMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected