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

Function selectLightPlaneAt320

test/Transformation.cpp:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void selectLightPlaneAt320(const scene::INodePtr& entityNode)
85{
86 // Select the plane on the "right"
87 auto planeSelectable = Node_getPlaneSelectable(entityNode);
88 EXPECT_TRUE(planeSelectable);
89
90 // Construct an orthoview to test-select the light
91 render::View view(false);
92 algorithm::constructCenteredOrthoview(view, Vector3(400, 0, 0));
93
94 SelectionVolume test = algorithm::constructOrthoviewSelectionTest(view);
95
96 selection::SingleItemSelector selector;
97 selection::SelectedPlaneSet selectedPlanes;
98 planeSelectable->selectPlanes(selector, test, std::bind(&selection::SelectedPlaneSet::insert, &selectedPlanes, std::placeholders::_1));
99
100 EXPECT_FALSE(selectedPlanes.empty()) << "Failed to select the light plane at X=+320";
101 EXPECT_TRUE(selectedPlanes.contains(Plane3(1, 0, 0, 320))) << "Failed to select the light plane at X=+320";
102
103 // Select that plane
104 selector.getSelectable()->setSelected(true);
105}
106
107// #5644: Non uniform light volume scaling not working - the origin is translated ever further off the screen
108TEST_F(TransformationTest, NonUniformLightDragResize)

Callers 1

TEST_FFunction · 0.85

Calls 9

Node_getPlaneSelectableFunction · 0.85
getSelectableMethod · 0.80
Plane3Class · 0.50
selectPlanesMethod · 0.45
emptyMethod · 0.45
containsMethod · 0.45
setSelectedMethod · 0.45

Tested by

no test coverage detected