import { Matrix4, Vector3 } from "three";
import { Board } from "../../../DatabaseServices/Entity/Board";
import { Entity } from '../../../DatabaseServices/Entity/Entity';
import { ObjectId } from "../../../DatabaseServices/ObjectId";
import { TemplateRecord } from "../../../DatabaseServices/Template/TemplateRecord";
import { OBB } from "../../../Geometry/OBB/obb";
import { ISpaceParse } from "../../../Geometry/SpaceParse/ISpaceParse";
import { DoorStore } from "../../../UI/Store/DoorDrawerStore/DoorStore";
import { IDoorConfigOption, IDoorInfo } from "../../../UI/Store/DoorInterface";
import { BoardProcessOption } from "../../../UI/Store/OptionInterface/BoardProcessOption";
export type HingeType = "全盖铰链" | "半盖铰链" | "无盖铰链";
export declare class DrawDoorTool {
    private store;
    protected spaceParse: ISpaceParse;
    /**id模板对应表*/
    protected _idTempMap: Map<string, TemplateRecord>;
    protected colWidths: (number | string)[];
    protected rowHeighs: (number | string)[];
    protected isDrawVerBrS: boolean[];
    protected isDrawLayBrS: boolean[];
    protected surroundOption: BoardProcessOption;
    /** 每个格子的信息Map*/
    protected rowColIdMap: Map<string, IDoorInfo>;
    private hingeSet;
    protected option: IDoorConfigOption;
    protected doorInfos: IDoorInfo[];
    constructor(store: DoorStore, spaceParse: ISpaceParse);
    private GetHeightExpr;
    protected Init(): Promise<void>;
    Draw(): Promise<void>;
    protected AppendTemplateParam(name: string, value: number, des: string, temp: TemplateRecord, expr?: string): void;
    protected GetRootTemplate(): TemplateRecord;
    private CreatePositionSpaceTr;
    protected CreateHandleTr(info: IDoorInfo, doorTr: TemplateRecord): Promise<void>;
    protected GetHingeTemp(info: IDoorInfo, door: TemplateRecord): Promise<boolean>;
    /**
     * 设置五金(拉手 铰链)和板的关联切割
     * @param allEntitys 所有的实体 包括了门和五金
     * @param isUpDownDoor 上下开门 否为左右开门
     * @returns
     */
    protected RelativeMetalsToBoard(allEntitys: Entity[], isUpDownDoor: boolean, doorSpaceSize: Vector3, spaceOCS: Matrix4): boolean;
    getSpaceAllEnts(templateEntitys: Entity[]): (Entity | Board)[];
    protected GetDoorTemp(info: IDoorInfo): Promise<TemplateRecord>;
    protected SetOpenDir(doorsTemp: TemplateRecord, info: IDoorInfo): void;
    private GetBoardOpenDir;
    /**
     *上下偏移判断位置是否超出门板 或与其他层板碰撞 上下/左右 尝试n个单位后停止
     *
     * @private
     * @param {number} doorSpecs  门板高度/宽度
     * @param {Box3} inventedBox        铰链空间box  GetBoundingBoxInMtx
     * @param {Entity[]} checkEnts      判断碰撞板
     * @param {number} distance   一次偏移量
     * @param {Matrix4} ocs
     * @param {number} deviationNum     偏移次数  正负表方向 上下或左右
     * @return {*}  {number}
     * @memberof DrawDoorTool
     */
    private GetHingeMoveNum;
    private MoveAgain;
    /**
    * 获取铰链类型
    * @param thickness  与空间X向量平行相交板的厚度
    * @param doorExtend 门板延申距离
    * @returns HingeType
    */
    protected GetHingeType(thickness: number, doorExtend: number): HingeType;
}
/**
 * 设置未被分析铰链类型的铰链  都设置成无盖铰链
 * @param parseTypedHinges 已经解析了类型的铰链
 * @param hingeSet
 */
export declare function SetTypeHigneName(relativeDoors: Set<Entity>, allSpaceEnts: Entity[], isLROpen: boolean): void;
/**
 * @export
 * @param {OBB} obb
 * @param {Vector3} normalizeZ
 * @param {Matrix4} parentIntersectEntOCS
 * @param {boolean} isSweepSolid
 * @param {boolean} isDoor 门板类型不增加误差值
 * @return {*}  {OBB}
 */
export declare function getFuzzOBB(obb: OBB, normalizeZ: Vector3, parentIntersectEntOCS: Matrix4, isSweepSolid: boolean, isDoor: boolean): OBB;
/**
 * @param intersectEnts 这里规定是铰链列表
 * @param parentOCS 父空间的坐标系
 * @param ZNormal 铰链Z向量方向
 * @param isDoor 门板类型不参与obb误差计算
 * @param translate checkEnts偏移
 */
export declare function IsBoxAndEntitysIntersect(checkEnts: Entity[], intersectEnts: Entity[], ZNormal: Vector3, isDoor?: boolean, translate?: Vector3, parentIntersectEntOCS?: Matrix4, parentcheckEntOCS?: Matrix4): boolean;
/**
 * 特殊铰链模板（多个实体编组）
 * 防止 hingeSpace.GetParam("SY").value 被覆盖
 *
 * @param {Map<ObjectId, number>} hingeTr2Size_Map
 * @param {TemplateRecord} hingeTr
 * @param {number} sizeX 编组内size取最大的 (宽度?)
 * @return {*}  {boolean} 如果记录过了(并且尺寸比新来的大) 就返回true
 */
export declare function RecordHingeTrSizeX(hingeTr2Size_Map: Map<ObjectId, number>, hingeTr: TemplateRecord, sizeX: number): boolean;
//# sourceMappingURL=DrawDoorTool.d.ts.map