| 33 | } |
| 34 | |
| 35 | inline 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 |
| 55 | inline scene::INodePtr findFirstBrush(const scene::INodePtr& parent, |
no test coverage detected