/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import type { MatterModel } from "./MatterModel.js"; import type { Model } from "./Model.js"; /** * Encapsulates parent/root state and tree operations for a {@link Model}. * * Replaces the three per-instance closures (adopt, reroot, disown) that were previously passed to ChildList, reducing * per-model allocation from 3 closures to 1 object. */ export declare class ModelTreePosition { #private; constructor(owner: Model); get parent(): Model> | undefined; get root(): MatterModel | undefined; /** * Adopt a child into this owner's tree. Removes from previous parent if necessary. */ adopt(child: Model): void; /** * Update the root reference for a child. Returns true if the root changed. */ reroot(child: Model, sharesRoot: boolean): boolean; /** * Disown a child from this owner. Returns true if the child was actually owned. */ disown(child: Model): boolean; } //# sourceMappingURL=ModelTreePosition.d.ts.map