Constructors

Methods

  • Calculate distance and shortest segment between two arcs

    Parameters

    Returns [number, Segment]

    • distance and shortest segment
  • Calculate distance and shortest segment between arc and circle

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between arc and line

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Returns [mindist, maxdist] array of squared minimal and maximal distance between boxes Minimal distance by x is (box2.xmin - box1.xmax), if box1 is left to box2 (box1.xmin - box2.xmax), if box2 is left to box1 0, if box1 and box2 are intersected by x Minimal distance by y is defined in the same way

    Maximal distance is estimated as a sum of squared dimensions of the merged box

    Parameters

    Returns [number, number]

    [minDist, maxDist]

  • Calculate distance and shortest segment between two circles

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between two circles

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • This function initializes the interval tree and starts the process by calling minMaxTreeProcessLevel. It returns the resulting interval tree.

    Parameters

    Returns IntervalTree

  • Parameters

    Returns [[number, Segment], boolean]

  • Calculate estimated minimal and maxium distance between the shape and node in PlanarSet using box level by level. The minimum maxDistance is updated, nodes with minDist larger than minMax will be skipped. the estimated [minDist, maxDist] pair is inserted into the interval tree.

    Parameters

    • shape:
          | Point
          | Segment
          | Arc
          | Line
          | Circle

      represents the current query shape

    • level: Node[]

      the array of nodes at the current level of the interval tree

    • minStop: number

      the current minimum stop distance

    • tree: IntervalTree

      the interval tree used to store the calculation results.

    Returns number

    the updated minimum stop distance.

  • Calculate distance and shortest segment between point and arc

    Parameters

    Returns [number, Segment]

    • distance and shortest segment
  • Calculate distance and shortest segment between point and circle

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between point and line

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between points

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between point and polygon

    Parameters

    Returns [number, Segment]

    • distance and shortest segment
  • Calculate distance and shortest segment between point and segment

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between segment and arc

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between segment and circle

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between segment and line

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculate distance and shortest segment between two segments

    Parameters

    Returns [number, Segment]

    distance and shortest segment

  • Calculates distance between shape and Planar Set of shapes

    Parameters

    Returns [number, Segment]

  • Parameters

    Returns [number, Segment]

  • Sort array of [distance, segment] pairs by distance

    Parameters

    • distanceAndSegment: [number, Segment][]

      sorted array of [distance, segment] pairs

    Returns void