graphic-pixi/lib/utils/IntersectUtils.d.ts

120 lines
3.4 KiB
TypeScript
Raw Permalink Normal View History

2023-12-12 17:31:07 +08:00
import { IPointData, Rectangle } from 'pixi.js';
/**
* 线
* @param pa 线a端坐标
* @param pb 线b端坐标
* @param p
* @param lineWidth 线
* @param exact 使线线8
* @returns
*/
export declare function linePoint(pa: IPointData, pb: IPointData, p: IPointData, lineWidth: number, exact?: boolean): boolean;
/**
* 线
* @param points 线
* @param p
* @param lineWidth 线
*/
export declare function polylinePoint(points: IPointData[], p: IPointData, lineWidth: number): boolean;
/**
* 线线
* @param pa 线1a端坐标
* @param pb 线1b端坐标
* @param p1 线2a端坐标
* @param p2 线2b端坐标
* @returns
*/
export declare function lineLine(pa: IPointData, pb: IPointData, p1: IPointData, p2: IPointData): boolean;
/**
*
* @param p
* @param rect
* @returns
*/
export declare function pointBox(p: IPointData, rect: Rectangle): boolean;
/**
* 线
* @param pa 线a端坐标
* @param pb 线b端坐标
* @param rect
* @returns
*/
export declare function lineBox(pa: IPointData, pb: IPointData, rect: Rectangle): boolean;
/**
* 线
* @param points
* @param rect
* @returns false / 线
*/
export declare function polylineBox(points: IPointData[], rect: Rectangle): boolean;
/**
*
* @param p1
* @param p2
* @param tolerance
* @returns
*/
export declare function pointPoint2(p1: IPointData, p2: IPointData, tolerance: number): boolean;
/**
*
* @param x1
* @param y1
* @param x2
* @param y2
* @param tolerance /
* @returns
*/
export declare function pointPoint(x1: number, y1: number, x2: number, y2: number, tolerance: number): boolean;
/**
*
* @param x1
* @param y1
* @param x2
* @param y2
* @returns
*/
export declare function distance(x1: number, y1: number, x2: number, y2: number): number;
/**
*
* @param p1
* @param p2
* @returns
*/
export declare function distance2(p1: IPointData, p2: IPointData): number;
/**
*
* @param x1 x
* @param y1 y
* @param r1
* @param x2 x
* @param y2 y
* @returns
*/
export declare function circlePoint(x1: number, y1: number, r1: number, x2: number, y2: number): boolean;
/**
* --
*/
export declare function circlePoint2(x1: number, y1: number, r1: number, x2: number, y2: number, tolerance: number): boolean;
/**
*
*/
export declare function pointPolygon(p: IPointData, points: IPointData[], lineWidth: number): boolean;
/**
* 线
* @param p1
* @param p2
* @param points
* @param tolerance 线
* @returns
*/
export declare function linePolygon(p1: IPointData, p2: IPointData, points: IPointData[], lineWidth: number, polygonWidth: number): boolean;
/**
* 线
* @param polylinePoints 线
* @param polygonPoints
* @param polylineWidth 线线
* @param polygonWidth 线
* @returns
*/
export declare function polylinePolygon(polylinePoints: IPointData[], polygonPoints: IPointData[], polylineWidth: number, polygonWidth: number): boolean;