The polygon tree of a Region.

Hierarchy (View Summary)

Constructors

Accessors

  • get bounds(): null | Rectangle

    The bounds of the polygon. They are null in case of the root node.

    Returns null | Rectangle

  • get clipperPath(): null | readonly IntPoint[]

    The Clipper path of this node. It is empty in case of the root node.

    Returns null | readonly IntPoint[]

  • get depth(): number

    The depth of this node. The depth of the root node is 0.

    Returns number

  • get isHole(): boolean

    Is this a hole? The root node is a hole.

    Returns boolean

  • get points(): null | readonly number[]

    The points of the polygon ([x0, y0, x1, y1, ...]). They are null in case of the root node.

    Returns null | readonly number[]

  • get polygon(): null | Polygon

    The polygon of this node. It is null in case of the root node.

    Returns null | Polygon

Methods

  • Test circle containment/intersection with this node.

    Parameters

    • center: Point

      The center point of the circle.

    • radius: number

      The radius of the circle.

    Returns -1 | 0 | 1

    • -1: the circle is in the exterior and does not intersect the boundary. - 0: the circle is intersects the boundary. - 1: the circle is in the interior and does not intersect the boundary.
  • Internal

    Create the tree from a Clipper polygon tree.

    Parameters

    • clipperPolyTree: PolyTree

    Returns RegionPolygonTree