예제 #1
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();
         }
       }
     }
   }
 }
예제 #2
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
         }
       }
     }
   }
 }
예제 #3
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);
    }
  }
예제 #4
0
 public ModelImpl next() {
   ModelImpl obj = octantIterator.next();
   return obj;
 }