@Override public int getSize() { int countElements = 0; for (QuadTree child : children) { countElements += child.getSize(); } return countElements; }
@Override public void queryElements(Bounds area, Set<MapElement> target, boolean exact) { if (isInBounds(area)) { if (QTGeographicalOperator.drawFrames) { State.getInstance().getActiveRenderer().addFrameToDraw(bounds, Color.black); } for (QuadTree qt : children) { qt.queryElements(area, target, exact); } } }
@Override protected void save(DataOutput output) throws IOException { for (QuadTree child : children) { QuadTree.saveToOutput(output, child); } }
@Override protected void load(DataInput input) throws IOException { for (int i = 0; i < 4; i++) { children[i] = QuadTree.loadFromInput(input); } }