Class FRQuadTree.Node

java.lang.Object
org.jgrapht.alg.drawing.FRQuadTree.Node
Enclosing class:
FRQuadTree

public class FRQuadTree.Node extends Object
The Quad-Tree node.
  • Field Details

  • Constructor Details

    • Node

      public Node(Box2D box)
      Create a new node for a given area
      Parameters:
      box - the area
  • Method Details

    • isLeaf

      public boolean isLeaf()
      Check if a node is a leaf.
      Returns:
      true if leaf, false otherwise
    • getPoints

      public List<Point2D> getPoints()
      Get a list of all points contained in this node.
      Returns:
      a list of points
    • hasPoints

      public boolean hasPoints()
      Check if the node contains any points.
      Returns:
      true if the node contains points, false otherwise
    • getBox

      public Box2D getBox()
      Get the area represented by this node.
      Returns:
      the area of the node
    • getNumberOfPoints

      public int getNumberOfPoints()
      Get the total number of points under this node.
      Returns:
      the total number of points
    • getCentroid

      public Point2D getCentroid()
      Get the centroid of all points contained in this node.
      Returns:
      the centroid of all points contained in this node
    • getChildren

      public List<FRQuadTree.Node> getChildren()
      Get the children of this node as a list.
      Returns:
      a list containing the children of this node