Commit 8fc0bec0 authored by Luna Riegel's avatar Luna Riegel
Browse files

Feat: Add TopoError highlighting functions

parent 1b84e3e5
......@@ -55,7 +55,7 @@ import javafx.scene.paint.Color;
public class ListErrorVisitor implements ErrorVisitor {
private HighlightController controller;
private final HighlightController controller;
private TriangulatedGeometry geom;
public ListErrorVisitor(HighlightController controller) {
......
......@@ -34,11 +34,11 @@ public class Renderer {
private CullFace currentCulling = CullFace.NONE;
private DrawMode currentDrawMode = DrawMode.FILL;
private MainWindow mainWindow;
private HighlightController highlightController;
private ListErrorVisitor errVisitor;
private final MainWindow mainWindow;
private final HighlightController highlightController;
private final ListErrorVisitor errVisitor;
private LoadingInfoDialog loadingDialog;
private final LoadingInfoDialog loadingDialog;
private List<ViewFilter> lodFilters = new ArrayList<>();
private ViewFilter roofFilter;
......@@ -50,6 +50,7 @@ public class Renderer {
this.highlightController = highlightController;
loadingDialog = new LoadingInfoDialog(mainWindow.getMainStage());
errVisitor = new ListErrorVisitor(highlightController);
setupLodFilters();
}
......@@ -503,10 +504,48 @@ public class Renderer {
});
}
private void clearAttributes() {
mainWindow.getAttributeView().getRoot().getChildren().clear();
}
public void highlightTopoErrorGeometry(Geometry geom, boolean isCandidate) {
if (isCandidate) {
highlightController.clearHighlights();
highlightController.addCandidateHighlight(geom.getPolygons(), currentTriGeom);
} else {
highlightController.highlightPolygons(geom.getPolygons(), currentTriGeom);
}
}
public void highlightTopoErrorPolygon(Polygon polygon, boolean isCandidate) {
if(isCandidate) {
highlightController.clearHighlights();
highlightController.addCandidateHighlight(polygon, currentTriGeom);
} else {
highlightController.highlight(polygon, currentTriGeom);
}
}
public void highlightTopoErrorPolygons(Collection<Polygon> subjects, Collection<Polygon> candidates) {
highlightController.highlightPolygons(subjects, currentTriGeom);
highlightController.addCandidateHighlight(candidates, currentTriGeom);
}
public void highlightTopoErrorPolygons(Polygon subject, Collection<Polygon> candidates) {
highlightController.highlight(subject, currentTriGeom);
highlightController.addCandidateHighlight(candidates, currentTriGeom);
}
public void highlightTopoErrorPolygons(Polygon subject, Polygon candidate) {
highlightController.highlight(subject, currentTriGeom);
highlightController.addCandidateHighlight(candidate, currentTriGeom);
}
public void addCandidateSkeletonHighlight(GmlId candidateId){
highlightController.addCandidateSkeletonHighlight(mainWindow.retrieveCityObject(candidateId), currentTriGeom);
}
public void highlight(Polygon p) {
highlightController.highlight(p, currentTriGeom);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment