|
@@ -94,7 +94,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
leftCurveEdge.points[startIndex],
|
|
|
leftCurveEdge.points[startIndex + 1]
|
|
|
);
|
|
|
- const leftJoin = mathUtil.getLineForPoint(leftLine, position);
|
|
|
+ const leftJoin = mathUtil.getJoinLinePoint(position, leftLine);
|
|
|
leftCurveEdge.points.splice(startIndex + 1, 0, leftJoin);
|
|
|
|
|
|
const rightCurveEdge = dataService.getCurveEdge(curveRoad.rightEdgeId);
|
|
@@ -102,7 +102,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
rightCurveEdge.points[startIndex],
|
|
|
rightCurveEdge.points[startIndex + 1]
|
|
|
);
|
|
|
- const rightJoin = mathUtil.getLineForPoint(rightLine, position);
|
|
|
+ const rightJoin = mathUtil.getJoinLinePoint(position, rightLine);
|
|
|
rightCurveEdge.points.splice(startIndex + 1, 0, rightJoin);
|
|
|
|
|
|
this.insertCPointToLanes(curveRoad, position, startIndex);
|
|
@@ -114,7 +114,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
curveRoad.leftLanes[i][index],
|
|
|
curveRoad.leftLanes[i][index + 1]
|
|
|
);
|
|
|
- const leftJoin = mathUtil.getLineForPoint(leftLine, position);
|
|
|
+ const leftJoin = mathUtil.getJoinLinePoint(position, leftLine);
|
|
|
curveRoad.leftLanes[i].splice(index + 1, 0, leftJoin);
|
|
|
}
|
|
|
|
|
@@ -123,7 +123,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
curveRoad.rightLanes[i][index],
|
|
|
curveRoad.rightLanes[i][index + 1]
|
|
|
);
|
|
|
- const rightJoin = mathUtil.getLineForPoint(rightLine, position);
|
|
|
+ const rightJoin = mathUtil.getJoinLinePoint(position, rightLine);
|
|
|
curveRoad.rightLanes[i].splice(index + 1, 0, rightJoin);
|
|
|
}
|
|
|
}
|
|
@@ -200,7 +200,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
|
|
|
let join = mathUtil.getIntersectionPoint(line1, line2);
|
|
|
if (join == null) {
|
|
|
- join = mathUtil.getLineForPoint(line1, points[j]);
|
|
|
+ join = mathUtil.getJoinLinePoint(points[j], line1);
|
|
|
}
|
|
|
leftLanes[i][j].x = join.x;
|
|
|
leftLanes[i][j].y = join.y;
|
|
@@ -257,7 +257,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
|
|
|
let join = mathUtil.getIntersectionPoint(line1, line2);
|
|
|
if (join == null) {
|
|
|
- join = mathUtil.getLineForPoint(line1, points[j]);
|
|
|
+ join = mathUtil.getJoinLinePoint(points[j], line1);
|
|
|
}
|
|
|
rightLanes[i][j].x = join.x;
|
|
|
rightLanes[i][j].y = join.y;
|
|
@@ -341,7 +341,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
|
|
|
let join = mathUtil.getIntersectionPoint(line1, line2);
|
|
|
if (join == null) {
|
|
|
- join = mathUtil.getLineForPoint(line1, curveRoad.points[j]);
|
|
|
+ join = mathUtil.getJoinLinePoint(curveRoad.points[j], line1);
|
|
|
}
|
|
|
lanes[i][j].x = join.x;
|
|
|
lanes[i][j].y = join.y;
|
|
@@ -391,7 +391,7 @@ export default class CurveRoadService extends RoadService {
|
|
|
|
|
|
let join = mathUtil.getIntersectionPoint(line1, line2);
|
|
|
if (join == null) {
|
|
|
- join = mathUtil.getLineForPoint(line1, curveRoad.points[j]);
|
|
|
+ join = mathUtil.getJoinLinePoint(curveRoad.points[j], line1);
|
|
|
}
|
|
|
curveEdge.points[k].x = join.x;
|
|
|
curveEdge.points[k].y = join.y;
|