import { assertCanParent } from "./SceneNode.js";
export function isAncestor(ancestor, node) {
    return ancestor.isAncestorOf(node);
}
export function reparent(node, newParent, options = {}) {
    assertCanParent(newParent, node);
    newParent.addChild(node, options);
}
export function batchReparent(nodes, newParent, options = {}) {
    for (const node of nodes)
        reparent(node, newParent, options);
}
export function removeAllChildren(node) {
    const removed = [...node.children];
    for (const child of removed)
        node.removeChild(child);
    return removed;
}
//# sourceMappingURL=Hierarchy.js.map