CurveRoad.js 855 B

1234567891011121314151617181920
  1. import VectorType from "../enum/VectorType.js";
  2. import Road from "./Road.js";
  3. import Setting from "../Setting";
  4. export default class CurveRoad extends Road {
  5. constructor(startId, endId, vectorId) {
  6. super(startId, endId, vectorId);
  7. this.points = []; //中心线上一系列控制点。数组是从start到end。
  8. this.leftLanesCurves = []; //左车道曲线
  9. this.rightLanesCurves = []; //左车道曲线
  10. this.leftDrivewayCount = Setting.curveRoadLeftDrivewayCount; //左边的车道个数
  11. this.rightDrivewayCount = Setting.curveRoadRightDrivewayCount; //右边的车道个数
  12. this.leftWidth = Setting.leftCurveRoadWidth;
  13. this.rightWidth = Setting.rightCurveRoadWidth;
  14. this.midDivideWidth = Setting.curveRoadMidDivideWidth;
  15. this.curves = [];
  16. this.geoType = VectorType.CurveRoad;
  17. this.setId(vectorId);
  18. }
  19. }