import { vec3 } from "./Math/Vector";
import { Bounds, MathTypes } from "./Math";
import { ICorePostProcessing } from "./PostprocessingTypes";
/** Type for two dimensional coordinates. */
export declare type ViewCoordinates = {
    x: number;
    y: number;
};
/** Type for pixel coordinates (on screen). */
export declare type PixelCoordinates = {
    x: number;
    y: number;
};
/** Type for three dimensional world coordinates */
export declare type WorldCoordinates = {
    x: number;
    y: number;
    z: number;
};
/** Type for three dimensional coordinates in a local coordinate system*/
export declare type LocalCoordinates = {
    x: number;
    y: number;
    z: number;
};
/** @deprecated Type for three dimensional rotation angles in a world coordinate system */
export declare type WorldRotation = {
    x: number;
    y: number;
    z: number;
};
/** @deprecated Type for three dimensional rotation angles in a local coordinate system */
export declare type LocalRotation = {
    x: number;
    y: number;
    z: number;
};
/** The origin of a line. */
export declare type Origin = {
    x: number;
    y: number;
    z: number;
};
/** The direction of a line. */
export declare type Direction = {
    x: number;
    y: number;
    z: number;
};
/** A ray, consisting of an origin and a direction */
export declare type Ray = {
    origin: Origin;
    direction: Direction;
};
/** Convenience function for creating a Ray, cloning the parameters */
export declare function createRay(origin: vec3, direction: vec3): Ray;
/** Convenience function for cloning a Ray */
export declare function cloneRay(ray: Ray): Ray;
export interface CollisionPair {
    first: string;
    second: string;
}
/** Information about collision of two components. If there is a collision, the collidingComponents Array will include all collisions. */
export declare type CollisionInformationColliding = {
    isColliding: true;
    collidingComponents: CollisionPair;
};
export declare type CollisionInformationNotColliding = {
    isColliding: false;
    collidingComponents: {
        first: undefined;
        second: undefined;
    };
};
export declare type CollisionInformation = CollisionInformationColliding | CollisionInformationNotColliding;
/** @deprecated Type for specifing that an angle is in radians */
export declare type Radians = number;
/** @deprecated Type for specifing that an angle is in degrees */
export declare type Degrees = number;
/** Type for explicitly refering to component ids as strings */
export declare type ComponentId = string;
/**
 * Returns the current Transformation of a component. Slightly smoothed for values near 0.
 * @param id the component id
 * @param setPositionCompatibility if true: ignore the movement of t3 itself, i.e.
 * @returns {Transformation}
 */
