DisposeChildren removes and disposes of all children. If 'recurs' is true, call DisposeChildren on each child recursively.
(recurs bool)
| 465 | // DisposeChildren removes and disposes of all children. |
| 466 | // If 'recurs' is true, call DisposeChildren on each child recursively. |
| 467 | func (n *Node) DisposeChildren(recurs bool) { |
| 468 | |
| 469 | for pos, ichild := range n.children { |
| 470 | n.children[pos] = nil |
| 471 | ichild.GetNode().parent = nil |
| 472 | if recurs { |
| 473 | ichild.GetNode().DisposeChildren(true) |
| 474 | } |
| 475 | ichild.Dispose() |
| 476 | } |
| 477 | n.children = n.children[0:0] |
| 478 | } |
| 479 | |
| 480 | // SetPosition sets the position. |
| 481 | func (n *Node) SetPosition(x, y, z float32) { |