Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public VisibilityInspector() {
wallVblTree = new AreaTree(new Area());
hillVblTree = new AreaTree(new Area());
pitVblTree = new AreaTree(new Area());
coverVblTree = new AreaTree(new Area());
affineTransform = new AffineTransform();
point = new Point(0, 0);
visionRange = 200;
Expand Down Expand Up @@ -199,6 +200,7 @@ private static void buildRepeatedSquaredTopology(VisibilityInspector visibilityI
Area wallArea = new Area();
Area hillArea = new Area();
Area pitArea = new Area();
Area coverArea = new Area();
wallArea.add(new Area(new Rectangle(0, 0, 750, 750)));
wallArea.subtract(new Area(new Rectangle(50, 50, 650, 650)));
for (int x = 1; x < 7; ++x) {
Expand All @@ -217,33 +219,35 @@ private static void buildRepeatedSquaredTopology(VisibilityInspector visibilityI
}
}
}
visibilityInspector.setTopology(wallArea, hillArea, pitArea, null);
visibilityInspector.setTopology(wallArea, hillArea, pitArea, coverArea);
}

private static void buildTripleIntersectionTopology(VisibilityInspector visibilityInspector) {
Area wallArea = new Area();
Area hillArea = new Area();
Area pitArea = new Area();
Area coverArea = new Area();
wallArea.add(new Area(new Rectangle(0, 0, 750, 750)));
wallArea.subtract(new Area(new Rectangle(50, 50, 650, 650)));

wallArea.add(new Area(new Polygon(new int[] {250, 450, 450}, new int[] {250, 450, 250}, 3)));
hillArea.add(new Area(new Polygon(new int[] {250, 450, 450}, new int[] {450, 450, 250}, 3)));
pitArea.add(new Area(new Polygon(new int[] {275, 325, 325}, new int[] {350, 150, 550}, 3)));

visibilityInspector.setTopology(wallArea, hillArea, pitArea, null);
visibilityInspector.setTopology(wallArea, hillArea, pitArea, coverArea);
}

private static void buildSinglePillarTopology(VisibilityInspector visibilityInspector) {
Area wallArea = new Area();
Area hillArea = new Area();
Area pitArea = new Area();
Area coverArea = new Area();
wallArea.add(new Area(new Rectangle(0, 0, 750, 750)));
wallArea.subtract(new Area(new Rectangle(50, 50, 650, 650)));

final var pillar = new Area(new Rectangle(300, 300, 50, 50));
wallArea.add(pillar);

visibilityInspector.setTopology(wallArea, hillArea, pitArea, null);
visibilityInspector.setTopology(wallArea, hillArea, pitArea, coverArea);
}
}