import { Point } from '../../..';
import { Polyline } from '../../../math/geometry';
import { PolylinePoint } from '../../../math/geometry/polylinePoint';
import { RBNode } from '../../../structs/RBTree/rbNode';
import { RBTree } from '../../../structs/RBTree/rbTree';
import { PointSet } from '../../../utils/PointSet';
import { LineSweeperBase } from '../../visibility/LineSweeperBase';
import { PortObstacleEvent } from '../../visibility/PortObstacleEvent';
import { VisibilityEdge } from '../../visibility/VisibilityEdge';
import { VisibilityGraph } from '../../visibility/VisibilityGraph';
import { VisibilityVertex } from '../../visibility/VisibilityVertex';
import { BrokenConeSide } from './BrokenConeSide';
import { Cone } from './Cone';
import { ConeLeftSide } from './ConeLeftSide';
import { ConeRightSide } from './ConeRightSide';
import { ConeSide } from './ConeSide';
import { ConeSideComparer } from './ConeSideComparer';
import { LeftIntersectionEvent } from './LeftIntersectionEvent';
import { ObstacleSide } from './ObstacleSide';
import { RightIntersectionEvent } from './RightIntersectionEvent';
import { RightVertexEvent } from './RightVertexEvent';
import { SweepEvent } from './SweepEvent';
import { VertexEvent } from './VertexEvent';
export declare class LineSweeper extends LineSweeperBase {
    ConeRightSideDirection: Point;
    ConeLeftSideDirection: Point;
    coneSideComparer: ConeSideComparer;
    visibilityGraph: VisibilityGraph;
    rightConeSides: RBTree<ConeSide>;
    leftConeSides: RBTree<ConeSide>;
    portEdgesGraph: VisibilityGraph;
    PortEdgesCreator: (a: VisibilityVertex, b: VisibilityVertex) => VisibilityEdge;
    private constructor();
    BorderPolyline: Polyline;
    static Sweep(obstacles: Array<Polyline>, direction: Point, coneAngle: number, visibilityGraph: VisibilityGraph, ports: PointSet, borderPolyline: Polyline): void;
    Calculate(): void;
    CreatePortEdges(): void;
    CloseRemainingCones(): void;
    GetPolylinePointInsideOfConeAndRemoveCones(p: PolylinePoint, cone: Cone): PolylinePoint;
    static FindInsidePoint(leftPoint: Point, rightPoint: Point, cone: Cone): Point;
    static FindInsidePointBool(leftPoint: Point, rightPoint: Point, apex: Point, leftSideConePoint: Point, rightSideConePoint: Point): Point;
    AddEdgesAndRemoveRemainingConesByPoint(point: Point): void;
    FindPolylineSideIntersectingConeRightSide(p: PolylinePoint, cone: Cone): PolylinePoint;
    static GetSign(p: PolylinePoint, a: Point, b: Point): number;
    AddEdgeAndRemoveCone(cone: Cone, p: Point): void;
    CreatePortEdge(cone: Cone, p: Point): void;
    static InsertPointIntoPolylineAfter(borderPolyline: Polyline, insertAfter: PolylinePoint, pointToInsert: Point): PolylinePoint;
    ProcessEvent(p: SweepEvent): void;
    ProcessPortObstacleEvent(portObstacleEvent: PortObstacleEvent): void;
    ProcessLeftIntersectionEvent(leftIntersectionEvent: LeftIntersectionEvent): void;
    TryCreateConeClosureForLeftSide(leftSide: BrokenConeSide): void;
    CreateConeClosureEvent(brokenConeSide: BrokenConeSide, otherSide: ConeSide): void;
    ProcessRightIntersectionEvent(rightIntersectionEvent: RightIntersectionEvent): void;
    TryCreateConeClosureForRightSide(rightSide: BrokenConeSide): void;
    RemoveConesClosedBySegment(leftPoint: Point, rightPoint: Point): void;
    CloseConesCoveredBySegment(leftPoint: Point, rightPoint: Point, tree: RBTree<ConeSide>): void;
    ProcessVertexEvent(vertexEvent: VertexEvent): void;
    AddConeAndEnqueueEvents(vertexEvent: VertexEvent): void;
    CloseConesAddConeAtRightVertex(rightVertexEvent: VertexEvent, nextVertex: PolylinePoint): void;
    CaseToTheLeftOfLineOrOnLineConeRp(rightVertexEvent: VertexEvent, nextVertex: PolylinePoint): void;
    LookForIntersectionOfObstacleSideAndRightConeSide(obstacleSideStart: Point, obstacleSideVertex: PolylinePoint): void;
    CreateRightIntersectionEvent(coneRightSide: ConeRightSide, intersection: Point, obstacleSideVertex: PolylinePoint): RightIntersectionEvent;
    GetLastNodeToTheLeftOfPointInRightSegmentTree(obstacleSideStart: Point): RBNode<ConeSide>;
    LookForIntersectionOfObstacleSideAndLeftConeSide(obstacleSideStart: Point, obstacleSideVertex: PolylinePoint): void;
    GetFirstNodeToTheRightOfPoint(p: Point): RBNode<ConeSide>;
    static PointIsToTheLeftOfSegment(p: Point, seg: ConeSide): boolean;
    static PointIsToTheRightOfSegment(p: Point, seg: ConeSide): boolean;
    FixConeLeftSideIntersections(leftSide: BrokenConeSide, rbNode: RBNode<ConeSide>): void;
    InsertToTree(tree: RBTree<ConeSide>, coneSide: ConeSide): RBNode<ConeSide>;
    CloseConesAddConeAtLeftVertex(leftVertexEvent: VertexEvent, nextVertex: PolylinePoint): void;
    RemoveCone(cone: Cone): void;
    RemoveSegFromRightTree(coneSide: ConeSide): void;
    RemoveSegFromLeftTree(coneSide: ConeSide): void;
    FixConeRightSideIntersections(rightSide: BrokenConeSide, rbNode: RBNode<ConeSide>): void;
    CreateConeOnVertex(sweepEvent: SweepEvent): void;
    LookForIntersectionWithConeLeftSide(leftNode: RBNode<ConeSide>): void;
    LookForIntersectionWithConeRightSide(rightNode: RBNode<ConeSide>): void;
    TryIntersectionOfConeRightSideAndObstacleConeSide(coneRightSide: ConeRightSide, seg: BrokenConeSide): void;
    TryIntersectionOfConeRightSideAndObstacleSide(coneRightSide: ConeRightSide, side: ObstacleSide): void;
    TryIntersectionOfConeLeftSideAndObstacleConeSide(coneLeftSide: ConeLeftSide, seg: BrokenConeSide): void;
    TryIntersectionOfConeLeftSideAndObstacleSide(coneLeftSide: ConeLeftSide, side: ObstacleSide): void;
    GoOverConesSeeingVertexEvent(vertexEvent: SweepEvent): void;
    GetRbNodeEmergency(rbNode: RBNode<ConeSide>, leftConeSide: ConeSide): RBNode<ConeSide>;
    static VertexIsToTheLeftOfSegment(vertexEvent: SweepEvent, seg: ConeSide): boolean;
    static VertexIsToTheRightOfSegment(vertexEvent: SweepEvent, seg: ConeSide): boolean;
    FindFirstSegmentInTheRightTreeNotToTheLeftOfVertex(vertexEvent: SweepEvent): RBNode<ConeSide>;
    EnqueueRightVertexEvent(vertexEvent: RightVertexEvent): void;
    invariant(): boolean;
}
