import { Point } from '../../..'; import { Polyline, ICurve } from '../../../math/geometry'; import { PolylinePoint } from '../../../math/geometry/polylinePoint'; import { RBNode } from '../../../math/RBTree/rbNode'; import { RBTree } from '../../../math/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; leftConeSides: RBTree; portEdgesGraph: VisibilityGraph; PortEdgesCreator: (a: VisibilityVertex, b: VisibilityVertex) => VisibilityEdge; private constructor(); BorderPolyline: Polyline; static Sweep(obstacles: Array, 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): void; ProcessVertexEvent(vertexEvent: VertexEvent): void; static Diamond(p: Point): ICurve; 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; LookForIntersectionOfObstacleSideAndLeftConeSide(obstacleSideStart: Point, obstacleSideVertex: PolylinePoint): void; GetFirstNodeToTheRightOfPoint(p: Point): RBNode; static PointIsToTheLeftOfSegment(p: Point, seg: ConeSide): boolean; static PointIsToTheRightOfSegment(p: Point, seg: ConeSide): boolean; FixConeLeftSideIntersections(leftSide: BrokenConeSide, rbNode: RBNode): void; InsertToTree(tree: RBTree, coneSide: ConeSide): RBNode; CloseConesAddConeAtLeftVertex(leftVertexEvent: VertexEvent, nextVertex: PolylinePoint): void; RemoveCone(cone: Cone): void; RemoveSegFromRightTree(coneSide: ConeSide): void; RemoveSegFromLeftTree(coneSide: ConeSide): void; FixConeRightSideIntersections(rightSide: BrokenConeSide, rbNode: RBNode): void; CreateConeOnVertex(sweepEvent: SweepEvent): void; LookForIntersectionWithConeLeftSide(leftNode: RBNode): void; LookForIntersectionWithConeRightSide(rightNode: RBNode): 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; ExtendSegmentToZ(segment: ConeSide): ICurve; GoOverConesSeeingVertexEvent(vertexEvent: SweepEvent): void; GetRbNodeEmergency(leftConeSide: ConeSide): RBNode; static VertexIsToTheLeftOfSegment(vertexEvent: SweepEvent, seg: ConeSide): boolean; static VertexIsToTheRightOfSegment(vertexEvent: SweepEvent, seg: ConeSide): boolean; FindFirstSegmentInTheRightTreeNotToTheLeftOfVertex(vertexEvent: SweepEvent): RBNode; EnqueueRightVertexEvent(vertexEvent: RightVertexEvent): void; invariant(): boolean; }