deeptwins-engine-3d 0.1.76 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
- package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
- package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
- package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
- package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
- package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
- package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
- package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
- package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
- package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
- package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
- package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
- package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
- package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
- package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
- package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
- package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
- package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
- package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
- package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
- package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
- package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
- package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
- package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
- package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
- package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
- package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
- package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
- package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
- package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
- package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
- package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
- package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
- package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
- package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
- package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
- package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
- package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
- package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
- package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
- package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
- package/dist/esm/analyze/SunLightAnalysis.js +1 -91
- package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
- package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
- package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
- package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
- package/dist/esm/cameraControl/Roam.js +1 -418
- package/dist/esm/cameraControl/Rotate.js +1 -134
- package/dist/esm/cameraControl/RotateInPlace.js +1 -99
- package/dist/esm/constant.d.ts +90 -0
- package/dist/esm/constant.js +1 -1287
- package/dist/esm/deepTwins/index.js +1 -121
- package/dist/esm/drawCommand/index.js +1 -3
- package/dist/esm/drawCommand/viewShed/Event.js +1 -142
- package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
- package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
- package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
- package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
- package/dist/esm/drawCommand/viewShed/config.js +1 -21
- package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
- package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
- package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
- package/dist/esm/drawer/algorithm.js +1 -314
- package/dist/esm/drawer/common.js +1 -965
- package/dist/esm/drawer/coordinate.js +1 -184
- package/dist/esm/drawer/index.d.ts +1 -1
- package/dist/esm/drawer/index.js +1 -688
- package/dist/esm/drawer/plotUtil.js +1 -266
- package/dist/esm/drawer/shape/Assemble.js +1 -415
- package/dist/esm/drawer/shape/AttackArrow.js +1 -442
- package/dist/esm/drawer/shape/BaseShape.js +1 -383
- package/dist/esm/drawer/shape/Bow.js +1 -375
- package/dist/esm/drawer/shape/Circle.js +1 -461
- package/dist/esm/drawer/shape/Curve.js +1 -386
- package/dist/esm/drawer/shape/DragPoint.js +1 -211
- package/dist/esm/drawer/shape/Elliptic.js +1 -491
- package/dist/esm/drawer/shape/Formation.js +1 -395
- package/dist/esm/drawer/shape/PincerArrow.js +1 -445
- package/dist/esm/drawer/shape/Point.js +1 -131
- package/dist/esm/drawer/shape/Polygon.js +1 -368
- package/dist/esm/drawer/shape/Polyline.js +1 -325
- package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
- package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
- package/dist/esm/drawer/shape/Sector.js +1 -568
- package/dist/esm/drawer/shape/StraightArrow.js +1 -422
- package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
- package/dist/esm/drawer/types.js +1 -11
- package/dist/esm/drawer/utils.js +1 -381
- package/dist/esm/global.css +22 -1
- package/dist/esm/graphicLayer/BaseEntity.js +1 -51
- package/dist/esm/graphicLayer/BaseLayer.js +1 -730
- package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
- package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
- package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
- package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
- package/dist/esm/graphicLayer/BaseSource.js +1 -630
- package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
- package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
- package/dist/esm/graphicLayer/BoxEntity.js +1 -99
- package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
- package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
- package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
- package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
- package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
- package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
- package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
- package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
- package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
- package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
- package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
- package/dist/esm/graphicLayer/LabelEntity.js +1 -110
- package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
- package/dist/esm/graphicLayer/ModelEntity.js +1 -122
- package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
- package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
- package/dist/esm/graphicLayer/PointEntity.js +1 -94
- package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
- package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
- package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
- package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
- package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
- package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
- package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
- package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
- package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
- package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
- package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
- package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
- package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
- package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
- package/dist/esm/graphicLayer/WallEntity.js +1 -96
- package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
- package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +1 -175
- package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
- package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
- package/dist/esm/lowAltitude/FactorLayer.js +1 -199
- package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
- package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
- package/dist/esm/lowAltitude/GridDraw.js +1 -137
- package/dist/esm/lowAltitude/PoiLayer.js +1 -74
- package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
- package/dist/esm/lowAltitude/VisitLayer.js +1 -180
- package/dist/esm/map/Event.js +1 -377
- package/dist/esm/map/GroundSkyBox.js +1 -166
- package/dist/esm/map/Map.js +1 -881
- package/dist/esm/map/Property.js +1 -35
- package/dist/esm/material/AtmosphericDispersion.js +1 -569
- package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
- package/dist/esm/material/VolumeCloud.js +1 -115
- package/dist/esm/material/WeatherEffects.js +1 -351
- package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
- package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
- package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
- package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
- package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
- package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
- package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
- package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
- package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
- package/dist/esm/measure/Area.js +1 -220
- package/dist/esm/measure/BaseDraw.js +1 -105
- package/dist/esm/measure/Distance.js +1 -223
- package/dist/esm/measure/index.js +1 -266
- package/dist/esm/measure/types.js +1 -17
- package/dist/esm/measure/utils.js +1 -319
- package/dist/esm/particle/BaseParticle.js +1 -196
- package/dist/esm/particle/FireParticle.js +1 -65
- package/dist/esm/particle/FountainParticle.js +1 -80
- package/dist/esm/particle/SmokeParticle.js +1 -65
- package/dist/esm/particle/common.js +1 -23
- package/dist/esm/particle/index.js +1 -5
- package/dist/esm/property/PositionProperty.js +1 -56
- package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
- package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
- package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
- package/dist/esm/tileLayer/ImageryLayer.js +1 -44
- package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
- package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
- package/dist/esm/tileLayer/RasterLayer.js +1 -23
- package/dist/esm/tileLayer/WmsLayer.js +1 -26
- package/dist/esm/tileLayer/WmtsLayer.js +1 -23
- package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
- package/dist/esm/tool/Compass.js +1 -282
- package/dist/esm/tool/PrimitiveCluster.js +1 -706
- package/dist/esm/tool/TimerInterval.js +1 -58
- package/dist/esm/tool/common.js +1 -405
- package/dist/esm/tool/fetch.js +1 -222
- package/dist/esm/tool/heatmap.js +1 -631
- package/dist/esm/tool/utils.d.ts +1 -0
- package/dist/esm/tool/utils.js +1 -501
- package/dist/esm/toolTip/index.js +1 -79
- package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
- package/dist/esm/videoFusion/BaseVideo.js +1 -330
- package/dist/esm/videoFusion/VideoProject.js +1 -230
- package/dist/esm/videoFusion/VideoTexture.js +1 -163
- package/dist/esm/visualization/BaseHeatmap.js +1 -271
- package/dist/esm/visualization/BoundaryHighlight.d.ts +136 -0
- package/dist/esm/visualization/BoundaryHighlight.js +1 -0
- package/dist/esm/visualization/DynamicWater.js +1 -289
- package/dist/esm/visualization/Frustum.js +1 -248
- package/dist/esm/visualization/Heatmap2d.js +1 -97
- package/dist/esm/visualization/Heatmap3d.js +1 -281
- package/dist/esm/visualization/MigrationEffect.js +1 -397
- package/dist/esm/visualization/PointCluster.js +1 -220
- package/dist/esm/visualization/RadarScan.js +1 -333
- package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
- package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
- package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
- package/dist/esm/visualization/SampledTerrainWater.js +1 -0
- package/dist/esm/visualization/WindField.d.ts +72 -0
- package/dist/esm/visualization/WindField.js +1 -0
- package/dist/esm/visualization/windCore.d.ts +161 -0
- package/dist/esm/visualization/windCore.js +8 -0
- package/dist/umd/deeptwins-engine-3d.min.css +1 -1
- package/dist/umd/deeptwins-engine-3d.min.js +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 0.0.42
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
EllipseGeometryLibrary_default
|
|
28
|
+
} from "./chunk-UXLKFS3C.js";
|
|
29
|
+
import {
|
|
30
|
+
GeometryOffsetAttribute_default
|
|
31
|
+
} from "./chunk-VUX4BQIM.js";
|
|
32
|
+
import {
|
|
33
|
+
IndexDatatype_default
|
|
34
|
+
} from "./chunk-XBJOJHWX.js";
|
|
35
|
+
import {
|
|
36
|
+
GeometryAttributes_default
|
|
37
|
+
} from "./chunk-MG4EVQH2.js";
|
|
38
|
+
import {
|
|
39
|
+
GeometryAttribute_default,
|
|
40
|
+
Geometry_default,
|
|
41
|
+
PrimitiveType_default
|
|
42
|
+
} from "./chunk-NXWEFAZJ.js";
|
|
43
|
+
import {
|
|
44
|
+
BoundingSphere_default
|
|
45
|
+
} from "./chunk-XUCXZZE5.js";
|
|
46
|
+
import {
|
|
47
|
+
ComponentDatatype_default
|
|
48
|
+
} from "./chunk-YTNCIBPQ.js";
|
|
49
|
+
import {
|
|
50
|
+
Cartesian3_default,
|
|
51
|
+
Ellipsoid_default
|
|
52
|
+
} from "./chunk-ZW52HXFN.js";
|
|
53
|
+
import {
|
|
54
|
+
Math_default
|
|
55
|
+
} from "./chunk-HSJSUPQV.js";
|
|
56
|
+
import {
|
|
57
|
+
defaultValue_default
|
|
58
|
+
} from "./chunk-ATLWOZFF.js";
|
|
59
|
+
import {
|
|
60
|
+
DeveloperError_default
|
|
61
|
+
} from "./chunk-PN3GIZ5Q.js";
|
|
62
|
+
import {
|
|
63
|
+
defined_default
|
|
64
|
+
} from "./chunk-JKLMRPKK.js";
|
|
65
|
+
|
|
66
|
+
// packages/engine/Source/Core/EllipseOutlineGeometry.js
|
|
67
|
+
var scratchCartesian1 = new Cartesian3_default();
|
|
68
|
+
var boundingSphereCenter = new Cartesian3_default();
|
|
69
|
+
function computeEllipse(options) {
|
|
70
|
+
const center = options.center;
|
|
71
|
+
boundingSphereCenter = Cartesian3_default.multiplyByScalar(
|
|
72
|
+
options.ellipsoid.geodeticSurfaceNormal(center, boundingSphereCenter),
|
|
73
|
+
options.height,
|
|
74
|
+
boundingSphereCenter
|
|
75
|
+
);
|
|
76
|
+
boundingSphereCenter = Cartesian3_default.add(
|
|
77
|
+
center,
|
|
78
|
+
boundingSphereCenter,
|
|
79
|
+
boundingSphereCenter
|
|
80
|
+
);
|
|
81
|
+
const boundingSphere = new BoundingSphere_default(
|
|
82
|
+
boundingSphereCenter,
|
|
83
|
+
options.semiMajorAxis
|
|
84
|
+
);
|
|
85
|
+
const positions = EllipseGeometryLibrary_default.computeEllipsePositions(
|
|
86
|
+
options,
|
|
87
|
+
false,
|
|
88
|
+
true
|
|
89
|
+
).outerPositions;
|
|
90
|
+
const attributes = new GeometryAttributes_default({
|
|
91
|
+
position: new GeometryAttribute_default({
|
|
92
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
93
|
+
componentsPerAttribute: 3,
|
|
94
|
+
values: EllipseGeometryLibrary_default.raisePositionsToHeight(
|
|
95
|
+
positions,
|
|
96
|
+
options,
|
|
97
|
+
false
|
|
98
|
+
)
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
const length = positions.length / 3;
|
|
102
|
+
const indices = IndexDatatype_default.createTypedArray(length, length * 2);
|
|
103
|
+
let index = 0;
|
|
104
|
+
for (let i = 0; i < length; ++i) {
|
|
105
|
+
indices[index++] = i;
|
|
106
|
+
indices[index++] = (i + 1) % length;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
boundingSphere,
|
|
110
|
+
attributes,
|
|
111
|
+
indices
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
var topBoundingSphere = new BoundingSphere_default();
|
|
115
|
+
var bottomBoundingSphere = new BoundingSphere_default();
|
|
116
|
+
function computeExtrudedEllipse(options) {
|
|
117
|
+
const center = options.center;
|
|
118
|
+
const ellipsoid = options.ellipsoid;
|
|
119
|
+
const semiMajorAxis = options.semiMajorAxis;
|
|
120
|
+
let scaledNormal = Cartesian3_default.multiplyByScalar(
|
|
121
|
+
ellipsoid.geodeticSurfaceNormal(center, scratchCartesian1),
|
|
122
|
+
options.height,
|
|
123
|
+
scratchCartesian1
|
|
124
|
+
);
|
|
125
|
+
topBoundingSphere.center = Cartesian3_default.add(
|
|
126
|
+
center,
|
|
127
|
+
scaledNormal,
|
|
128
|
+
topBoundingSphere.center
|
|
129
|
+
);
|
|
130
|
+
topBoundingSphere.radius = semiMajorAxis;
|
|
131
|
+
scaledNormal = Cartesian3_default.multiplyByScalar(
|
|
132
|
+
ellipsoid.geodeticSurfaceNormal(center, scaledNormal),
|
|
133
|
+
options.extrudedHeight,
|
|
134
|
+
scaledNormal
|
|
135
|
+
);
|
|
136
|
+
bottomBoundingSphere.center = Cartesian3_default.add(
|
|
137
|
+
center,
|
|
138
|
+
scaledNormal,
|
|
139
|
+
bottomBoundingSphere.center
|
|
140
|
+
);
|
|
141
|
+
bottomBoundingSphere.radius = semiMajorAxis;
|
|
142
|
+
let positions = EllipseGeometryLibrary_default.computeEllipsePositions(
|
|
143
|
+
options,
|
|
144
|
+
false,
|
|
145
|
+
true
|
|
146
|
+
).outerPositions;
|
|
147
|
+
const attributes = new GeometryAttributes_default({
|
|
148
|
+
position: new GeometryAttribute_default({
|
|
149
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
150
|
+
componentsPerAttribute: 3,
|
|
151
|
+
values: EllipseGeometryLibrary_default.raisePositionsToHeight(
|
|
152
|
+
positions,
|
|
153
|
+
options,
|
|
154
|
+
true
|
|
155
|
+
)
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
positions = attributes.position.values;
|
|
159
|
+
const boundingSphere = BoundingSphere_default.union(
|
|
160
|
+
topBoundingSphere,
|
|
161
|
+
bottomBoundingSphere
|
|
162
|
+
);
|
|
163
|
+
let length = positions.length / 3;
|
|
164
|
+
if (defined_default(options.offsetAttribute)) {
|
|
165
|
+
let applyOffset = new Uint8Array(length);
|
|
166
|
+
if (options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
|
|
167
|
+
applyOffset = applyOffset.fill(1, 0, length / 2);
|
|
168
|
+
} else {
|
|
169
|
+
const offsetValue = options.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
170
|
+
applyOffset = applyOffset.fill(offsetValue);
|
|
171
|
+
}
|
|
172
|
+
attributes.applyOffset = new GeometryAttribute_default({
|
|
173
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
174
|
+
componentsPerAttribute: 1,
|
|
175
|
+
values: applyOffset
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
let numberOfVerticalLines = defaultValue_default(options.numberOfVerticalLines, 16);
|
|
179
|
+
numberOfVerticalLines = Math_default.clamp(
|
|
180
|
+
numberOfVerticalLines,
|
|
181
|
+
0,
|
|
182
|
+
length / 2
|
|
183
|
+
);
|
|
184
|
+
const indices = IndexDatatype_default.createTypedArray(
|
|
185
|
+
length,
|
|
186
|
+
length * 2 + numberOfVerticalLines * 2
|
|
187
|
+
);
|
|
188
|
+
length /= 2;
|
|
189
|
+
let index = 0;
|
|
190
|
+
let i;
|
|
191
|
+
for (i = 0; i < length; ++i) {
|
|
192
|
+
indices[index++] = i;
|
|
193
|
+
indices[index++] = (i + 1) % length;
|
|
194
|
+
indices[index++] = i + length;
|
|
195
|
+
indices[index++] = (i + 1) % length + length;
|
|
196
|
+
}
|
|
197
|
+
let numSide;
|
|
198
|
+
if (numberOfVerticalLines > 0) {
|
|
199
|
+
const numSideLines = Math.min(numberOfVerticalLines, length);
|
|
200
|
+
numSide = Math.round(length / numSideLines);
|
|
201
|
+
const maxI = Math.min(numSide * numberOfVerticalLines, length);
|
|
202
|
+
for (i = 0; i < maxI; i += numSide) {
|
|
203
|
+
indices[index++] = i;
|
|
204
|
+
indices[index++] = i + length;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
boundingSphere,
|
|
209
|
+
attributes,
|
|
210
|
+
indices
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function EllipseOutlineGeometry(options) {
|
|
214
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
|
215
|
+
const center = options.center;
|
|
216
|
+
const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.default);
|
|
217
|
+
const semiMajorAxis = options.semiMajorAxis;
|
|
218
|
+
const semiMinorAxis = options.semiMinorAxis;
|
|
219
|
+
const granularity = defaultValue_default(
|
|
220
|
+
options.granularity,
|
|
221
|
+
Math_default.RADIANS_PER_DEGREE
|
|
222
|
+
);
|
|
223
|
+
if (!defined_default(center)) {
|
|
224
|
+
throw new DeveloperError_default("center is required.");
|
|
225
|
+
}
|
|
226
|
+
if (!defined_default(semiMajorAxis)) {
|
|
227
|
+
throw new DeveloperError_default("semiMajorAxis is required.");
|
|
228
|
+
}
|
|
229
|
+
if (!defined_default(semiMinorAxis)) {
|
|
230
|
+
throw new DeveloperError_default("semiMinorAxis is required.");
|
|
231
|
+
}
|
|
232
|
+
if (semiMajorAxis < semiMinorAxis) {
|
|
233
|
+
throw new DeveloperError_default(
|
|
234
|
+
"semiMajorAxis must be greater than or equal to the semiMinorAxis."
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
if (granularity <= 0) {
|
|
238
|
+
throw new DeveloperError_default("granularity must be greater than zero.");
|
|
239
|
+
}
|
|
240
|
+
const height = defaultValue_default(options.height, 0);
|
|
241
|
+
const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
|
|
242
|
+
this._center = Cartesian3_default.clone(center);
|
|
243
|
+
this._semiMajorAxis = semiMajorAxis;
|
|
244
|
+
this._semiMinorAxis = semiMinorAxis;
|
|
245
|
+
this._ellipsoid = Ellipsoid_default.clone(ellipsoid);
|
|
246
|
+
this._rotation = defaultValue_default(options.rotation, 0);
|
|
247
|
+
this._height = Math.max(extrudedHeight, height);
|
|
248
|
+
this._granularity = granularity;
|
|
249
|
+
this._extrudedHeight = Math.min(extrudedHeight, height);
|
|
250
|
+
this._numberOfVerticalLines = Math.max(
|
|
251
|
+
defaultValue_default(options.numberOfVerticalLines, 16),
|
|
252
|
+
0
|
|
253
|
+
);
|
|
254
|
+
this._offsetAttribute = options.offsetAttribute;
|
|
255
|
+
this._workerName = "createEllipseOutlineGeometry";
|
|
256
|
+
}
|
|
257
|
+
EllipseOutlineGeometry.packedLength = Cartesian3_default.packedLength + Ellipsoid_default.packedLength + 8;
|
|
258
|
+
EllipseOutlineGeometry.pack = function(value, array, startingIndex) {
|
|
259
|
+
if (!defined_default(value)) {
|
|
260
|
+
throw new DeveloperError_default("value is required");
|
|
261
|
+
}
|
|
262
|
+
if (!defined_default(array)) {
|
|
263
|
+
throw new DeveloperError_default("array is required");
|
|
264
|
+
}
|
|
265
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
|
266
|
+
Cartesian3_default.pack(value._center, array, startingIndex);
|
|
267
|
+
startingIndex += Cartesian3_default.packedLength;
|
|
268
|
+
Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
|
|
269
|
+
startingIndex += Ellipsoid_default.packedLength;
|
|
270
|
+
array[startingIndex++] = value._semiMajorAxis;
|
|
271
|
+
array[startingIndex++] = value._semiMinorAxis;
|
|
272
|
+
array[startingIndex++] = value._rotation;
|
|
273
|
+
array[startingIndex++] = value._height;
|
|
274
|
+
array[startingIndex++] = value._granularity;
|
|
275
|
+
array[startingIndex++] = value._extrudedHeight;
|
|
276
|
+
array[startingIndex++] = value._numberOfVerticalLines;
|
|
277
|
+
array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
|
|
278
|
+
return array;
|
|
279
|
+
};
|
|
280
|
+
var scratchCenter = new Cartesian3_default();
|
|
281
|
+
var scratchEllipsoid = new Ellipsoid_default();
|
|
282
|
+
var scratchOptions = {
|
|
283
|
+
center: scratchCenter,
|
|
284
|
+
ellipsoid: scratchEllipsoid,
|
|
285
|
+
semiMajorAxis: void 0,
|
|
286
|
+
semiMinorAxis: void 0,
|
|
287
|
+
rotation: void 0,
|
|
288
|
+
height: void 0,
|
|
289
|
+
granularity: void 0,
|
|
290
|
+
extrudedHeight: void 0,
|
|
291
|
+
numberOfVerticalLines: void 0,
|
|
292
|
+
offsetAttribute: void 0
|
|
293
|
+
};
|
|
294
|
+
EllipseOutlineGeometry.unpack = function(array, startingIndex, result) {
|
|
295
|
+
if (!defined_default(array)) {
|
|
296
|
+
throw new DeveloperError_default("array is required");
|
|
297
|
+
}
|
|
298
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
|
299
|
+
const center = Cartesian3_default.unpack(array, startingIndex, scratchCenter);
|
|
300
|
+
startingIndex += Cartesian3_default.packedLength;
|
|
301
|
+
const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
|
|
302
|
+
startingIndex += Ellipsoid_default.packedLength;
|
|
303
|
+
const semiMajorAxis = array[startingIndex++];
|
|
304
|
+
const semiMinorAxis = array[startingIndex++];
|
|
305
|
+
const rotation = array[startingIndex++];
|
|
306
|
+
const height = array[startingIndex++];
|
|
307
|
+
const granularity = array[startingIndex++];
|
|
308
|
+
const extrudedHeight = array[startingIndex++];
|
|
309
|
+
const numberOfVerticalLines = array[startingIndex++];
|
|
310
|
+
const offsetAttribute = array[startingIndex];
|
|
311
|
+
if (!defined_default(result)) {
|
|
312
|
+
scratchOptions.height = height;
|
|
313
|
+
scratchOptions.extrudedHeight = extrudedHeight;
|
|
314
|
+
scratchOptions.granularity = granularity;
|
|
315
|
+
scratchOptions.rotation = rotation;
|
|
316
|
+
scratchOptions.semiMajorAxis = semiMajorAxis;
|
|
317
|
+
scratchOptions.semiMinorAxis = semiMinorAxis;
|
|
318
|
+
scratchOptions.numberOfVerticalLines = numberOfVerticalLines;
|
|
319
|
+
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
320
|
+
return new EllipseOutlineGeometry(scratchOptions);
|
|
321
|
+
}
|
|
322
|
+
result._center = Cartesian3_default.clone(center, result._center);
|
|
323
|
+
result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
|
|
324
|
+
result._semiMajorAxis = semiMajorAxis;
|
|
325
|
+
result._semiMinorAxis = semiMinorAxis;
|
|
326
|
+
result._rotation = rotation;
|
|
327
|
+
result._height = height;
|
|
328
|
+
result._granularity = granularity;
|
|
329
|
+
result._extrudedHeight = extrudedHeight;
|
|
330
|
+
result._numberOfVerticalLines = numberOfVerticalLines;
|
|
331
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
332
|
+
return result;
|
|
333
|
+
};
|
|
334
|
+
EllipseOutlineGeometry.createGeometry = function(ellipseGeometry) {
|
|
335
|
+
if (ellipseGeometry._semiMajorAxis <= 0 || ellipseGeometry._semiMinorAxis <= 0) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const height = ellipseGeometry._height;
|
|
339
|
+
const extrudedHeight = ellipseGeometry._extrudedHeight;
|
|
340
|
+
const extrude = !Math_default.equalsEpsilon(
|
|
341
|
+
height,
|
|
342
|
+
extrudedHeight,
|
|
343
|
+
0,
|
|
344
|
+
Math_default.EPSILON2
|
|
345
|
+
);
|
|
346
|
+
ellipseGeometry._center = ellipseGeometry._ellipsoid.scaleToGeodeticSurface(
|
|
347
|
+
ellipseGeometry._center,
|
|
348
|
+
ellipseGeometry._center
|
|
349
|
+
);
|
|
350
|
+
const options = {
|
|
351
|
+
center: ellipseGeometry._center,
|
|
352
|
+
semiMajorAxis: ellipseGeometry._semiMajorAxis,
|
|
353
|
+
semiMinorAxis: ellipseGeometry._semiMinorAxis,
|
|
354
|
+
ellipsoid: ellipseGeometry._ellipsoid,
|
|
355
|
+
rotation: ellipseGeometry._rotation,
|
|
356
|
+
height,
|
|
357
|
+
granularity: ellipseGeometry._granularity,
|
|
358
|
+
numberOfVerticalLines: ellipseGeometry._numberOfVerticalLines
|
|
359
|
+
};
|
|
360
|
+
let geometry;
|
|
361
|
+
if (extrude) {
|
|
362
|
+
options.extrudedHeight = extrudedHeight;
|
|
363
|
+
options.offsetAttribute = ellipseGeometry._offsetAttribute;
|
|
364
|
+
geometry = computeExtrudedEllipse(options);
|
|
365
|
+
} else {
|
|
366
|
+
geometry = computeEllipse(options);
|
|
367
|
+
if (defined_default(ellipseGeometry._offsetAttribute)) {
|
|
368
|
+
const length = geometry.attributes.position.values.length;
|
|
369
|
+
const offsetValue = ellipseGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
370
|
+
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
|
371
|
+
geometry.attributes.applyOffset = new GeometryAttribute_default({
|
|
372
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
373
|
+
componentsPerAttribute: 1,
|
|
374
|
+
values: applyOffset
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return new Geometry_default({
|
|
379
|
+
attributes: geometry.attributes,
|
|
380
|
+
indices: geometry.indices,
|
|
381
|
+
primitiveType: PrimitiveType_default.LINES,
|
|
382
|
+
boundingSphere: geometry.boundingSphere,
|
|
383
|
+
offsetAttribute: ellipseGeometry._offsetAttribute
|
|
384
|
+
});
|
|
385
|
+
};
|
|
386
|
+
var EllipseOutlineGeometry_default = EllipseOutlineGeometry;
|
|
387
|
+
|
|
388
|
+
export {
|
|
389
|
+
EllipseOutlineGeometry_default
|
|
390
|
+
};
|