123456789101112131415161718192021222324 |
- import CurveEdge from "../Geometry/CurveEdge.js";
- import Constant from "../Constant.js";
- import { dataService } from "./DataService.js";
- import { roadService } from "./RoadService.js";
- import { controlPointService } from "./ControlPointService.js";
- import { mathUtil } from "../Util/MathUtil.js";
- export default class CurveEdgeService {
- constructor() {}
- create(start, end, vectorId, parentId) {
- let curveEdge = new CurveEdge(start, end, vectorId, parentId);
- this.setCurves(curveEdge);
- dataService.addCurveEdge(curveEdge);
- return curveEdge;
- }
- setCurves(curveEdge) {
- curveEdge.curves = mathUtil.getCurvesByPoints(curveEdge.points);
- }
- }
- const curveEdgeService = new CurveEdgeService();
- export { curveEdgeService };
|