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

Method DetachChildAt

GTE/Graphics/Node.cpp:74–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74std::shared_ptr<Spatial> Node::DetachChildAt(int32_t i)
75{
76 if (0 <= i && i < static_cast<int32_t>(mChild.size()))
77 {
78 std::shared_ptr<Spatial> child = mChild[i];
79 if (child)
80 {
81 child->SetParent(nullptr);
82 mChild[i] = nullptr;
83 }
84 return child;
85 }
86 return nullptr;
87}
88
89void Node::DetachAllChildren()
90{

Callers 1

CreateConfiguration0Method · 0.80

Calls 1

SetParentMethod · 0.80

Tested by

no test coverage detected