Skip to content

Commit 483ba60

Browse files
committed
【杨琨】【添加注释】
1 parent 49f5ca2 commit 483ba60

10 files changed

+220
-79
lines changed

src/service/3DPlot/Primitive/ElementInstance/IrregularElementInstance.js

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
/*
2-
* @Description:
3-
* @Author: zk
4-
* @Date: 2022-01-12 13:59:36
5-
* @LastEditors: Do not edit
6-
* @LastEditTime: 2022-03-31 10:31:38
7-
*/
81
import { defined } from "../../../../service/PlotUtilBase/Check";
92
import RegularLineElementInstance from "./RegularLineElementInstance";
103
import GeomUtil from "../../../../service/PlotUtilBase/Geometry/GeomUtil";
114

5+
/**
6+
* @class module:3DPlot.IrregularElementInstance
7+
* @description SVG的非规则符号解析器
8+
* @author 基础平台-杨琨
9+
*/
1210
export default class IrregularElementInstance extends RegularLineElementInstance {
11+
12+
/**
13+
* @function module:3DPlot.IrregularElementInstance.svgToGeomInstances
14+
* @description 重载父类的svgToGeomInstances方法
15+
* @public
16+
* @override
17+
*
18+
* @param {Object} elem SVG符号对象
19+
* @param {Object} options 额外参数
20+
* @param {function} callback 回调函数
21+
*/
1322
svgToGeomInstances(elem, options, callback) {
1423
const instances = this.pathElemToGeomInstance(elem, options);
1524
let wallGeomInstances;
@@ -21,6 +30,15 @@ export default class IrregularElementInstance extends RegularLineElementInstance
2130
callback({ instances, wallGeomInstances });
2231
}
2332

33+
/**
34+
* @function module:3DPlot.IrregularElementInstance.pathElemToGeomInstance
35+
* @description 重载父类的pathElemToGeomInstance方法
36+
* @public
37+
* @override
38+
*
39+
* @param {Object} elem SVG的path符号对象
40+
* @param {Object} options 额外参数
41+
*/
2442
pathElemToGeomInstance(elem, options) {
2543
const instances = [];
2644
const coords = elem.cacheCoords || elem.getCoords();

src/service/3DPlot/Primitive/ElementInstance/KidneyAreaElementInstance.js

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
/*
2-
* @Author: your name
3-
* @Date: 2021-11-04 15:54:38
4-
* @LastEditTime: 2022-05-20 19:54:49
5-
* @LastEditors: zk
6-
* @Description: In User Settings Edit
7-
* @FilePath: \MapGISPlotBase\src\3DPlot\Primitive\ElementInstance\KidneyAreaElementInstance.js
8-
*/
91
import RegularLine1ElementInstance from "./RegularLine1ElementInstance";
102
import {CesiumGeomUtil} from "../../Utils/CesiumUtil";
3+
4+
/**
5+
* @class module:3DPlot.KidneyAreaElementInstance
6+
* @description SVG的二类线符号解析基类
7+
* @author 基础平台-杨琨
8+
*/
119
export default class KidneyAreaElementInstance extends RegularLine1ElementInstance {
10+
11+
/**
12+
* @function module:3DPlot.KidneyAreaElementInstance.transfromGeoCesium
13+
* @description: 重载父类的transfromGeoCesium方法
14+
* @public
15+
* @override
16+
*
17+
* @param {Object} elem SVG符号对象
18+
* @param {Object} cesgeo 三维几何体对象
19+
* @param {Object} options 额外参数
20+
*/
1221
transfromGeoCesium(elem, cesgeo, options) {
1322
CesiumGeomUtil.degreesWithHeightToWorldCoords(
1423
cesgeo,

src/service/3DPlot/Primitive/ElementInstance/RegularLine1ElementInstance.js

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
1-
/*
2-
* @Author: your name
3-
* @Date: 2021-10-25 10:26:48
4-
* @LastEditTime: 2022-05-23 09:13:04
5-
* @LastEditors: zk
6-
* @Description: In User Settings Edit
7-
* @FilePath: \MapGISPlotBase\src\3DPlot\Primitive\ElementInstance\RegularLine1ElementInstance.js
8-
*/
9-
101
import { CesiumGeomUtil, CesiumUtil } from "../../Utils/CesiumUtil";
112
import MainElement from "../../../../service/PlotBase/SvgLoader/element/extend/MainElement";
123
import RegularLineElementInstance from "./RegularLineElementInstance";
134

5+
/**
6+
* @class module:3DPlot.RegularLine1ElementInstance
7+
* @description SVG的一类线符号解析器
8+
* @author 基础平台-杨琨
9+
*/
1410
export default class RegularLine1ElementInstance extends RegularLineElementInstance {
11+
12+
/**
13+
* @function module:3DPlot.RegularLineElementInstance.pathElemToWallGeomInstance
14+
* @description 重载父类的pathElemToWallGeomInstance方法
15+
* @public
16+
* @override
17+
*
18+
* @param {Object} pathElem SVG的path符号对象
19+
* @param {Object} options 额外参数
20+
*/
1521
pathElemToWallGeomInstance(pathElem, options) {
1622
if (!(pathElem instanceof MainElement)) return undefined;
1723
return super.pathElemToWallGeomInstance(pathElem, options);
1824
}
1925

26+
/**
27+
* @function module:3DPlot.SvgElementInstance.transfromGeoCesium
28+
* @description: 重载父类的transfromGeoCesium方法
29+
* @public
30+
* @override
31+
*
32+
* @param {Object} elem SVG符号对象
33+
* @param {Object} cesgeo 三维几何体对象
34+
* @param {Object} options 额外参数
35+
*/
2036
transfromGeoCesium(elem, cesgeo, options) {
2137
super.transfromGeoCesium(elem, cesgeo, options);
2238
const {dimModAttitude}=options
@@ -25,6 +41,14 @@ export default class RegularLine1ElementInstance extends RegularLineElementInsta
2541
}
2642
}
2743

44+
/**
45+
* @description: 对三维几何体机型坐标系转化,墨卡托转经纬度
46+
* @private
47+
*
48+
* @param {Object} ele SVG符号对象
49+
* @param {Object} cesGeom 三维几何体对象
50+
* @param {Object} options 额外参数
51+
*/
2852
_rotatePart(ele, cesGeom, options) {
2953
const { dimModHeight } = options;
3054
if (ele instanceof MainElement) return;
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
/*
2-
* @Author: your name
3-
* @Date: 2021-10-25 10:26:48
4-
* @LastEditTime: 2022-02-23 10:16:10
5-
* @LastEditors: Do not edit
6-
* @Description: In User Settings Edit
7-
* @FilePath: \MapGISPlotBase\src\3DPlot\Primitive\ElementInstance\RegularLine1ElementInstance.js
8-
*/
91
import RegularLineElementInstance from "./RegularLineElementInstance";
102

3+
/**
4+
* @class module:3DPlot.RegularLine2ElementInstance
5+
* @description SVG的二类线符号解析器
6+
* @author 基础平台-杨琨
7+
*/
118
export default class RegularLine2ElementInstance extends RegularLineElementInstance {}

src/service/3DPlot/Primitive/ElementInstance/RegularLineElementInstance.js

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
/*
2-
* @Author: your name
3-
* @Date: 2021-10-25 10:26:48
4-
* @LastEditTime: 2022-05-20 17:14:28
5-
* @LastEditors: zk
6-
* @Description: In User Settings Edit
7-
* @FilePath: \MapGISPlotBase\src\3DPlot\Primitive\ElementInstance\RegularLine1ElementInstance.js
8-
*/
91
import SvgElementInstance from "./SvgElementInstance";
102
import { CesiumGeomUtil, CesiumUtil } from "../../Utils/CesiumUtil";
113
import MainElement from "../../../../service/PlotBase/SvgLoader/element/extend/MainElement";
124
import { defined } from "../../../PlotUtilBase/Check";
135

6+
/**
7+
* @class module:3DPlot.RegularLineElementInstance
8+
* @description SVG的线符号解析基类
9+
* @author 基础平台-杨琨
10+
*/
1411
export default class RegularLineElementInstance extends SvgElementInstance {
12+
13+
/**
14+
* @function module:3DPlot.RegularLineElementInstance.svgToGeomInstances
15+
* @description 重载父类的svgToGeomInstances方法
16+
* @public
17+
* @override
18+
*
19+
* @param {Object} elem SVG符号对象
20+
* @param {Object} options 额外参数
21+
* @param {function} callback 回调函数
22+
*/
1523
svgToGeomInstances(elem, options, callback) {
1624
let that = this;
1725
super.svgToGeomInstances(elem, options, function (instances, wallOffsetHeights) {
@@ -21,10 +29,13 @@ export default class RegularLineElementInstance extends SvgElementInstance {
2129
}
2230

2331
/**
24-
* 生成墙
25-
* @param {*} elem
26-
* @param {*} options
27-
* @returns
32+
* @function module:3DPlot.RegularLineElementInstance.generateWallGeometryInstances
33+
* @description 生成三维墙体几何对象
34+
* @public
35+
*
36+
* @param {Object} elem SVG符号对象
37+
* @param {Object} options 额外参数
38+
* @param {Array} wallOffsetHeights 开启高程采样是墙体的抬高高度数组
2839
*/
2940
generateWallGeometryInstances(elem, options, wallOffsetHeights) {
3041
if (!options.isOpenWall) return undefined;
@@ -55,6 +66,15 @@ export default class RegularLineElementInstance extends SvgElementInstance {
5566
return instances;
5667
}
5768

69+
/**
70+
* @function module:3DPlot.RegularLineElementInstance.pathElemToWallGeomInstance
71+
* @description 生成三维墙的CesiumGeometry对象
72+
* @public
73+
*
74+
* @param {Object} pathElem SVG的path符号对象
75+
* @param {Object} options 额外参数
76+
* @param {Array} wallOffsetHeights 开启高程采样是墙体的抬高高度数组
77+
*/
5878
pathElemToWallGeomInstance(pathElem, options, wallOffsetHeights) {
5979
const wallHeight = options.dimModHeight;
6080
const wallColor = options.wallColor;
@@ -123,6 +143,15 @@ export default class RegularLineElementInstance extends SvgElementInstance {
123143
return instances;
124144
}
125145

146+
/**
147+
* @function module:3DPlot.RegularLineElementInstance.pathElemToGeomInstance
148+
* @description 重载父类的pathElemToGeomInstance方法
149+
* @public
150+
* @override
151+
*
152+
* @param {Object} pathElem SVG的path符号对象
153+
* @param {Object} options 额外参数
154+
*/
126155
pathElemToGeomInstance(pathElem, options) {
127156
const instances = [];
128157
const style=pathElem.getContextStyle()
@@ -182,6 +211,15 @@ export default class RegularLineElementInstance extends SvgElementInstance {
182211
return instances;
183212
}
184213

214+
/**
215+
* @function module:3DPlot.SvgElementInstance.transformExtrudeGeometry
216+
* @description: 重载父类的transformExtrudeGeometry方法
217+
* @public
218+
* @override
219+
*
220+
* @param {Object} geometry 三维几何体对象
221+
* @param {Object} options 额外参数
222+
*/
185223
transformExtrudeGeometry(geometry,options) {
186224
if (!defined(geometry)) return;
187225

@@ -200,6 +238,16 @@ export default class RegularLineElementInstance extends SvgElementInstance {
200238
}
201239
}
202240

241+
/**
242+
* @function module:3DPlot.SvgElementInstance.transfromGeoCesium
243+
* @description: 重载父类的transfromGeoCesium方法
244+
* @public
245+
* @override
246+
*
247+
* @param {Object} elem SVG符号对象
248+
* @param {Object} cesGeom 三维几何体对象
249+
* @param {Object} options 额外参数
250+
*/
203251
transfromGeoCesium(elem,cesGeom, options) {
204252
CesiumGeomUtil.degreesWithHeightToWorldCoords(
205253
cesGeom,

src/service/3DPlot/Primitive/ElementInstance/RegularPointElementInstance.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
/*
2-
* @Author: your name
3-
* @Date: 2021-10-25 10:29:02
4-
* @LastEditTime: 2022-05-20 10:25:10
5-
* @LastEditors: zk
6-
* @Description: In User Settings Edit
7-
* @FilePath: \MapGISPlotBase\src\3DPlot\Primitive\ElementInstance\RegularPointElementInstance.js\
8-
*/
91
import SvgElementInstance from "./SvgElementInstance";
102
import {CesiumGeomUtil} from "../../Utils/CesiumUtil";
113

4+
/**
5+
* @class module:3DPlot.RegularPointElementInstance
6+
* @description SVG的点符号解析器
7+
* @author 基础平台-杨琨
8+
*/
129
export default class RegularPointElementInstance extends SvgElementInstance {
1310

11+
/**
12+
* @function module:3DPlot.SvgElementInstance.transformExtrudeGeometry
13+
* @description: 重载父类的transfromGeoCesium方法
14+
* @public
15+
* @override
16+
*
17+
* @param {Object} elem SVG符号对象
18+
* @param {Object} cesgeo 三维几何体对象
19+
* @param {Object} options 额外参数
20+
*/
1421
transfromGeoCesium(elem,cesgeo, options) {
1522
const { dimModHeight, dimModAttitude } = options;
1623

src/service/3DPlot/Primitive/ElementInstance/RegularSurfaceElementInstance.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
/*
2-
* @Author: your name
3-
* @Date: 2021-10-25 11:15:18
4-
* @LastEditTime: 2022-05-23 19:01:26
5-
* @LastEditors: zk
6-
* @Description: In User Settings Edit
7-
* @FilePath: \MapGISPlotBase\src\3DPlot\Primitive\ElementInstance\RegularSurfaceElementInstance.js
8-
*/
91
import Bounds from "../../../../service/PlotUtilBase/Geometry/Bound";
102
import {CesiumUtil} from "../../Utils/CesiumUtil";
113
import SvgElementInstance from "./SvgElementInstance";
124

5+
/**
6+
* @class module:3DPlot.RegularSurfaceElementInstance
7+
* @description SVG的一类区符号解析基类
8+
* @author 基础平台-杨琨
9+
*/
1310
export default class RegularSurfaceElementInstance extends SvgElementInstance {
11+
12+
/**
13+
* @function module:3DPlot.SvgElementInstance.svgToGeomInstances
14+
* @description 重载父类的svgToGeomInstances方法
15+
* @public
16+
* @override
17+
*
18+
* @param {Object} elem SVG符号对象
19+
* @param {Object} options 额外参数
20+
* @param {function} callback 回调函数
21+
*/
1422
svgToGeomInstances(elem, options, callback) {
1523
const {surfaceBorderWidth} = options
1624
this.polylineOutInstance = null;
@@ -52,6 +60,14 @@ export default class RegularSurfaceElementInstance extends SvgElementInstance {
5260
});
5361
}
5462

63+
/**
64+
* @function module:3DPlot.SvgElementInstance.pathElemToGeomInstance
65+
* @description 重载父类的pathElemToGeomInstance方法
66+
* @public
67+
* @override
68+
*
69+
* @param {Object} elem path元素的符号对象
70+
*/
5571
pathElemToGeomInstance(elem) {
5672
const _parts = elem.cacheCoords || elem.getCoords();
5773

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
/*
2-
* @class:
3-
* @Description:
4-
* @Author: zk
5-
* @Date: 2022-05-23 16:44:52
6-
* @LastEditors: zk
7-
* @LastEditTime: 2022-05-23 16:44:52
8-
*/
9-
101
import SimpleLineElementInstance from "./SimpleLineElementInstance";
2+
3+
/**
4+
* @class module:3DPlot.SimpleAreaForKidneyElementInstance
5+
* @description SVG的新规则区符号解析基类
6+
* @author 基础平台-杨琨
7+
*/
118
export default class SimpleAreaForKidneyElementInstance extends SimpleLineElementInstance {
129
}

0 commit comments

Comments
 (0)