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(); } } } } }
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 } } } } }
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); } }
public ModelImpl next() { ModelImpl obj = octantIterator.next(); return obj; }