# Class PowerDiagram

java.lang.Object
com.treemap.swing.originalfastvoronoi.pd.PowerDiagram

public class PowerDiagram extends Object
Computes the PowerDiagram by using the convex hull of the transformed half planes of the sites.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected PolygonSimple`
  `clipPoly`
  `static boolean`
  `debug`
  `protected List<JFace>`
  `facets`
  `static ImageFrame`
  `frame`
  `static Graphics2D`
  `graphics`
  `static final int`
  `halfLineScalingFactor`
  `JConvexHull`
  `hull`
  `static Random`
  `rand`
  `protected OpenList`
  `sites`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PowerDiagram()`
  `PowerDiagram(OpenList sites, PolygonSimple clipPoly)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `computeDiagram()`
  `void`
  `draw(Site s)`
  `int`
  `getAmountPolygons()`
  `PolygonSimple`
  `getClipPoly()`
  `static void`
  `initDebug()`
  `static void`
  `main(String[] args)`
  `void`
  `setAmountPolygons(int amountPolygons)`
  `void`
  `setClipPoly(PolygonSimple polygon)`
  `void`
  `setSites(OpenList sites)`
  `void`
  `showDiagram()`
  `void`
  `writeHullTestCodeOut(Site s)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### rand

    public static Random rand

  - ### halfLineScalingFactor

    public static final int halfLineScalingFactor
    See Also:
      - Constant Field Values

  - ### debug

    public static boolean debug

  - ### frame

    public static ImageFrame frame

  - ### graphics

    public static Graphics2D graphics

  - ### hull

    public JConvexHull hull

  - ### sites

    protected OpenList sites

  - ### clipPoly

    protected PolygonSimple clipPoly

  - ### facets

    protected List<JFace> facets

- ## Constructor Details

  - ### PowerDiagram

    public PowerDiagram()

  - ### PowerDiagram

    public PowerDiagram(OpenList sites, PolygonSimple clipPoly)

- ## Method Details

  - ### setSites

    public void setSites(OpenList sites)

  - ### setClipPoly

    public void setClipPoly(PolygonSimple polygon)

  - ### getClipPoly

    public PolygonSimple getClipPoly()

  - ### computeDiagram

    public void computeDiagram()

  - ### writeHullTestCodeOut

    public void writeHullTestCodeOut(Site s)

  - ### setAmountPolygons

    public void setAmountPolygons(int amountPolygons)

  - ### getAmountPolygons

    public int getAmountPolygons()

  - ### initDebug

    public static void initDebug()

  - ### main

    public static void main(String[] args)

  - ### showDiagram

    public void showDiagram()

  - ### draw

    public void draw(Site s)