| 461 | |
| 462 | |
| 463 | int |
| 464 | PML2D::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 | |
| 494 | Response* |
| 495 | PML2D::setResponse(const char **argv, int argc, OPS_Stream &output) |
nothing calls this directly
no test coverage detected