export declare function getWorldTransformation(id: ComponentId, setPositionCompatibility?: boolean): MathTypes.Transformation;
/** Representation of two-dimensional numbers. */
export declare class Float2 {
    x: number;
    y: number;
    constructor(x?: number, y?: number);
}
/** Same as Float2, but introduced for better compatibility with ThreeJS. */
export declare class Vector2 extends Float2 {
}
/** Representation of three-dimensional numbers. */
export declare class Float3 {
    x: number;
    y: number;
    z: number;
    constructor(x?: number, y?: number, z?: number);
    /**
     * Takes two Float3's and returns the sum of them.
     * @param s1 First summand
     * @param s2 Second summand
     */
    static add(s1: Float3, s2: Float3): Float3;
    /**
     * Compare two Float3's on equality (with optional deviation)
     * @param pF1 First Float3
     * @param pF2 Second Float3
     * @param pDeviation allowed deviation
     */
    static isEqual(pF1: Float3, pF2: Float3, pDeviation?: number): boolean;
}
/** Same as Float3, but introduced for better compatibility with Unity-3D. */
export declare class Vector3 extends Float3 {
}
/** Representation of RGB colors. */
export declare class ColorRGB {
    r: number;
    g: number;
    b: number;
    constructor(r?: number, g?: number, b?: number);
}
export declare type LoadUpdateData = {
    GeometryRedirections: any;
    ComId: string;
    superRootId: string;
    rootId: string;
    Error: string;
    Scene: string;
    Mode: "New" | "Geometry" | "Material";
};
/** Enumeration of ghost modes. */
export declare enum EGhostMode {
    /** No ghost. */
    None = "None",
    /** Global box. */
    Box = "Box",
    /** Hierarchy of boxes. */
    Boxes = "Boxes",
    /** 1:1 geometric representation. */
    Geometric = "Geometric",
    /** No display: if a ghost exists, do not display it but keep in scene */
    NoDisplay = "NoDisplay"
}
export declare const VisibleGhostModes: ReadonlyArray<EGhostMode>;
export interface Wall {
    id: string;
    leftNormal: WorldCoordinates;
    rightNormal: WorldCoordinates;
    isDuplicate: boolean;
    isLeftRoom: boolean;
    isRightRoom: boolean;
    isFront: boolean;
    isVisible: boolean;
    makeVisible(): void;
    makeInvisible(): void;
}
export interface IAbstractBounds {
    getDirectionBasePoint(): WorldCoordinates;
    getPoints(): WorldCoordinates[];
    getPlanes(): MathTypes.Plane[];
    getSegments(): MathTypes.PlaneSegment[];
    getDirections(): vec3[];
    getAxisAlignedBoundingBox(): Bounds;
    getSize(): vec3;
    intersectsBox(otherBox: IAbstractBounds): boolean;
}
/** Target positioning on a canvas for one view frame rectangle */
export interface IViewFrame {
    /** pixel offset from left */
    x: number;
    /** pixel offset from top */
    y: number;
    /** width in pixel */
    width: number;
    /** height in pixel */
    height: number;
}
/** Interface for a camera combined with a view frame. A camera view will be rendered to a part of the canvas. */
export interface ICameraView {
    /** The name of the view (copied from settings) */
    name: string;
    /** function to enable/disable cameraView and update things (e.g. lights) */
    setEnabled(enable: boolean): void;
    /** settings object */
    settings: ICameraViewSettings;
    /** camera instance (may be defined in IG.GFX.ThreeJS) */
    camera: any;
    /** (optional) the domElement to be used by orbitControls */
    domElement?: HTMLElement;
    /** (optional) orbitControls */
    orbitControls?: IOrbittingControl;
    /** set and update viewFrame */
    setFrame(viewFrame: IViewFrame): void;
    /** central postprocessing info */
    postprocessing?: ICorePostProcessing;
    /** disables postprocessing in view */
    exitPostprocessing(): void;
    /** enables postprocessing in view */
    enterPostprocessing(): void;
    /** updater function for lights moved relative to camera */
    updateLights(): void;
}
/** Definition of camera view settings. */
export interface ICameraViewSettings {
    /** The name of the view */
    name: string;
    /** The view rectangle */
    viewFrame: IViewFrame;
    /** if true the view is being rendered within the render loop */
    active: boolean;
    /** the background color of the view */
    backgroundColor: number;
    /** Defines the z-order if views are over lapping */
    zIndex: number;
}
/**
 * Blueprint of methods to be implemented by orbit controls.
 * PLEASE make sure that the "this"-context is correct.
 */
