@avdl/martinez
Version:
TypeScript library for polygon boolean operations
48 lines • 1.76 kB
TypeScript
import type { Point } from "../types";
import { Segment } from "../types";
/**
* Represents a sweep event in the Martinez-Rueda clipping algorithm
*/
export declare class SweepEvent {
private _point;
private _isLeftEndpoint;
private _polygonLabel;
private _otherEvent;
private _isInsideOutsideTransition;
private _edgeType;
private _isInsideOtherPolygon;
private _positionInSweepLine;
constructor(point: Point, isLeftEndpoint: boolean, polygonLabel: number, otherEvent: SweepEvent | null, edgeType?: number);
/**
* Return the line segment associated to the SweepEvent
*/
getSegment(): Segment;
/**
* Check if the line segment (point, other->point) is below a given point
*/
isSegmentBelowPoint(testPoint: Point): boolean;
/**
* Check if the line segment (point, other->point) is above a given point
*/
isSegmentAbovePoint(testPoint: Point): boolean;
get point(): Point;
set point(value: Point);
get isLeftEndpoint(): boolean;
set isLeftEndpoint(value: boolean);
get polygonLabel(): number;
set polygonLabel(value: number);
get otherEvent(): SweepEvent | null;
set otherEvent(value: SweepEvent | null);
get isInsideOutsideTransition(): boolean;
set isInsideOutsideTransition(value: boolean);
get edgeType(): number;
set edgeType(value: number);
get isInsideOtherPolygon(): boolean;
set isInsideOtherPolygon(value: boolean);
get positionInSweepLine(): number | null;
set positionInSweepLine(value: number | null);
segment(): Segment;
below(testPoint: Point): boolean;
above(testPoint: Point): boolean;
}
//# sourceMappingURL=SweepEvent.d.ts.map