import { ModelNode, ModelNodePose } from './ModelNode'; import { Mat4 } from '@gglib/math'; export declare class ModelNodeHierarchy { /** * List of nodes sorted by their hierarchy */ readonly nodes: ReadonlyArray; /** * List of root node indices */ readonly roots: ReadonlyArray; /** * Gets the initial global transforms for all nodes. * * @remarks * These transforms are calculated once and cached. * If you need to recalculate these, use {@link update} */ get globalTransforms(): ReadonlyArray; /** * Gets the inverse of the {@link globalTransforms} * * @remarks * These transforms are calculated once and cached. * If you need to recalculate these, use {@link update} */ get globalInverseTransforms(): ReadonlyArray; private $globalTransform; private $globalInverse; constructor(nodes: ReadonlyArray, roots: ReadonlyArray); /** * Updates the {@link globalTransforms} and {@link globalInverseTransforms} */ update(): void; /** * Walks the node hierarchy and calls the visitor function for each node * * @param visitor - The visitor function */ walk(visitor: (node: ModelNode, index: number, parent: number) => void): void; /** * For each node it gets the locale node pose (translation, rotation, scale and matrix) * * @param out - Where the results should be written to (may be empty) * @returns the given out parameter */ calculateLocalPose(out: ModelNodePose[]): ModelNodePose[]; /** * For each node it calculates the absolute transform matrix * * @param out - Where the results should be written to (may be empty) * @returns the given out parameter */ calculateGlobalTransforms(out: Mat4[]): Mat4[]; /** * Walks the node hierarchy and calculates a global transform from given local pose state * * @param locals - List of local node poses (must match the node hierarchy) * @param out - Where the results should be written to (may be empty) */ updateGlobalTransforms(locals: ReadonlyArray, out: Mat4[]): Mat4[]; } //# sourceMappingURL=ModelNodeHierarchy.d.ts.map