MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / DetachChild

Method DetachChild

GTE/Graphics/Node.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55int32_t Node::DetachChild(std::shared_ptr<Spatial> const& child)
56{
57 if (child)
58 {
59 int32_t i = 0;
60 for (auto& current : mChild)
61 {
62 if (current == child)
63 {
64 current->SetParent(nullptr);
65 current = nullptr;
66 return i;
67 }
68 ++i;
69 }
70 }
71 return -1;
72}
73
74std::shared_ptr<Spatial> Node::DetachChildAt(int32_t i)
75{

Callers 2

DetachMethod · 0.80
CreateConfiguration1Method · 0.80

Calls 1

SetParentMethod · 0.80

Tested by

no test coverage detected