import { SceneNodeComponent } from './scenenodecomponent'; /** * This class describes a node in a scene hierarchy. To render a scene, a renderer can traverse the hierarchy * of SceneNodes, while recursively applying the transformations specfied by each node. * Every node contains components that describe the contents of the node, e.g. the contained geometry or the * applied transformation. */ export declare class SceneNode { /** @see {@link name} */ protected _name: string; /** @see {@link parent} */ protected _parent: SceneNode | undefined; /** @see {@link nodes} */ protected _nodes: SceneNode[]; /** @see {@link components} */ protected _components: SceneNodeComponent[]; /** * Constucts a new scene node * @param name - The name of the new node */ constructor(name: string); /** * Traverses the node hierarchy starting at this node and applies the given callback to each node. * @param callback - Function that will be called for each node in the tree. */ traverse(callback: SceneNode.NodeCallback): void; /** * Add a child node to this node. * @param node - The child that will be added */ addNode(node: SceneNode): SceneNode; /** * Add a component to this node. * @param component - Component to add */ addComponent(component: SceneNodeComponent): SceneNodeComponent; /** * Find all components of a specfic type that are registered on this node. * @param type - @todo Name of component type to search for */ componentsOfType(type: string): Array; /** * Read-only access to the name of this node. */ get name(): string; /** * Read-only access to the parent node of this node if one exists. */ get parent(): SceneNode | undefined; /** * Read-only access to the child nodes of this node. */ get nodes(): Array | undefined; /** * Read-only access to the components attached to this node. */ get components(): Array; /** * Returns whether this node is a leaf, i.e. there are no child nodes attached to it. */ get isLeaf(): boolean; /** * Returns whether this is the root node, i.e. it has no parent. */ get isRoot(): boolean; } export declare namespace SceneNode { interface NodeCallback { (node: SceneNode): void; } }