import { ECuboidLineDirection, ECuboidPlain, ECuboidPosition, EDragTarget, ECuboidDirection } from '@/constant/annotation'; import type { ICuboid, ICuboidConfig, ICuboidPosition, IDrawingCuboid, IPlanePoints } from '@/types/tool/cuboid'; /** * Get the basicInfo of cuboid-frontPoints. * @param param0 * @returns */ export declare function getPlanePointsBasicInfo({ tr, tl, br }: IPlanePoints): { width: number; height: number; centerPoints: { x: number; y: number; }; }; export declare function getCuboidBasicInfo({ frontPoints, backPoints, }: { frontPoints: IPlanePoints; backPoints: IPlanePoints; }): { frontCenter: { x: number; y: number; }; backCenter: { x: number; y: number; }; frontWidth: number; frontHeight: number; backWidth: number; backHeight: number; isLeftSide: boolean; }; /** * Use two diagonalPoints to create Regular Rect(Plain) * @param p1 * @param p2 * @returns */ export declare function getPlainPointsByDiagonalPoints(p1: ICoordinate, p2: ICoordinate): IPlanePoints; /** * Get the max external quadrilateral by points. * @param points * @returns */ export declare function getMaxExternalQuadrilateral(points: IPlanePoints): { tl: { x: any; y: any; }; tr: { x: any; y: any; }; bl: { x: any; y: any; }; br: { x: any; y: any; }; }; export declare function judgeCuboidLineIsRowOrColumn(pointList: [ICuboidPosition, ICuboidPosition]): ECuboidLineDirection | undefined; /** * Copy the plain through points and new bottomRightPoint. * @param param0 * @returns */ export declare function getPointsByBottomRightPoint({ coord, points, }: { coord: ICoordinate; points: IPlanePoints; }): IPlanePoints; /** * Copy the plain through points and new bottomLeftPoint. * * Notice: currentPoints is just regular rectangle. * * @param param0 * @returns */ export declare function getPointsByBottomLeftPoint({ coord, points, }: { coord: ICoordinate; points: IPlanePoints; }): IPlanePoints; /** * The showing sideline is line that connects the front and back planes. * @param param0 * @returns */ export declare function getCuboidShowingSideLine({ frontPoints, backPoints, }: { frontPoints: IPlanePoints; backPoints: IPlanePoints; }): { top: { p1: ICoordinate; p2: ICoordinate; }; bottom: { p1: ICoordinate; p2: ICoordinate; }; }; /** * Get the intersections from frontPoints & backPoints. * * @param param0 * @returns */ export declare function getPointsByIntersection({ frontPoints, backPoints, }: { frontPoints: IPlanePoints; backPoints: IPlanePoints; }): { backPoints: { bl: ICoordinate; tl: ICoordinate; br: ICoordinate; tr: ICoordinate; }; }; /** * When the point * @param frontPoints * @param backPoints */ export declare function getBackPointsByFrontPoints({ frontPoints, backPoints, }: { frontPoints: IPlanePoints; backPoints: IPlanePoints; }): { frontPoints: IPlanePoints; backPoints: { bl: ICoordinate; tl: ICoordinate; br: ICoordinate; tr: ICoordinate; }; }; export declare function getFrontPointsByBackPoints({ frontPoints, backPoints, }: { frontPoints: IPlanePoints; backPoints: IPlanePoints; }): { frontPoints: { bl: ICoordinate; tl: ICoordinate; br: ICoordinate; tr: ICoordinate; }; backPoints: IPlanePoints; }; /** * Get SideLine By FrontPoints & BackPoints * @param param0 * @returns */ export declare function getCuboidAllSideLine({ frontPoints, backPoints }: ICuboid): { p1: ICoordinate; p2: ICoordinate; }[]; export declare function getHighlightLines(cuboid: ICuboid): ({ p1: ICoordinate; p2: ICoordinate; positions: { plain: ECuboidPlain; position: ECuboidPosition; }[]; plain?: undefined; } | { p1: ICoordinate; p2: ICoordinate; plain: ECuboidPlain; positions: { plain: ECuboidPlain; position: ECuboidPosition; }[]; })[]; /** * Just showing the points which can be adjusted * @param cuboid * @returns */ export declare function getHighlightPoints(cuboid: ICuboid): { point: ICoordinate; positions: ICuboidPosition[]; }[]; /** * Get the range of Cuboid in 2D. * * @param param0 * @returns */ export declare function getCuboidHoverRange(cuboid: ICuboid): ICoordinate[]; /** * Notice: positions just support point and line moving. * @param param0 */ export declare function getNewPointsAfterOffset({ offset, frontPoints, backPoints, positions, }: { frontPoints: IPlanePoints; backPoints: IPlanePoints; offset: ICoordinate; positions?: ICuboidPosition[]; }): { frontPoints: IPlanePoints; backPoints: IPlanePoints; }; /** * Update cuboid when dragging. * @param param0 * @returns */ export declare function getCuboidDragMove({ offset, cuboid, dragTarget, positions, }: { offset: ICoordinate; cuboid: ICuboid; dragTarget: EDragTarget; positions?: ICuboidPosition[]; }): ICuboid | undefined; /** * Get the points of the corresponding faces by direction * @param cuboid * @returns */ export declare function getPointListsByDirection({ direction, frontPoints, backPoints, }: { direction: ECuboidDirection; frontPoints: IPlanePoints; backPoints: IPlanePoints; }): any[] | undefined; /** * Get the offset of toggleDirection Dom. * * Calculation * 1. FrontPoints left centerPoints. * 2. Offset the size of toggleDom. * @param param0 * @returns */ export declare function getToggleDirectionButtonOffset({ cuboid, currentPos, zoom, }: { cuboid: ICuboid; currentPos: ICoordinate; zoom: number; }): { left: number; top: number; }; /** * The default offset is base on iconSvg. * * @param param0 * @returns */ export declare function getCuboidTextAttributeOffset({ cuboid, currentPos, zoom, leftOffset, topOffset, }: { cuboid: ICuboid | IDrawingCuboid; currentPos: ICoordinate; zoom: number; leftOffset?: number; topOffset?: number; }): { left: number; top: number; }; /** * Judgement of minWidth & minHeight * @param param0 * @returns */ export declare function isCuboidWithInLimits({ cuboid, config }: { cuboid: ICuboid | IDrawingCuboid; config: ICuboidConfig; }): boolean;