Package arc.math.geom

Class IntQuadTree

java.lang.Object
arc.math.geom.IntQuadTree

public class IntQuadTree extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • split

      protected void split()
    • unsplit

      protected void unsplit()
    • insert

      public void insert(int obj)
      Inserts an object into this node or its child nodes. This will split a leaf node if it exceeds the object limit.
    • remove

      public boolean remove(int obj)
      Removes an object from this node or its child nodes.
    • clear

      public void clear()
      Removes all objects.
    • getFittingChild

      protected IntQuadTree getFittingChild(Rect boundingBox)
    • intersect

      public void intersect(float x, float y, float width, float height, Intc out)
      Processes objects that may intersect the given rectangle.

      This will never result in false positives.

    • any

      public boolean any(float x, float y, float width, float height)
      Returns:
      whether an object overlaps this rectangle. This will never result in false positives.
    • intersect

      public void intersect(Rect rect, Intc out)
      Processes objects that may intersect the given rectangle.

      This will never result in false positives.

    • intersect

      public void intersect(Rect toCheck, IntSeq out)
      Fills the out parameter with any objects that may intersect the given rectangle.

      This will result in false positives, but never a false negative.

    • intersect

      public void intersect(float x, float y, float width, float height, IntSeq out)
      Fills the out parameter with any objects that may intersect the given rectangle.
    • getObjects

      public void getObjects(IntSeq out)
      Adds all quadtree objects to the specified Seq.
    • newChild

      protected IntQuadTree newChild(Rect rect)
    • hitbox

      protected void hitbox(int t)