MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / selectPoint

Method selectPoint

radiantcore/selection/RadiantSelectionSystem.cpp:599–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599void 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
644void RadiantSelectionSystem::setSelectionStatus(ISelectable* selectable, bool selected)
645{

Callers 4

performSelectionTestMethod · 0.45
performPointSelectionMethod · 0.45
performSelectionTestMethod · 0.45
performPointSelectionMethod · 0.45

Calls 6

performPointSelectionFunction · 0.85
testNodeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected