Class QuadTreeFloatBuffer


  • public class QuadTreeFloatBuffer
    extends Object
    A QuadTree backed by a FloatBuffer containing x/y coordinates of points stored in tree. Points are references by the QuadTree using their index into the FloatBuffer. Points are assumed to be packed into the FloatBuffer like: [ x0, y0, x1, y1, ... ]
    Author:
    ulman
    • Constructor Detail

      • QuadTreeFloatBuffer

        public QuadTreeFloatBuffer​(FloatBuffer buffer)
    • Method Detail

      • addIndices

        public void addIndices​(int[] indices)
      • addIndex

        public void addIndex​(int startIndex)
      • addIndex

        public void addIndex​(int startIndex,
                             int endIndex)
        Add points at indices [startIndex,endIndex) in the backing FloatBuffer to the QuadTreeInts.
      • removeIndices

        public void removeIndices​(int[] indices)
      • removeIndex

        public void removeIndex​(int startIndex)
      • removeIndex

        public void removeIndex​(int startIndex,
                                int endIndex)
        Remove points at indices [startIndex,endIndex) in the backing FloatBuffer to the QuadTreeInts.
      • setBuffer

        public void setBuffer​(FloatBuffer buffer)
        Sets a new FloatBuffer as the backing store and recreates the QuadTreeInts.
        Parameters:
        buffer -