import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * A line segment (all points directly between the start and end point)
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Bounds2 from '../../../dot/js/Bounds2.js';
import Matrix3 from '../../../dot/js/Matrix3.js';
import Ray2 from '../../../dot/js/Ray2.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { ClosestToPointResult, Overlap, PiecewiseLinearOptions, RayIntersection, Segment, SegmentIntersection } from '../imports.js';
export type SerializedLine = {
    type: 'Line';
    startX: number;
    startY: number;
    endX: number;
    endY: number;
};
export default class Line extends Segment {
    private _start;
    private _end;
    private _tangent;
    private _bounds;
    private _svgPathFragment;
    /**
     * @param start - Start point
     * @param end - End point
     */
    constructor(start: Vector2, end: Vector2);
    /**
     * Sets the start point of the Line.
     */
    setStart(start: Vector2): this;
    set start(value: Vector2);
    get start(): Vector2;
    /**
     * Returns the start of this Line.
     */
    getStart(): Vector2;
    /**
     * Sets the end point of the Line.
     */
    setEnd(end: Vector2): this;
    set end(value: Vector2);
    get end(): Vector2;
    /**
     * Returns the end of this Line.
     */
    getEnd(): Vector2;
    /**
     * Returns the position parametrically, with 0 <= t <= 1.
     *
     * NOTE: positionAt( 0 ) will return the start of the segment, and positionAt( 1 ) will return the end of the
     * segment.
     *
     * This method is part of the Segment API. See Segment.js's constructor for more API documentation.
     */
    positionAt(t: number): Vector2;
    /**
     * Returns the non-normalized tangent (dx/dt, dy/dt) of this segment at the parametric value of t, with 0 <= t <= 1.
     *
     * NOTE: tangentAt( 0 ) will return the tangent at the start of the segment, and tangentAt( 1 ) will return the
     * tangent at the end of the segment.
     *
     * This method is part of the Segment API. See Segment.js's constructor for more API documentation.
     */
    tangentAt(t: number): Vector2;
    /**
     * Returns the signed curvature of the segment at the parametric value t, where 0 <= t <= 1.
     *
     * The curvature will be positive for visual clockwise / mathematical counterclockwise curves, negative for opposite
     * curvature, and 0 for no curvature.
     *
     * NOTE: curvatureAt( 0 ) will return the curvature at the start of the segment, and curvatureAt( 1 ) will return
     * the curvature at the end of the segment.
     *
     * This method is part of the Segment API. See Segment.js's constructor for more API documentation.
     */
    curvatureAt(t: number): number;
    /**
     * Returns an array with up to 2 sub-segments, split at the parametric t value. Together (in order) they should make
     * up the same shape as the current segment.
     *
     * This method is part of the Segment API. See Segment.js's constructor for more API documentation.
     */
    subdivided(t: number): Segment[];
    /**
     * Clears cached information, should be called when any of the 'constructor arguments' are mutated.
     */
    invalidate(): void;
    /**
     * Returns a normalized unit vector that is tangent to this line (at the starting point)
     * the unit vectors points toward the end points.
     */
    getStartTangent(): Vector2;
    get startTangent(): Vector2;
    /**
     * Returns the normalized unit vector that is tangent to this line
     * same as getStartTangent, since this is a straight line
     */
    getEndTangent(): Vector2;
    get endTangent(): Vector2;
    /**
     * Returns the bounds of this segment.
     */
    getBounds(): Bounds2;
    get bounds(): Bounds2;
    /**
     * Returns the bounding box for this transformed Line
     */
    getBoundsWithTransform(matrix: Matrix3): Bounds2;
    /**
     * Returns a list of non-degenerate segments that are equivalent to this segment. Generally gets rid (or simplifies)
     * invalid or repeated segments.
     */
    getNondegenerateSegments(): Segment[];
    /**
     * Returns a string containing the SVG path. assumes that the start point is already provided,
     * so anything that calls this needs to put the M calls first
     */
    getSVGPathFragment(): string;
    /**
     * Returns an array of Line that will draw an offset curve on the logical left side
     */
    strokeLeft(lineWidth: number): Line[];
    /**
     * Returns an array of Line that will draw an offset curve on the logical right side
     */
    strokeRight(lineWidth: number): Line[];
    /**
     * In general, this method returns a list of t values where dx/dt or dy/dt is 0 where 0 < t < 1. subdividing on these will result in monotonic segments
     * Since lines are already monotone, it returns an empty array.
     */
    getInteriorExtremaTs(): number[];
    /**
     * Hit-tests this segment with the ray. An array of all intersections of the ray with this segment will be returned.
     * For details, see the documentation in Segment.js
     */
    intersection(ray: Ray2): RayIntersection[];
    /**
     * Returns the resultant winding number of a ray intersecting this line.
     */
    windingIntersection(ray: Ray2): number;
    /**
     * Draws this line to the 2D Canvas context, assuming the context's current location is already at the start point
     */
    writeToContext(context: CanvasRenderingContext2D): void;
    /**
     * Returns a new Line that represents this line after transformation by the matrix
     */
    transformed(matrix: Matrix3): Line;
    /**
     * Returns an object that gives information about the closest point (on a line segment) to the point argument
     */
    explicitClosestToPoint(point: Vector2): ClosestToPointResult[];
    /**
     * Returns the contribution to the signed area computed using Green's Theorem, with P=-y/2 and Q=x/2.
     *
     * NOTE: This is this segment's contribution to the line integral (-y/2 dx + x/2 dy).
     */
    getSignedAreaFragment(): number;
    /**
     * Given the current curve parameterized by t, will return a curve parameterized by x where t = a * x + b
     */
    reparameterized(a: number, b: number): Line;
    /**
     * Returns a reversed copy of this segment (mapping the parametrization from [0,1] => [1,0]).
     */
    reversed(): Line;
    /**
     * Convert a line in the $(theta,r)$ plane of the form $(\theta_1,r_1)$ to $(\theta_2,r_2)$ and
     * converts to the cartesian coordinate system
     *
     * E.g. a polar line (0,1) to (2 Pi,1) would be mapped to a circle of radius 1
     */
    polarToCartesian(options: PiecewiseLinearOptions): Segment[];
    /**
     * Returns the arc length of the segment.
     */
    getArcLength(): number;
    /**
     * We can handle this simply by returning ourselves.
     */
    toPiecewiseLinearOrArcSegments(): Segment[];
    /**
     * Returns an object form that can be turned back into a segment with the corresponding deserialize method.
     */
    serialize(): SerializedLine;
    /**
     * Determine whether two lines overlap over a continuous section, and if so finds the a,b pair such that
     * p( t ) === q( a * t + b ).
     *
     * @param segment
     * @param [epsilon] - Will return overlaps only if no two corresponding points differ by this amount or more
     *                             in one component.
     * @returns - The solution, if there is one (and only one)
     */
    getOverlaps(segment: Segment, epsilon?: number): Overlap[] | null;
    getClosestPoints(point: Vector2): ClosestToPointResult[];
    /**
     * Returns a Line from the serialized representation.
     */
    static deserialize(obj: SerializedLine): Line;
    /**
     * Determine whether two lines overlap over a continuous section, and if so finds the a,b pair such that
     * p( t ) === q( a * t + b ).
     *
     * @param line1
     * @param line2
     * @param [epsilon] - Will return overlaps only if no two corresponding points differ by this amount or more
     *                             in one component.
     * @returns - The solution, if there is one (and only one)
     */
    static getOverlaps(line1: Line, line2: Line, epsilon?: number): Overlap[];
    /**
     * Returns any (finite) intersection between the two line segments.
     */
    static intersect(a: Line, b: Line): SegmentIntersection[];
    /**
     * Returns any intersections between a line segment and another type of segment.
     *
     * This should be more optimized than the general intersection routine of arbitrary segments.
     */
    static intersectOther(line: Line, other: Segment): SegmentIntersection[];
}
//# sourceMappingURL=Line.d.ts.map