The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 8077e613 authored by Jakob Schöttl's avatar Jakob Schöttl
Browse files

Simplify code

parent b90c9ffb
......@@ -331,9 +331,9 @@ public class TopographyCreatorModel extends DefaultModel implements IDrawPanelMo
}
@Override
public VShape translateElement(ScenarioElement elementToCopy, VPoint vector) {
public VShape translateElement(ScenarioElement element, VPoint vector) {
// double factor = Math.max(10,1/getGridResulution()); // ?? related to scaleTopography?
return elementToCopy.getShape().translatePrecise(alignToGrid(vector));
return element.getShape().translatePrecise(alignToGrid(vector));
}
@Override
......
......@@ -6,7 +6,6 @@ import java.awt.geom.Ellipse2D;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.math.BigDecimal;
import org.vadere.util.geometry.ShapeType;
import org.vadere.util.geometry.Vector2D;
......
......@@ -10,9 +10,6 @@ import java.util.List;
import org.vadere.util.geometry.ShapeType;
import com.vividsolutions.jts.geomgraph.Edge;
import com.vividsolutions.jts.geomgraph.index.EdgeSetIntersector;
/**
* A ring consists of two circles of different size.
*
......@@ -30,12 +27,6 @@ public class VRing implements VShape {
this(new VPoint(0, 0), radius1, radius2);
}
private VRing(VRing ring) {
this.center = ring.center;
this.radiusInnerCircle = ring.radiusInnerCircle;
this.radiusOuterCircle = ring.radiusOuterCircle;
}
public VRing(VPoint center, double radius1, double radius2) {
if (radius1 <= 0 || radius2 <= 0) {
throw new IllegalArgumentException("Radius must be positive.");
......@@ -87,6 +78,7 @@ public class VRing implements VShape {
}
@Override
// TODO not implemented, not tested!
public boolean contains(double x, double y, double w, double h) {
return contains(new VRectangle(x, y, w, h));
......@@ -116,7 +108,7 @@ public class VRing implements VShape {
}
private List<VPoint> normalizePointsToCenter(List<VPoint> points) {
List<VPoint> normalizedPoints = new ArrayList<VPoint>();
List<VPoint> normalizedPoints = new ArrayList<>();
for (VPoint point : points) {
VPoint normalizedPoint = new VPoint(point.x - center.x, point.y - center.y);
......
Markdown is supported
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