Class QuadTreeFloatBuffer
- java.lang.Object
-
- com.metsci.glimpse.core.support.selection.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 Summary
Constructors Constructor Description QuadTreeFloatBuffer(FloatBuffer buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIndex(int startIndex)
void
addIndex(int startIndex, int endIndex)
Add points at indices [startIndex,endIndex) in the backing FloatBuffer to the QuadTreeInts.void
addIndices(int[] indices)
QuadTreeInts
getIndex()
void
removeIndex(int startIndex)
void
removeIndex(int startIndex, int endIndex)
Remove points at indices [startIndex,endIndex) in the backing FloatBuffer to the QuadTreeInts.void
removeIndices(int[] indices)
void
setBuffer(FloatBuffer buffer)
Sets a new FloatBuffer as the backing store and recreates the QuadTreeInts.
-
-
-
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
-
-
getIndex
public QuadTreeInts getIndex()
-
-