Example #1
0
 @Override
 public int getSize() {
   int countElements = 0;
   for (QuadTree child : children) {
     countElements += child.getSize();
   }
   return countElements;
 }
Example #2
0
 @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);
     }
   }
 }
Example #3
0
 @Override
 protected void save(DataOutput output) throws IOException {
   for (QuadTree child : children) {
     QuadTree.saveToOutput(output, child);
   }
 }
Example #4
0
 @Override
 protected void load(DataInput input) throws IOException {
   for (int i = 0; i < 4; i++) {
     children[i] = QuadTree.loadFromInput(input);
   }
 }