import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * A circular arc (a continuous sub-part of a circle).
 *
 * @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 { EllipticalArc, Overlap, RayIntersection, Segment, SegmentIntersection } from '../imports.js';
export type SerializedArc = {
    type: 'Arc';
    centerX: number;
    centerY: number;
    radius: number;
    startAngle: number;
    endAngle: number;
    anticlockwise: boolean;
};
export default class Arc extends Segment {
    private _center;
    private _radius;
    private _startAngle;
    private _endAngle;
    private _anticlockwise;
    private _start;
    private _end;
    private _startTangent;
    private _endTangent;
    private _actualEndAngle;
    private _isFullPerimeter;
    private _angleDifference;
    private _bounds;
    private _svgPathFragment;
    /**
     * If the startAngle/endAngle difference is ~2pi, this will be a full circle
     *
     * See http://www.w3.org/TR/2dcontext/#dom-context-2d-arc for detailed information on the parameters.
     *
     * @param center - Center of the arc (every point on the arc is equally far from the center)
     * @param radius - How far from the center the arc will be
     * @param startAngle - Angle (radians) of the start of the arc
     * @param endAngle - Angle (radians) of the end of the arc
     * @param anticlockwise - Decides which direction the arc takes around the center
     */
    constructor(center: Vector2, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean);
    /**
     * Sets the center of the Arc.
     */
    setCenter(center: Vector2): this;
    set center(value: Vector2);
    get center(): Vector2;
    /**
     * Returns the center of this Arc.
     */
    getCenter(): Vector2;
    /**
     * Sets the radius of the Arc.
     */
    setRadius(radius: number): this;
    set radius(value: number);
    get radius(): number;
    /**
     * Returns the radius of this Arc.
     */
    getRadius(): number;
    /**
     * Sets the startAngle of the Arc.
     */
    setStartAngle(startAngle: number): this;
    set startAngle(value: number);
    get startAngle(): number;
    /**
     * Returns the startAngle of this Arc.
     */
    getStartAngle(): number;
    /**
     * Sets the endAngle of the Arc.
     */
    setEndAngle(endAngle: number): this;
    set endAngle(value: number);
    get endAngle(): number;
    /**
     * Returns the endAngle of this Arc.
     */
    getEndAngle(): number;
    /**
     * Sets the anticlockwise of the Arc.
     */
    setAnticlockwise(anticlockwise: boolean): this;
    set anticlockwise(value: boolean);
    get anticlockwise(): boolean;
    /**
     * Returns the anticlockwise of this Arc.
     */
    getAnticlockwise(): boolean;
    /**
     * 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): Arc[];
    /**
     * Clears cached information, should be called when any of the 'constructor arguments' are mutated.
     */
    invalidate(): void;
    /**
     * Gets the start position of this arc.
     */
    getStart(): Vector2;
    get start(): Vector2;
    /**
     * Gets the end position of this arc.
     */
    getEnd(): Vector2;
    get end(): Vector2;
    /**
     * Gets the unit vector tangent to this arc at the start point.
     */
    getStartTangent(): Vector2;
    get startTangent(): Vector2;
    /**
     * Gets the unit vector tangent to the arc at the end point.
     */
    getEndTangent(): Vector2;
    get endTangent(): Vector2;
    /**
     * Gets the end angle in radians.
     */
    getActualEndAngle(): number;
    get actualEndAngle(): number;
    /**
     * Returns a boolean value that indicates if the arc wraps up by more than two Pi.
     */
    getIsFullPerimeter(): boolean;
    get isFullPerimeter(): boolean;
    /**
     * Returns an angle difference that represents how "much" of the circle our arc covers.
     *
     * The answer is always greater or equal to zero
     * The answer can exceed two Pi
     */
    getAngleDifference(): number;
    get angleDifference(): number;
    /**
     * Returns the bounds of this segment.
     */
    getBounds(): Bounds2;
    get bounds(): Bounds2;
    /**
     * Returns a list of non-degenerate segments that are equivalent to this segment. Generally gets rid (or simplifies)
     * invalid or repeated segments.
     */
    getNondegenerateSegments(): Arc[];
    /**
     * Attempts to expand the private _bounds bounding box to include a point at a specific angle, making sure that
     * angle is actually included in the arc. This will presumably be called at angles that are at critical points,
     * where the arc should have maximum/minimum x/y values.
     */
    private includeBoundsAtAngle;
    /**
     * Maps a contained angle to between [startAngle,actualEndAngle), even if the end angle is lower.
     */
    mapAngle(angle: number): number;
    /**
     * Returns the parametrized value t for a given angle. The value t should range from 0 to 1 (inclusive).
     */
    tAtAngle(angle: number): number;
    /**
     * Returns the angle for the parametrized t value. The t value should range from 0 to 1 (inclusive).
     */
    angleAt(t: number): number;
    /**
     * Returns the position of this arc at angle.
     */
    positionAtAngle(angle: number): Vector2;
    /**
     * Returns the normalized tangent of this arc.
     * The tangent points outward (inward) of this arc for clockwise (anticlockwise) direction.
     */
    tangentAtAngle(angle: number): Vector2;
    /**
     * Returns whether the given angle is contained by the arc (whether a ray from the arc's origin going in that angle
     * will intersect the arc).
     */
    containsAngle(angle: number): boolean;
    /**
     * 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 arcs that will draw an offset on the logical left side
     */
    strokeLeft(lineWidth: number): Arc[];
    /**
     * Returns an array of arcs that will draw an offset curve on the logical right side
     */
    strokeRight(lineWidth: number): Arc[];
    /**
     * 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
     * Does not include t=0 and t=1
     */
    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 this ray intersecting this arc.
     */
    windingIntersection(ray: Ray2): number;
    /**
     * Draws this arc to the 2D Canvas context, assuming the context's current location is already at the start point
     */
    writeToContext(context: CanvasRenderingContext2D): void;
    /**
     * Returns a new copy of this arc, transformed by the given matrix.
     *
     * TODO: test various transform types, especially rotations, scaling, shears, etc. https://github.com/phetsims/kite/issues/76
     */
    transformed(matrix: Matrix3): Arc | EllipticalArc;
    /**
     * 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;
    /**
     * Returns a reversed copy of this segment (mapping the parametrization from [0,1] => [1,0]).
     */
    reversed(): Arc;
    /**
     * 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(): SerializedArc;
    /**
     * 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;
    /**
     * Returns the matrix representation of the conic section of the circle.
     * See https://en.wikipedia.org/wiki/Matrix_representation_of_conic_sections
     */
    getConicMatrix(): Matrix3;
    /**
     * Returns an Arc from the serialized representation.
     */
    static deserialize(obj: SerializedArc): Arc;
    /**
     * Determines the actual end angle (compared to the start angle).
     *
     * Normalizes the sign of the angles, so that the sign of ( endAngle - startAngle ) matches whether it is
     * anticlockwise.
     */
    static computeActualEndAngle(startAngle: number, endAngle: number, anticlockwise: boolean): number;
    /**
     * Computes the potential overlap between [0,end1] and [start2,end2] (with t-values [0,1] and [tStart2,tEnd2]).
     *
     * @param end1 - Relative end angle of the first segment
     * @param start2 - Relative start angle of the second segment
     * @param end2 - Relative end angle of the second segment
     * @param tStart2 - The parametric value of the second segment's start
     * @param tEnd2 - The parametric value of the second segment's end
     */
    private static getPartialOverlap;
    /**
     * Determine whether two Arcs overlap over continuous sections, and if so finds the a,b pairs such that
     * p( t ) === q( a * t + b ).
     *
     * @param startAngle1 - Start angle of arc 1
     * @param endAngle1 - "Actual" end angle of arc 1
     * @param startAngle2 - Start angle of arc 2
     * @param endAngle2 - "Actual" end angle of arc 2
     * @returns - Any overlaps (from 0 to 2)
     */
    static getAngularOverlaps(startAngle1: number, endAngle1: number, startAngle2: number, endAngle2: number): Overlap[];
    /**
     * Determine whether two Arcs overlap over continuous sections, and if so finds the a,b pairs such that
     * p( t ) === q( a * t + b ).
     *
     * @returns - Any overlaps (from 0 to 2)
     */
    static getOverlaps(arc1: Arc, arc2: Arc): Overlap[];
    /**
     * Returns the points of intersections between two circles.
     *
     * @param center1 - Center of the first circle
     * @param radius1 - Radius of the first circle
     * @param center2 - Center of the second circle
     * @param radius2 - Radius of the second circle
     */
    static getCircleIntersectionPoint(center1: Vector2, radius1: number, center2: Vector2, radius2: number): Vector2[];
    /**
     * Returns any (finite) intersection between the two arc segments.
     */
    static intersect(a: Arc, b: Arc): SegmentIntersection[];
    /**
     * Creates an Arc (or if straight enough a Line) segment that goes from the startPoint to the endPoint, touching
     * the middlePoint somewhere between the two.
     */
    static createFromPoints(startPoint: Vector2, middlePoint: Vector2, endPoint: Vector2): Segment;
}
//# sourceMappingURL=Arc.d.ts.map