Exemplo n.º 1
0
 public boolean hasNext() {
   if (!octantIterator.hasNext()) {
     while (i < octants.size()) {
       octantIterator.setNode(octants.get(i).getTree(classID));
       i++;
       if (octantIterator.hasNext()) {
         return true;
       }
     }
     returnIterator(this);
     return false;
   }
   return true;
 }
Exemplo n.º 2
0
 public void cleanDeletedObjects(int classID) {
   for (Octant o : leaves) {
     for (cleanObjectsIterator.setNode(o.getTree(classID)); cleanObjectsIterator.hasNext(); ) {
       ModelImpl obj = cleanObjectsIterator.next();
       if (!obj.isCacheMatching(cacheMarker)) {
         removeObject(classID, obj);
         obj.resetOctant();
         if (vizController.getVizConfig().isCleanDeletedModels()) {
           obj.cleanModel();
         }
       }
     }
   }
 }
Exemplo n.º 3
0
 public void updateObjectsPosition(int classID) {
   for (Octant o : leaves) {
     if (o.isRequiringUpdatePosition()) {
       for (updatePositionIterator.setNode(o.getTree(classID));
           updatePositionIterator.hasNext(); ) {
         ModelImpl obj = updatePositionIterator.next();
         if (!obj.isInOctreeLeaf(o)) {
           o.removeObject(classID, obj);
           obj.resetOctant();
           addObject(classID, obj);
           // TODO break the loop somehow
         }
       }
     }
   }
 }
Exemplo n.º 4
0
  public void resetObjectClass(int classID) {
    for (Octant o : leaves) {
      ParamAVLTree<ModelImpl> tree = o.getTree(classID);

      // Reset octants in objects
      for (cleanObjectsIterator.setNode(tree); cleanObjectsIterator.hasNext(); ) {
        ModelImpl obj = cleanObjectsIterator.next();
        obj.resetOctant();
        obj.cleanModel();
        obj.destroy();
      }

      // Empty the tree
      o.clear(classID);
    }
  }
Exemplo n.º 5
0
 public void remove() {
   octantIterator.remove();
 }
Exemplo n.º 6
0
 public ModelImpl next() {
   ModelImpl obj = octantIterator.next();
   return obj;
 }