import { PlannerElementData, Rendering, Vector3, ViewPlannerConfig } from '@crystaldesign/web-planner-logic';
import PlannerUIHandler from '../UI/PlannerUI';
export default class Planner3DGrid {
    private readonly autoDockingDistance;
    private threeContainer;
    private doShow3DGrid;
    private updatePlannerTrans;
    private clearSelectionFrom3DGrid;
    private getAllPlannedElements;
    private groundPlane;
    private camera;
    private renderer;
    private scene;
    private sceneTree;
    private backgroundTex;
    private backGroundTexChanged;
    private canvasWidth;
    private canvasHeight;
    private moveIconPerspective;
    private rotateIconPerspective;
    private rotationCenter;
    private isTransforming;
    private transformWorldPosLastFrame;
    private curSelectedElement;
    private blenderPass;
    private composer;
    constructor(getPlannerViewConfig: () => ViewPlannerConfig, getAllPlannedElements: () => Map<string, PlannerElementData[]>);
    setCallbackMethods(updatePlannerTrans: (setId: string, plannerElementID: number, deltaMove: Vector3, deltaAngleDeg: number, rotCorrection: number, transState: 'START' | 'UPDATE' | 'END', autoDockingDistance: number) => void): void;
    /**
     * Initialize the 3D Grid
     * @param imageContainer    The imageContainer where the canvas is rendered into
     * @param canvasWidth       The width of the canvas
     * @param canvasHeight      The height of the canvas
     */
    initialize(canvasWidth: number, canvasHeight: number): void;
    /**
     * Destroy the whole Planner3D Grid and all three.js components
     */
    destroy(plannerUIHandler: PlannerUIHandler): void;
    /**
     * This function is called when the mouse is up - it clears the selection of the selected object
     * @param event
     */
    private onMouseUpClearSelection;
    /**
     * When this function is called the system computes the intersection with the ground plane
     */
    private getIntersectsGroundPlane;
    /**
     * Converts the  rotation from rendering information into the associated three rotation
     * @param unityQuat
     */
    private rotToThreeRot;
    /**
     * Converts the unity position into the three position
     * @param unityPos
     */
    private posToThreePos;
    /**
     * This function clears all objects in the three.js scene.
     */
    private clearSceneTree;
    /**
     * This function sets the camera transformation in the three.js scene the same like the camera in unity.
     * @param rendering     The rendering coming from Unity - it holds all informations to the camera transformation
     */
    private updateCamera;
    /**
     * This function updates the interaction icons movement and rotation
     * @param plannerElement    The planner element where the rotation and movement icon should be placed
     */
    private updateInteractionIcons;
    /**
     * Updates the planner Element and draws the svg icon on the ground. The selected element gets also rotation and translation icons
     * @param plannerElement
     * @param isSelectedElem
     */
    private updatePlannerElement;
    /**
     * This scene is called when a new Rendering is made. The whole scene Tree is updated and the SVGs are placed in the Tree.JS world
     * @param plannerElements
     */
    updateScene(plannerUIHandler: PlannerUIHandler, rendering: Rendering, curSelectedElement: PlannerElementData | undefined, plannerElementsDict: Map<string, PlannerElementData[]>, renderSize: {
        imgWidth: number;
        imgHeight: number;
    }): void;
    /**
     * Sets up the background scene (layermask of the rendering)
     * @param rendering
     */
    private initBackgroundScene;
    /**
     * Called when the movement starts
     * @param elementId     elementId of the current selected element
     */
    private startMove;
    /**
     * Called when movement is stopped
     */
    stopMove: (setId: string, elementId: number) => void;
    /**
     * Called when the rotation starts
     * @param elementId     elementId of the current selected element
     */
    private startRotation;
    /**
     * Called when rotation is stopped
     */
    stopRotation: (setId: string, elementId: number) => void;
    /**
     * Handles the translation of the ThreeSVG on the ground
     * @param screenPosX
     * @param screenPosY
     */
    private handleTranslation;
    /**
     * Handles the rotation of the ThreeSVG on the ground
     * @param screenPosX
     * @param screenPosY
     */
    private handleRotation;
    /**
     * This function returns true if the 3D Grid is currently in the transformation mode (translating or rotating)
     */
    isInTrasnformMode(): boolean;
    /**
     * This function is called when the 3D Grid should be shown. (User starts interaction with scene)
     */
    show3DGrid(): void;
    /**
     * This function is called when the 3D Grid should be hidden. (The user releases interaction - only 3D image is shown.)
     */
    hide3DGrid(): void;
    /**
     * This function is called to update the user Interface elements of the 3D Grid
     * @param curSelectedPlannerElement
     */
    updateUI(plannerUIHandler: PlannerUIHandler, curSelectedPlannerElement: PlannerElementData): void;
    private getPositionOfCanvasContainer;
    private convertWorldPosToScreenPos;
    /**
     * Render loop
     */
    run: () => void;
}
//# sourceMappingURL=Planner3DGrid.d.ts.map