Defines an arc in two-dimensional coordinates.

Hierarchy

Implements

Constructors

Properties

_center: Point2d
_from: Point2d
_to: Point2d

Accessors

  • get angle(): number
  • Gets the arc angle.

    Returns number

  • get center(): Point2d
  • Gets the center of the arc.

    Returns Point2d

  • get from(): Point2d
  • Gets the starting point of the arc.

    Returns Point2d

  • get fromToCenter(): number
  • Returns number

  • get isCircular(): boolean
  • Gets a value indicating if the arc is circular, or not.

    Returns boolean

    true if this is the case, otherwise false.

  • get to(): Point2d
  • Gets the ending point of the arc.

    Returns Point2d

  • get toToCenter(): number
  • Returns number

Methods

  • Checks if the given shape intersects with the arc.

    Parameters

    Returns boolean

    true it the two shapes intersect, otherwise false.

  • Get the intersection points with the given shape.

    Parameters

    Returns Point2d[]

    An array of points if any intersection exist, otherwise an empty array.

  • Checks if the given point is on one edge of the arc.

    Parameters

    • point: Point2d

      The reference point.

    • threshold: number = 0

      A value used as a threshold / range to check if the point is on one edge.

    Returns boolean

    true if the point is on edge.

  • Rotates the arc by the given angle in degree, around a point.

    Parameters

    • angle: number

      The rotation angle.

    • origin: Point2d = ...

      The origin from which the rotation is supposed to be done.

    Returns void

  • Translates the arc using the given vector for direction.

    Parameters

    • vector: Vector2d

      The vector defining the direction.

    Returns void

Generated using TypeDoc