| 53 | } |
| 54 | |
| 55 | int32_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 | |
| 74 | std::shared_ptr<Spatial> Node::DetachChildAt(int32_t i) |
| 75 | { |
no test coverage detected