| 506 | |
| 507 | |
| 508 | int |
| 509 | PML2D_12::displaySelf(Renderer &theViewer, int displayMode, float fact, const char **modes, int numMode) |
| 510 | { |
| 511 | // get the end point display coords |
| 512 | static Vector v1(3); |
| 513 | static Vector v2(3); |
| 514 | static Vector v3(3); |
| 515 | static Vector v4(3); |
| 516 | nodePointers[0]->getDisplayCrds(v1, fact, displayMode); |
| 517 | nodePointers[1]->getDisplayCrds(v2, fact, displayMode); |
| 518 | nodePointers[2]->getDisplayCrds(v3, fact, displayMode); |
| 519 | nodePointers[3]->getDisplayCrds(v4, fact, displayMode); |
| 520 | |
| 521 | // place values in coords matrix |
| 522 | static Matrix coords(4, 3); |
| 523 | for (int i = 0; i < 3; i++) { |
| 524 | coords(0, i) = v1(i); |
| 525 | coords(1, i) = v2(i); |
| 526 | coords(2, i) = v3(i); |
| 527 | coords(3, i) = v4(i); |
| 528 | } |
| 529 | |
| 530 | // fill RGB vector |
| 531 | static Vector values(4); |
| 532 | for (int i = 0; i < 4; i++) |
| 533 | values(i) = 1.0; |
| 534 | |
| 535 | // draw the polygon |
| 536 | return theViewer.drawPolygon(coords, values, this->getTag()); |
| 537 | } |
| 538 | |
| 539 | Response* |
| 540 | PML2D_12::setResponse(const char **argv, int argc, OPS_Stream &output) |
nothing calls this directly
no test coverage detected