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

Function findFirstNode

test/algorithm/Scene.h:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35inline scene::INodePtr findFirstNode(const scene::INodePtr& parent,
36 const std::function<bool(const scene::INodePtr&)>& predicate)
37{
38 scene::INodePtr candidate;
39
40 parent->foreachNode([&](const scene::INodePtr& node)
41 {
42 if (!candidate && predicate(node))
43 {
44 candidate = node;
45 return false;
46 }
47
48 return true;
49 });
50
51 return candidate;
52}
53
54// Finds the first matching child brush of the given parent node matching the given predicate
55inline scene::INodePtr findFirstBrush(const scene::INodePtr& parent,

Callers 3

TEST_FFunction · 0.85
findNodeInLayerFunction · 0.85

Calls 1

foreachNodeMethod · 0.45

Tested by

no test coverage detected