import type { AABB } from '@antv/g';
import type { Node, OrthRouterOptions, Point } from '../../types';
export type Direction = 'N' | 'S' | 'W' | 'E' | null;
type Route = {
points: Point[];
direction: Direction;
};
/**
* 获取两点之间的正交线段路径
*
* Get orthogonal line segments between two points
* @param sourcePoint - 起始点 | start point
* @param targetPoint - 终止点 | end point
* @param sourceNode - 起始节点 | source node
* @param targetNode - 终止节点 | target node
* @param controlPoints - 控制点 | control points
* @param options - 配置项 | options
* @returns 路径点集 | vertices
*/
export declare function orth(sourcePoint: Point, targetPoint: Point, sourceNode: Node, targetNode: Node, controlPoints: Point[], options: OrthRouterOptions): import("../../types").Vector2[];
/**
* 获取两点之间的方向,从 `from` 到 `to` 的方向
*
* Get the direction between two points, the direction from `from` to `to`
* @param from - 起始点 | start point
* @param to - 终止点 | end point
* @returns 方向 | direction
*/
export declare function getDirection(from: Point, to: Point): Direction | null;
/**
* 获取包围盒的尺寸,根据方向返回宽度或者高度
*
* Get the size of the bounding box, return the width or height according to the direction
* @param bbox - 包围盒 | bounding box
* @param direction - 方向 | direction
* @returns 尺寸 | size
*/
export declare function getBBoxSize(bbox: AABB, direction: Direction): number;
/**
* 从一个点到另一个点计算正交路由
*
* Calculate orthogonal route from one point to another
* @param from - 起始点 | start point
* @param to - 终止点 | end point
* @param direction - 前一条线段的方向 | direction of the previous segment
* @returns 正交路由 | orthogonal route
*/
export declare function pointToPoint(from: Point, to: Point, direction: Direction): Route;
/**
* 从节点到点计算正交路由
*
* Calculate orthogonal route from node to point
* @param from - 起始点 | start point
* @param to - 终止点 | end point
* @param fromBBox - 起始节点的包围盒 | bounding box of the start node
* @returns 正交路由 | orthogonal route
*/
export declare function nodeToPoint(from: Point, to: Point, fromBBox: AABB): Route;
/**
* 从点到节点计算正交路由
*
* Calculate orthogonal route from point to node
* @param from - 起始点 | start point
* @param to - 终止点 | end point
* @param toBBox - 终止节点的包围盒 | bounding box of the end node
* @param direction - 前一条线段的方向 | direction of the previous segment
* @returns 正交路由 | orthogonal route
*/
export declare function pointToNode(from: Point, to: Point, toBBox: AABB, direction: Direction): Route;
/**
* 从节点到节点计算正交路由
*
* Calculate orthogonal route from node to node
* @param from - 起始点 | start point
* @param to - 终止点 | end point
* @param fromBBox - 起始节点的包围盒 | bounding box of the start node
* @param toBBox - 终止节点的包围盒 | bounding box of the end node
* @returns 正交路由 | orthogonal route
*/
export declare function nodeToNode(from: Point, to: Point, fromBBox: AABB, toBBox: AABB): Route;
/**
* 在两个节点内部计算路由
*
* Calculate route inside two nodes
* @param from - 起始点 | start point
* @param to - 终止点 | end point
* @param fromBBox - 起始节点的包围盒 | bounding box of the start node
* @param toBBox - 终止节点的包围盒 | bounding box of the end node
* @param direction - 方向 | direction
* @returns 正交路由 | orthogonal route
*/
export declare function insideNode(from: Point, to: Point, fromBBox: AABB, toBBox: AABB, direction?: Direction): Route;
/**
* 返回一个点 `p`,使得线段 p,p1 和 p,p2 互相垂直,p 尽可能不在给定的包围盒内
*
* Returns a point `p` where lines p,p1 and p,p2 are perpendicular and p is not contained in the given box
* @param p1 - 点 | point
* @param p2 - 点 | point
* @param bbox - 包围盒 | bounding box
* @returns 点 | point
*/
export declare function freeJoin(p1: Point, p2: Point, bbox: AABB): Point;
export {};