export interface IOrbittingControl {
    /** getters for coordinate points */
    getCameraPosition(): vec3;
    getTargetPoint(): vec3;
    getCameraUpVector(): vec3;
    /** setup position and target point at once */
    changeCameraPositionAndTarget(cameraPosition: vec3, target: vec3): void;
    changeCameraPosition(cameraPosition: vec3): void;
    changeTargetPoint(targetPoint: vec3): void;
    changeCameraUpVector(cameraUp: vec3): void;
    enabled: boolean;
    panCamera(xDelta: number, yDelta: number): void;
    /** rotate camera in position with delta angles */
    rotateCamera(azimuthDelta: number, elevationDelta: number): void;
    rotateCameraAbsolute(azimuth: number, elevation: number): void;
    mouseDown(event: MouseEvent): void;
    mouseMove(event: MouseEvent): void;
    mouseUp(event: MouseEvent): void;
    mouseWheel(event: WheelEvent): void;
    touchDown(event: TouchEvent): void;
    touchMove(event: TouchEvent): void;
    touchUp(event: TouchEvent): void;
    onStart(): void;
    onChange(): void;
    onEnd(): void;
}
export interface IRenderKnechtCameraSettings {
    /** "RENDERKNECHT_PERSPECTIVE" or "RENDERKNECHT_ORTHOGRAPHIC" */
    cameraMode: RenderKnechtCameraMode;
    /** prepare scene before rendering */
    onBeforeRendering?(): void;
    /** clean up after rendering is done */
    onAfterRendering?(): void;
    /** calculate camera target */
    getCameraTarget(): vec3;
    /** calculate camera position */
    getCameraPosition(): vec3;
    /** zoom for orthographic camera */
    cameraZoom: number;
}
export interface IRenderSceneToDataUrlOptions {
    /** if set, this will be added as background and the scene will be rendered as overlay */
    backgroundImage?: HTMLImageElement;
    /** size in pixel */
    size: {
        width: number;
        height: number;
    };
    /** image compression options, defaults to PNG file format */
    dataUrlOptions?: {
        type?: string | undefined;
        quality?: number;
    };
}
export interface IRenderKnechtDebuggingOptions {
    /** shows the internal canvas elements by setting style.top from 100% to 0.
     * depending on the containingElement */
    showCanvasElements?: boolean;
    /** when canvas elements are shown it may be useful to orbit */
    enableOrbitting?: boolean;
}
export interface IRenderKnecht {
    setDebuggingOptions(options: IRenderKnechtDebuggingOptions): void;
    setScene(scene: any): void;
    setContainingElement(containingElement: HTMLElement): void;
    renderSceneToBaseUrl(cameraSettings: IRenderKnechtCameraSettings, options: IRenderSceneToDataUrlOptions): Promise<string>;
}
export declare type RenderKnechtCameraMode = "RENDERKNECHT_PERSPECTIVE" | "RENDERKNECHT_ORTHOGRAPHIC";
export declare const RENDERKNECHT_PERSPECTIVE: RenderKnechtCameraMode;
export declare const RENDERKNECHT_ORTHOGRAPHIC: RenderKnechtCameraMode;
/** Base class for the camera setup */
export interface ICameraSetup {
    /** The near plane */
    near: number;
    /** The far plane */
    far: number;
    /** The camera position */
    position: vec3;
    /** The camera rotation */
    rotation: vec3;
    /** The point where camera looks at */
    lookAt: vec3;
}
/** Representing setup information for a perspective camera */
export declare class PerspCameraSetup implements ICameraSetup {
    near: number;
    far: number;
    position: vec3;
    rotation: vec3;
    lookAt: vec3;
    /** the left value of the ortho rectangle, defaults to 45 */
    fov: number;
}
/** Representing setup information for a OrthographicsCamera */
export declare class OrthoCameraSetup implements ICameraSetup {
    near: number;
    far: number;
    position: vec3;
    rotation: vec3;
    lookAt: vec3;
    /** The left value of the ortho rectangle, defaults to -5 */
    left: number;
    /** The right value of the ortho rectangle, defaults to 5 */
    right: number;
    /** The top value of the ortho rectangle, defaults to 5 */
    top: number;
    /** The bottom value of the ortho rectangle, defaults to -5 */
    bottom: number;
    /** Up vector of the camera */
    up: vec3;
}
/** Definition of settings for interaction controls. */
export interface IControlSettings {
    orbitType?: "OrthographicTrackball" | "Orbit";
    /** The domElement to be used by orbitControls */
    domElement: HTMLElement;
    /** */
    enabled?: boolean;
    /** */
    rotateSpeed?: number;
    /** */
    zoomSpeed?: number;
    /** */
    panSpeed?: number;
    /** */
    noRotate?: boolean;
    /** */
    noZoom?: boolean;
    /** */
    noPan?: boolean;
    /** */
    noRoll?: boolean;
    /** */
    staticMoving?: boolean;
    /** */
    dynamicDampingFactor?: number;
    /** */
    keys?: number[] | {
        LEFT: number;
        UP: number;
        RIGHT: number;
        BOTTOM: number;
    };
    minPolarAngle?: number;
    maxPolarAngle?: number;
    maxDistance?: number;
    minDistance?: number;
    forceRedrawOnUpdate?: boolean;
    /** IG remote option */
    remoteOnly?: boolean;
}
export declare enum CameraType {
    Perspective = 0,
    Orthographic = 1
}
/** Definition of position/rotation/lookat for camera and orbitcontrol
 *   These do not depend on viewportsizes etc and therefore can be restored
 */
export interface ICameraInScenePosition {
    /** optional: name of view, usefull for saving/restoring of positions */
    viewName?: string;
    /** Perspective or Orthographic, independant of ThreeJS enums */
    cameraType: CameraType;
    /** position of camera and orbitcontrol */
    position: vec3;
    /** position of target for orbit control, cameras have no useful lookat*/
    target?: vec3;
    /** rotation of camera */
    rotation: vec3;
    /** up vector of camera */
    up: vec3;
    /** Zoom factor for orthographic*/
    zoom: number;
}
/** describes a single view including camera pos etc for reading/writing to sessionstate etc */
export interface IRestoreableViewInfo {
    name: string;
    camSetup: ICameraSetup;
    pos: ICameraInScenePosition;
}
