The resulting cell inside the Voronoi diagram.

Variables

closeMe:Bool

halfedges:Array<Halfedge>

The list of the edges of the cell.

id:Int

The unique ID/Index of the cell.

point:Point

The source seed point of the cell.

Methods

getBbox():{y:Float, x:Float, width:Float, height:Float}

Returns a bounding box of the Cell.

getCircle():Circle

Returns an enclosing circle collider of the Cell.

Implementation note: Not the best possible solution and may produce artifacts.

getNeighborIndexes():Array<Int>

Returns a list of the neighbor Cell indexes.

getNeighbors():Array<Point>

Returns a list of the neighboring cells.

pointIntersection(x:Float, y:Float):Int

Tests if given position is inside, on, or outside of the cell.

Returns:

  • -1: point is outside the perimeter of the cell
  • 0: point is on the perimeter of the cell
  • 1: point is inside the perimeter of the cell