| 597 | } |
| 598 | |
| 599 | void RadiantSelectionSystem::selectPoint(SelectionTest& test, EModifier modifier, bool face) |
| 600 | { |
| 601 | // If the user is holding the replace modifiers (default: Alt-Shift), deselect the current selection |
| 602 | if (modifier == SelectionSystem::eReplace) { |
| 603 | if (face) { |
| 604 | setSelectedAllComponents(false); |
| 605 | } |
| 606 | else { |
| 607 | deselectAll(); |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | // The possible candidates are stored in the SelectablesSet |
| 612 | SelectablesList candidates; |
| 613 | |
| 614 | if (face) |
| 615 | { |
| 616 | SelectionPool selector; |
| 617 | |
| 618 | ComponentSelector tester(selector, test, ComponentSelectionMode::Face); |
| 619 | GlobalSceneGraph().foreachVisibleNodeInVolume(test.getVolume(), [&](const scene::INodePtr& node) |
| 620 | { |
| 621 | if (nodeCanBeSelectionTested(node)) |
| 622 | { |
| 623 | tester.testNode(node); |
| 624 | } |
| 625 | return true; |
| 626 | }); |
| 627 | |
| 628 | // Load them all into the vector |
| 629 | for (auto i = selector.begin(); i != selector.end(); ++i) |
| 630 | { |
| 631 | candidates.push_back(i->second); |
| 632 | } |
| 633 | } |
| 634 | else { |
| 635 | testSelectScene(candidates, test, test.getVolume(), getSelectionMode()); |
| 636 | } |
| 637 | |
| 638 | // Was the selection test successful (have we found anything to select)? |
| 639 | performPointSelection(candidates, modifier); |
| 640 | |
| 641 | onSelectionPerformed(); |
| 642 | } |
| 643 | |
| 644 | void RadiantSelectionSystem::setSelectionStatus(ISelectable* selectable, bool selected) |
| 645 | { |
no test coverage detected