/**
 * @module vim-loader
 */
import * as THREE from 'three';
import { Mesh, Submesh } from './mesh';
import { Vim } from './vim';
import { InsertableMesh } from './progressive/insertableMesh';
import { InstancedMesh } from './progressive/instancedMesh';
import { ModelMaterial } from './materials/viewerMaterials';
/**
 * Interface for a renderer object, providing methods to add and remove objects from a scene, update bounding boxes, and notify scene updates.
 */
export interface IRenderer {
    add(scene: Scene | THREE.Object3D): any;
    remove(scene: Scene): any;
    updateBox(box: THREE.Box3): any;
    notifySceneUpdate(): any;
}
/**
 * Represents a scene that contains multiple meshes.
 * It tracks the global bounding box as meshes are added and maintains a mapping between g3d instance indices and meshes.
 */
export declare class Scene {
    private _renderer;
    private _vim;
    private _matrix;
    insertables: InsertableMesh[];
    meshes: (Mesh | InsertableMesh | InstancedMesh)[];
    private _outlineCount;
    private _boundingBox;
    private _averageBoundingBox;
    private _instanceToMeshes;
    private _material;
    constructor(matrix: THREE.Matrix4);
    setDirty(): void;
    hasOutline(): boolean;
    addOutline(): void;
    removeOutline(): void;
    clearUpdateFlag(): void;
    /**
     * Returns the scene bounding box. Returns undefined if scene is empty.
     */
    getBoundingBox(target?: THREE.Box3): THREE.Box3;
    /**
     * Returns the bounding box of the average center of all meshes.
     * Less precise but is more stable against outliers.
     */
    getAverageBoundingBox(): THREE.Box3;
    updateBox(box: THREE.Box3): void;
    getMemory(): number;
    /**
     * Returns the THREE.Mesh in which this instance is represented along with index
     * For merged mesh, index refers to submesh index
     * For instanced mesh, index refers to instance index.
     */
    getMeshFromInstance(instance: number): Submesh[];
    getMeshesFromInstances(instances: number[] | undefined): Submesh[];
    get renderer(): IRenderer;
    set renderer(value: IRenderer);
    get vim(): Vim;
    /**
     * Sets vim index for this scene and all its THREE.Meshes.
     */
    set vim(value: Vim);
    addSubmesh(submesh: Submesh): void;
    /**
     * Add an instanced mesh to the Scene and recomputes fields as needed.
     * @param mesh Is expected to have:
     * userData.instances = number[] (indices of the g3d instances that went into creating the mesh)
     * userData.boxes = THREE.Box3[] (bounding box of each instance)
     */
    addMesh(mesh: Mesh | InsertableMesh | InstancedMesh): this;
    /**
     * Adds the content of other Scene to this Scene and recomputes fields as needed.
     */
    merge(other: Scene): this;
    /**
     * Gets the current material override or undefined if none.
     */
    get material(): ModelMaterial;
    /**
     * Sets and apply a material override to the scene, set to undefined to remove override.
     */
    set material(value: ModelMaterial);
    /**
     * Unloads and disposes all meshes and leaves the scene ready to add new ones.
     */
    clear(): void;
    /**
     * Disposes of all resources.
     */
    dispose(): void;
}
