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