12345678910111213141516171819202122 |
- import VectorType from "../enum/VectorType.js";
- import Geometry from "./Geometry.js";
- import Road from "./Road.js";
- import Constant from "../Constant";
- export default class CurveRoad extends Road {
- constructor(startId, endId, vectorId) {
- super(startId, endId, vectorId);
- this.startId = startId;
- this.endId = endId;
- this.points = []; //中心线上一系列控制点。数组是从start到end。
- this.leftEdgeId = null;
- this.rightEdgeId = null;
- this.leftLanes = []; //二维数组。第一维表示第几个车道,第二维是一组点
- this.rightLanes = [];
- this.width = Constant.defaultRoadWidth; //默认宽度
- this.leftDrivewayCount = 2; //左边的车道个数
- this.rightDrivewayCount = 2; //右边的车道个数
- this.geoType = VectorType.CurveRoad;
- }
- }
|