/
SceneSelectionTesters.cpp
43 lines (34 loc) · 1.41 KB
/
SceneSelectionTesters.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "SceneSelectionTesters.h"
#include "iscenegraph.h"
#include "SelectionTestWalkers.h"
namespace selection
{
void PrimitiveSelectionTester::testSelectScene(const VolumeTest& view, SelectionTest& test, Selector& selector)
{
AnySelector anyTester(selector, test);
GlobalSceneGraph().foreachVisibleNodeInVolume(view, anyTester);
}
void EntitySelectionTester::testSelectScene(const VolumeTest& view, SelectionTest& test, Selector& selector)
{
EntitySelector tester(selector, test);
GlobalSceneGraph().foreachVisibleNodeInVolume(view, tester);
}
void GroupChildPrimitiveSelectionTester::testSelectScene(const VolumeTest& view, SelectionTest& test, Selector& selector)
{
GroupChildPrimitiveSelector tester(selector, test);
GlobalSceneGraph().foreachVisibleNodeInVolume(view, tester);
}
void MergeActionSelectionTester::testSelectScene(const VolumeTest& view, SelectionTest& test, Selector& selector)
{
MergeActionSelector tester(selector, test);
GlobalSceneGraph().foreachVisibleNodeInVolume(view, tester);
}
ComponentSelectionTester::ComponentSelectionTester(SelectionSystem& selectionSystem) :
_selectionSystem(selectionSystem)
{}
void ComponentSelectionTester::testSelectScene(const VolumeTest& view, SelectionTest& test, Selector& selector)
{
ComponentSelector selectionTester(selector, test, _selectionSystem.ComponentMode());
_selectionSystem.foreachSelected(selectionTester);
}
}