import '../../../assert/js/assert.js';
import '../../../globals.js';
import Range from '../../../dot/js/Range.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Shape } from '../../../kite/js/imports.js';
export default class LinearEdge {
    readonly startPoint: Vector2;
    readonly endPoint: Vector2;
    readonly containsFakeCorner: boolean;
    constructor(startPoint: Vector2, endPoint: Vector2, containsFakeCorner?: boolean);
    static fromPolygon(polygon: Vector2[]): LinearEdge[];
    static fromPolygons(polygons: Vector2[][]): LinearEdge[];
    /**
     * Returns a simplified version of the edges as a list of polygons.
     *
     * NOTE: This is a low-performance method, mainly intended for debugging display.
     */
    static toPolygons(edges: LinearEdge[], epsilon?: number): Vector2[][];
    /**
     * Detects edges that are exact opposites of other edges, and returns a new list of edges with those removed.
     */
    static withOppositesRemoved(edges: LinearEdge[], epsilon?: number): LinearEdge[];
    /**
     * Detects ANY "opposite-direction" overlap between edges, and returns a new list of edges with those removed.
     *
     * NOTE: This is a low-performance method, mainly intended for debugging display.
     */
    static withOverlappingRemoved(edges: LinearEdge[], epsilon?: number): LinearEdge[];
    /**
     * Returns a simplified version of the polygons as a kite Shape.
     *
     * TODO: perhaps... move something like this to kite?
     *
     * NOTE: This is a low-performance method, mainly intended for debugging display.
     */
    static polygonsToShape(polygons: Vector2[][]): Shape;
    static evaluateLineIntegralShoelaceArea(p0x: number, p0y: number, p1x: number, p1y: number): number;
    static evaluateLineIntegralArea(p0x: number, p0y: number, p1x: number, p1y: number): number;
    /**
     * If you take the sum of these for a closed polygon and DIVIDE IT by the area, it should be the centroid of the
     * polygon.
     */
    static evaluateLineIntegralPartialCentroid(p0x: number, p0y: number, p1x: number, p1y: number): Vector2;
    static evaluateLineIntegralZero(p0x: number, p0y: number, p1x: number, p1y: number): number;
    static evaluateLineIntegralDistance(p0x: number, p0y: number, p1x: number, p1y: number): number;
    /**
     * If you take the sum of these for a closed polygon, it should be the area of the polygon.
     */
    getLineIntegralArea(): number;
    /**
     * If you take the sum of these for a closed polygon, it should be zero (used to check computations).
     */
    getLineIntegralZero(): number;
    serialize(): SerializedLinearEdge;
    static deserialize(obj: SerializedLinearEdge): LinearEdge;
    static getPolygonArea(polygon: Vector2[]): number;
    static getPolygonCentroid(polygon: Vector2[]): Vector2;
    static getEdgesArea(clippedEdges: LinearEdge[]): number;
    /**
     * Given a line segment, returns the distance from the origin to the closest point on the line segment.
     */
    static evaluateClosestDistanceToOrigin(p0x: number, p0y: number, p1x: number, p1y: number): number;
    /**
     * Tests if the point (x,y) is left/on/right of the infinite line determined by (p0x,p0y) and (p1x,p1y).
     * Return: >0 for P2 left of the line through P0 and P1
     *         =0 for P2  on the line
     *         <0 for P2  right of the line
     */
    static leftComparison(p0x: number, p0y: number, p1x: number, p1y: number, x: number, y: number): number;
    /**
     * Gets the winding contribution of an edge segment to a point with the Dan Sunday winding number algorithm.
     *
     * See https://web.archive.org/web/20130126163405/http://geomalgorithms.com/a03-_inclusion.html
     */
    static windingContribution(p0x: number, p0y: number, p1x: number, p1y: number, x: number, y: number): number;
    static getWindingNumberEdges(edges: LinearEdge[], point: Vector2): number;
    static getWindingNumberPolygon(polygon: Vector2[], point: Vector2): number;
    static getWindingNumberPolygons(polygons: Vector2[][], point: Vector2): number;
    /**
     * Given an edge defined by startPoint/endPoint, compute the range of distances from the given point to the edge, and
     * add it to the range.
     */
    static addDistanceRange(startPoint: Vector2, endPoint: Vector2, point: Vector2, range: Range): void;
    static validateStartEndMatches(edges: LinearEdge[]): void;
    toString(): string;
}
export type SerializedLinearEdge = {
    startPoint: {
        x: number;
        y: number;
    };
    endPoint: {
        x: number;
        y: number;
    };
    containsFakeCorner: boolean;
};
//# sourceMappingURL=LinearEdge.d.ts.map