Class VoroNode

java.lang.Object
com.treemap.swing.originalfastvoronoi.VoroNode
All Implemented Interfaces:
VoroCellObject

public class VoroNode extends Object implements VoroCellObject
Represents a node in the Voronoi Treemap hierarchy. This node is put into the computation queue.
  • Constructor Details

    • VoroNode

      public VoroNode(int nodeID)
    • VoroNode

      public VoroNode(int nodeID, int numberChildren)
  • Method Details

    • calculateWeights

      public void calculateWeights()
    • setNodeID

      public void setNodeID(int nodeID)
    • getNodeID

      public int getNodeID()
    • setParent

      public void setParent(VoroNode parent)
    • getParent

      public VoroNode getParent()
    • setChildren

      public void setChildren(ArrayList<VoroNode> children)
    • getChildren

      public ArrayList<VoroNode> getChildren()
    • setPolygon

      public void setPolygon(PolygonSimple polygon)
    • getPolygon

      public PolygonSimple getPolygon()
    • setToConsider

      public void setToConsider(boolean toConsider)
    • isToConsider

      public boolean isToConsider()
    • setWantedPercentage

      public void setWantedPercentage(double percentage)
    • getWantedPercentage

      public double getWantedPercentage()
    • addChild

      public void addChild(VoroNode child)
    • iterate

      public void iterate()
    • scaleRelativeVectors

      public void scaleRelativeVectors()
      Scales the relative vectors of the child nodes to the size of our current polygon. Doing this helps to preserve the mental map.
    • increasePercentageDirectly

      public void increasePercentageDirectly()
    • decreasePercentage

      public void decreasePercentage()
    • setHeight

      public void setHeight(int height)
    • getHeight

      public int getHeight()
    • setWeight

      public void setWeight(double weight)
    • getWeight

      public double getWeight()
    • setSite

      public void setSite(Site s)
    • getSite

      public Site getSite()
    • setTreemap

      public void setTreemap(VoronoiTreemap treemap)
    • getTreemap

      public VoronoiTreemap getTreemap()
    • setRelativeVector

      public void setRelativeVector(Point2D relativeVector)
    • getRelativeVector

      public Point2D getRelativeVector()
    • doFinalWork

      public void doFinalWork()
      Specified by:
      doFinalWork in interface VoroCellObject
    • setVoroPolygon

      public void setVoroPolygon(PolygonSimple polygon)
      Specified by:
      setVoroPolygon in interface VoroCellObject
    • getChildrenIDs

      public int[] getChildrenIDs()
    • getChildrenPolygons

      public PolygonSimple[] getChildrenPolygons()