コード例 #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;
 }
コード例 #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();
         }
       }
     }
   }
 }
コード例 #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
         }
       }
     }
   }
 }
コード例 #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);
    }
  }