======================================================================= display =======================================================================
| 552 | // display |
| 553 | // ======================================================================= |
| 554 | int PML3D::displaySelf(Renderer& theViewer, int displayMode, float fact, const char** modes, int numMode) |
| 555 | { |
| 556 | // Get the end point display coords |
| 557 | static Vector v1(3); |
| 558 | static Vector v2(3); |
| 559 | static Vector v3(3); |
| 560 | static Vector v4(3); |
| 561 | static Vector v5(3); |
| 562 | static Vector v6(3); |
| 563 | static Vector v7(3); |
| 564 | static Vector v8(3); |
| 565 | nodePointers[0]->getDisplayCrds(v1, fact, displayMode); |
| 566 | nodePointers[1]->getDisplayCrds(v2, fact, displayMode); |
| 567 | nodePointers[2]->getDisplayCrds(v3, fact, displayMode); |
| 568 | nodePointers[3]->getDisplayCrds(v4, fact, displayMode); |
| 569 | nodePointers[4]->getDisplayCrds(v5, fact, displayMode); |
| 570 | nodePointers[5]->getDisplayCrds(v6, fact, displayMode); |
| 571 | nodePointers[6]->getDisplayCrds(v7, fact, displayMode); |
| 572 | nodePointers[7]->getDisplayCrds(v8, fact, displayMode); |
| 573 | |
| 574 | // place values in coords matrix |
| 575 | static Matrix coords(8, 3); |
| 576 | for (int i = 0; i < 3; i++) { |
| 577 | coords(0, i) = v1(i); |
| 578 | coords(1, i) = v2(i); |
| 579 | coords(2, i) = v3(i); |
| 580 | coords(3, i) = v4(i); |
| 581 | coords(4, i) = v5(i); |
| 582 | coords(5, i) = v6(i); |
| 583 | coords(6, i) = v7(i); |
| 584 | coords(7, i) = v8(i); |
| 585 | } |
| 586 | |
| 587 | // fill RGB vector |
| 588 | static Vector values(8); |
| 589 | for (int i = 0; i < 8; i++) |
| 590 | values(i) = 1.0; |
| 591 | |
| 592 | // draw the cube |
| 593 | return theViewer.drawCube(coords, values, this->getTag()); |
| 594 | } |
| 595 | |
| 596 | // ======================================================================= |
| 597 | // setresponse |
nothing calls this directly
no test coverage detected