Changeset 35812 in osm for applications/editors/josm
- Timestamp:
- 2021-08-25T20:15:47+02:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java
r34925 r35812 122 122 123 123 /** 124 * Returns meters per pixel 124 125 * @return meters per pixel 125 126 */ -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/Path.java
r33085 r35812 355 355 final double r1 = radius(a1) - s * ws; 356 356 357 final Curve c1 = new Curve(prev, fromRadius - ws, r1, offsetAngle(prev, a1), l1, fromAngle);357 final Curve c1 = new Curve(prev, fromRadius - ws, r1, a1, l1, fromAngle); 358 358 359 359 final double l2 = m2 - m1; … … 369 369 final double r1 = radius(a1) - s * ws; 370 370 371 final Curve c1 = new Curve(prev, fromRadius - s * ws, r1, offsetAngle(prev, a1), l1, fromAngle);371 final Curve c1 = new Curve(prev, fromRadius - s * ws, r1, a1, l1, fromAngle); 372 372 373 373 final double w = ws + (ML - m1) * (we - ws) / (m2 - m1); … … 381 381 final double r2 = radius(a2) - s * we; 382 382 383 final Curve c2 = new Curve(prev, fromRadius - s * w, r2, offsetAngle(prev, a2), l2, fromAngle);383 final Curve c2 = new Curve(prev, fromRadius - s * w, r2, a2, l2, fromAngle); 384 384 385 385 return new Curve(c2, r2, toRadius - s * we, angle - a2, ML - m2); … … 388 388 final double w2 = we - (m2 - ML) * (we - ws) / (m2 - m1); 389 389 390 return new Curve(prev, fromRadius - s * w1, toRadius - s * w2, offsetAngle(prev, angle), length,390 return new Curve(prev, fromRadius - s * w1, toRadius - s * w2, angle, length, 391 391 fromAngle); 392 392 } … … 401 401 } 402 402 403 private double offsetAngle(Path prev, double a) {404 return a; // + GuiUtil.normalize(previous.getEndAngle()405 // - prev.getEndAngle());406 }407 408 403 private Path simpleOffset(Path prev, double w) { 409 404 final double s = signum(angle); 410 return new Curve(prev, fromRadius - s * w, toRadius - s * w, offsetAngle(prev, angle), length, fromAngle);405 return new Curve(prev, fromRadius - s * w, toRadius - s * w, angle, length, fromAngle); 411 406 } 412 407 -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Road.java
r34976 r35812 86 86 87 87 /** 88 * Returns the turns <em>onto</em> this road at this end 88 89 * @return the turns <em>onto</em> this road at this end 89 90 */ -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java
r34976 r35812 62 62 63 63 final List<Way> tmp = TurnlanesUtils.getMemberWays(r, Constants.TURN_ROLE_VIA); 64 final Li nkedList<Road> via = new LinkedList<>();64 final List<Road> via = new LinkedList<>(); 65 65 66 66 final Road.End fromRoadEnd = c.getJunction(TurnlanesUtils.lineUp(from, tmp.get(0))).getRoadEnd(from); … … 96 96 } 97 97 final Road.End toRoadEnd = c.getJunction(n).getRoadEnd(to); 98 n = TurnlanesUtils.getOppositeEnd(to, n);99 98 100 99 final Set<Turn> result = new HashSet<>(); -
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/TurnlanesUtils.java
r34978 r35812 101 101 102 102 /** 103 * 103 * Lines up given ways 104 104 * @param a first way 105 105 * @param b second way
Note:
See TracChangeset
for help on using the changeset viewer.