/** * The MIT License (MIT) * * Copyright (c) 2012-2018 DragonBones team and other contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ import { BaseObject, BoundingBoxType } from "../core"; /** * - The base class of bounding box data. * @see dragonBones.RectangleData * @see dragonBones.EllipseData * @see dragonBones.PolygonData * @version DragonBones 5.0 * @language en_US */ /** * - 边界框数据基类。 * @see dragonBones.RectangleData * @see dragonBones.EllipseData * @see dragonBones.PolygonData * @version DragonBones 5.0 * @language zh_CN */ export declare abstract class BoundingBoxData extends BaseObject { /** * - The bounding box type. * @version DragonBones 5.0 * @language en_US */ /** * - 边界框类型。 * @version DragonBones 5.0 * @language zh_CN */ type: BoundingBoxType; /** * @private */ color: number; /** * @private */ width: number; /** * @private */ height: number; protected _onClear(): void; /** * - Check whether the bounding box contains a specific point. (Local coordinate system) * @version DragonBones 5.0 * @language en_US */ /** * - 检查边界框是否包含特定点。(本地坐标系) * @version DragonBones 5.0 * @language zh_CN */ abstract containsPoint(pX: number, pY: number): boolean; /** * - Check whether the bounding box intersects a specific segment. (Local coordinate system) * @version DragonBones 5.0 * @language en_US */ /** * - 检查边界框是否与特定线段相交。(本地坐标系) * @version DragonBones 5.0 * @language zh_CN */ abstract intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA: { x: number; y: number; } | null, intersectionPointB: { x: number; y: number; } | null, normalRadians: { x: number; y: number; } | null): number; } /** * - The rectangle bounding box data. * @version DragonBones 5.1 * @language en_US */ /** * - 矩形边界框数据。 * @version DragonBones 5.1 * @language zh_CN */ export declare class RectangleBoundingBoxData extends BoundingBoxData { static toString(): string; /** * - Compute the bit code for a point (x, y) using the clip rectangle */ private static _computeOutCode; /** * @private */ static rectangleIntersectsSegment(xA: number, yA: number, xB: number, yB: number, xMin: number, yMin: number, xMax: number, yMax: number, intersectionPointA?: { x: number; y: number; } | null, intersectionPointB?: { x: number; y: number; } | null, normalRadians?: { x: number; y: number; } | null): number; protected _onClear(): void; /** * @inheritDoc */ containsPoint(pX: number, pY: number): boolean; /** * @inheritDoc */ intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { x: number; y: number; } | null, intersectionPointB?: { x: number; y: number; } | null, normalRadians?: { x: number; y: number; } | null): number; } /** * - The ellipse bounding box data. * @version DragonBones 5.1 * @language en_US */ /** * - 椭圆边界框数据。 * @version DragonBones 5.1 * @language zh_CN */ export declare class EllipseBoundingBoxData extends BoundingBoxData { static toString(): string; /** * @private */ static ellipseIntersectsSegment(xA: number, yA: number, xB: number, yB: number, xC: number, yC: number, widthH: number, heightH: number, intersectionPointA?: { x: number; y: number; } | null, intersectionPointB?: { x: number; y: number; } | null, normalRadians?: { x: number; y: number; } | null): number; protected _onClear(): void; /** * @inheritDoc */ containsPoint(pX: number, pY: number): boolean; /** * @inheritDoc */ intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { x: number; y: number; } | null, intersectionPointB?: { x: number; y: number; } | null, normalRadians?: { x: number; y: number; } | null): number; } /** * - The polygon bounding box data. * @version DragonBones 5.1 * @language en_US */ /** * - 多边形边界框数据。 * @version DragonBones 5.1 * @language zh_CN */ export declare class PolygonBoundingBoxData extends BoundingBoxData { static toString(): string; /** * @private */ static polygonIntersectsSegment(xA: number, yA: number, xB: number, yB: number, vertices: Array, intersectionPointA?: { x: number; y: number; } | null, intersectionPointB?: { x: number; y: number; } | null, normalRadians?: { x: number; y: number; } | null): number; /** * @private */ x: number; /** * @private */ y: number; /** * - The polygon vertices. * @version DragonBones 5.1 * @language en_US */ /** * - 多边形顶点。 * @version DragonBones 5.1 * @language zh_CN */ readonly vertices: Array; protected _onClear(): void; /** * @inheritDoc */ containsPoint(pX: number, pY: number): boolean; /** * @inheritDoc */ intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { x: number; y: number; } | null, intersectionPointB?: { x: number; y: number; } | null, normalRadians?: { x: number; y: number; } | null): number; }