@cesium/engine 4.0.0 → 6.0.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/Build/Workers/{chunk-SGRWJKNO.js → chunk-2AEUVYIC.js} +15 -15
- package/Build/Workers/{chunk-FKHRSGKP.js → chunk-2HEFBNI2.js} +13 -13
- package/Build/Workers/{chunk-2C65EKYA.js → chunk-2IZ2LJ3N.js} +1 -1
- package/Build/Workers/{chunk-YLS3FX3U.js → chunk-3ENSLRZD.js} +7 -7
- package/Build/Workers/{chunk-H6MBQ4W4.js → chunk-3FNFTDKS.js} +4 -4
- package/Build/Workers/{chunk-27R2KRIK.js → chunk-437Q4WBM.js} +6 -6
- package/Build/Workers/{chunk-RRUPTJ6P.js → chunk-54QBXZYE.js} +6 -6
- package/Build/Workers/{chunk-UN7AK64D.js → chunk-6EZ4NFIC.js} +2 -2
- package/Build/Workers/{chunk-YMJPANZZ.js → chunk-7FAOTOUR.js} +10 -34
- package/Build/Workers/{chunk-KAFF2QX3.js → chunk-7W3AMBD6.js} +5 -5
- package/Build/Workers/{chunk-PWDYKCNC.js → chunk-A7T4GOG3.js} +4 -4
- package/Build/Workers/{chunk-LGSGX2RH.js → chunk-AMGYJNEB.js} +10 -10
- package/Build/Workers/{chunk-F7P2HCYZ.js → chunk-ASJKRCO4.js} +2 -2
- package/Build/Workers/chunk-AXODHVUI.js +55 -0
- package/Build/Workers/{chunk-P7PWX5HR.js → chunk-BKVKFLIC.js} +7 -7
- package/Build/Workers/{chunk-YLAFWVOW.js → chunk-BWTCHYX6.js} +10 -10
- package/Build/Workers/{chunk-DJUTBX6A.js → chunk-BZHAJSUN.js} +2 -2
- package/Build/Workers/{chunk-LQRFWCNX.js → chunk-CBV4JE6S.js} +5 -5
- package/Build/Workers/{chunk-BT6YIL2N.js → chunk-CGHLEZ43.js} +1 -1
- package/Build/Workers/{chunk-TF5D2H7B.js → chunk-CLVX47CD.js} +5 -5
- package/Build/Workers/{chunk-P4M4QUNQ.js → chunk-DI3VM6NF.js} +6 -6
- package/Build/Workers/{chunk-U5LKG6LX.js → chunk-DUMQKN4C.js} +2 -2
- package/Build/Workers/{chunk-H52L6U76.js → chunk-DZUFRYQK.js} +11 -11
- package/Build/Workers/{chunk-RDCDRNJ7.js → chunk-EFUPZTUD.js} +6 -6
- package/Build/Workers/{chunk-PW5CA4MJ.js → chunk-EJWAO37W.js} +7 -7
- package/Build/Workers/{chunk-A6EA6KIE.js → chunk-EZPA2AXQ.js} +1 -1
- package/Build/Workers/{chunk-7CZEWQWE.js → chunk-FBRBVOAJ.js} +6 -6
- package/Build/Workers/{chunk-PGB3EFR7.js → chunk-FDNL4I6K.js} +6 -6
- package/Build/Workers/{chunk-FYHCAKU6.js → chunk-FK5BM4WD.js} +11 -11
- package/Build/Workers/{chunk-527JG4D7.js → chunk-GQ66IPL6.js} +1 -1
- package/Build/Workers/{chunk-V2LKNJGT.js → chunk-HW6ANEVG.js} +5 -5
- package/Build/Workers/{chunk-2NLMZNJI.js → chunk-HYNBEK4C.js} +4 -4
- package/Build/Workers/{chunk-N5MMDSD2.js → chunk-I6R5G76Q.js} +2 -2
- package/Build/Workers/{chunk-XZVQMPWG.js → chunk-J5YKECLG.js} +5 -5
- package/Build/Workers/{chunk-7IMAWM6A.js → chunk-KGVHVTX7.js} +229 -17
- package/Build/Workers/{chunk-QIS3NB7U.js → chunk-KXTDRKW5.js} +7 -7
- package/Build/Workers/{chunk-4VWUFKYW.js → chunk-LCMSJE5D.js} +12 -12
- package/Build/Workers/{chunk-XJCTFTBM.js → chunk-M57VBCI4.js} +5 -5
- package/Build/Workers/{chunk-EQ6ZAP37.js → chunk-MOSBHBQO.js} +7 -7
- package/Build/Workers/{chunk-FE2XG3SS.js → chunk-MQ32KIOU.js} +3 -3
- package/Build/Workers/{chunk-TVYIHH4V.js → chunk-PZKVP2WI.js} +14 -14
- package/Build/Workers/{chunk-NRETMGYL.js → chunk-SAYI6XNA.js} +13 -13
- package/Build/Workers/{chunk-5U4UHRZ2.js → chunk-TV4Q4TKV.js} +10 -10
- package/Build/Workers/{chunk-4V6RCTVH.js → chunk-TWN33EAP.js} +10 -10
- package/Build/Workers/{chunk-AXGQUPXA.js → chunk-VBOAZG67.js} +17 -17
- package/Build/Workers/{chunk-UGZGTV5K.js → chunk-VEPSTOBV.js} +8 -8
- package/Build/Workers/{chunk-C6MRR5YL.js → chunk-W2LZZCAF.js} +7 -7
- package/Build/Workers/{chunk-VSCXSFHE.js → chunk-XEOY7FXL.js} +13 -13
- package/Build/Workers/{chunk-QVJ6IRKV.js → chunk-XZKRFAT7.js} +1 -1
- package/Build/Workers/{chunk-I5MQWHBR.js → chunk-YOZZHZVR.js} +4 -4
- package/Build/Workers/{chunk-RDM3BKNC.js → chunk-Z6SS6KIF.js} +11 -11
- package/Build/Workers/{chunk-FVDTKX3F.js → chunk-ZADWOYGF.js} +2 -2
- package/Build/Workers/{chunk-G3MOT7BZ.js → chunk-ZBTL2GWA.js} +6 -6
- package/Build/Workers/{chunk-HCZR75II.js → chunk-ZEHXFKIR.js} +15 -15
- package/Build/Workers/combineGeometry.js +23 -23
- package/Build/Workers/createBoxGeometry.js +17 -17
- package/Build/Workers/createBoxOutlineGeometry.js +15 -15
- package/Build/Workers/createCircleGeometry.js +25 -25
- package/Build/Workers/createCircleOutlineGeometry.js +18 -18
- package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createCorridorGeometry.js +29 -28
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -27
- package/Build/Workers/createCylinderGeometry.js +19 -19
- package/Build/Workers/createCylinderOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipseGeometry.js +25 -25
- package/Build/Workers/createEllipseOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipsoidGeometry.js +18 -18
- package/Build/Workers/createEllipsoidOutlineGeometry.js +17 -17
- package/Build/Workers/createFrustumGeometry.js +17 -17
- package/Build/Workers/createFrustumOutlineGeometry.js +17 -17
- package/Build/Workers/createGeometry.js +23 -23
- package/Build/Workers/createGroundPolylineGeometry.js +21 -21
- package/Build/Workers/createPlaneGeometry.js +15 -15
- package/Build/Workers/createPlaneOutlineGeometry.js +14 -14
- package/Build/Workers/createPolygonGeometry.js +469 -60
- package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createPolylineGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +33 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -26
- package/Build/Workers/createRectangleGeometry.js +26 -26
- package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
- package/Build/Workers/createSimplePolylineGeometry.js +22 -22
- package/Build/Workers/createSphereGeometry.js +18 -18
- package/Build/Workers/createSphereOutlineGeometry.js +17 -17
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +23 -23
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +21 -21
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +21 -21
- package/Build/Workers/createVerticesFromHeightmap.js +21 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +18 -18
- package/Build/Workers/createWallGeometry.js +23 -23
- package/Build/Workers/createWallOutlineGeometry.js +22 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +9 -9
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +21 -21
- package/Source/Core/Credit.js +7 -1
- package/Source/Core/GoogleMaps.js +8 -24
- package/Source/Core/Ion.js +1 -2
- package/Source/Core/PolygonGeometry.js +340 -27
- package/Source/Core/PolygonGeometryLibrary.js +302 -1
- package/Source/Core/Stereographic.js +247 -0
- package/Source/Core/TaskProcessor.js +53 -40
- package/Source/Core/buildModuleUrl.js +1 -1
- package/Source/Core/sampleTerrain.js +43 -10
- package/Source/Core/sampleTerrainMostDetailed.js +27 -3
- package/Source/Scene/ArcGisMapService.js +1 -2
- package/Source/Scene/Billboard.js +7 -0
- package/Source/Scene/Cesium3DTilePass.js +1 -1
- package/Source/Scene/Cesium3DTileset.js +38 -81
- package/Source/Scene/CreditDisplay.js +2 -2
- package/Source/Scene/LabelCollection.js +3 -1
- package/Source/Scene/Model/Model.js +16 -22
- package/Source/Scene/PostProcessStageLibrary.js +3 -3
- package/Source/Scene/PrimitiveCollection.js +39 -0
- package/Source/Scene/Scene.js +3 -0
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +38 -8
- package/Source/Widget/CesiumWidget.js +2 -1
- package/index.d.ts +65 -31
- package/index.js +168 -167
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.110.1
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -25,83 +25,266 @@
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
BoundingRectangle_default
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MOSBHBQO.js";
|
|
29
29
|
import {
|
|
30
30
|
PolygonGeometryLibrary_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KGVHVTX7.js";
|
|
32
32
|
import {
|
|
33
33
|
ArcType_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-2IZ2LJ3N.js";
|
|
35
35
|
import {
|
|
36
36
|
GeometryInstance_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-HW6ANEVG.js";
|
|
38
38
|
import {
|
|
39
39
|
GeometryPipeline_default
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-ZEHXFKIR.js";
|
|
41
|
+
import "./chunk-BKVKFLIC.js";
|
|
42
|
+
import "./chunk-YOZZHZVR.js";
|
|
43
|
+
import {
|
|
44
|
+
oneTimeWarning_default
|
|
45
|
+
} from "./chunk-AXODHVUI.js";
|
|
43
46
|
import {
|
|
44
47
|
EllipsoidGeodesic_default
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-FBRBVOAJ.js";
|
|
46
49
|
import {
|
|
47
50
|
GeometryOffsetAttribute_default
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-EZPA2AXQ.js";
|
|
49
52
|
import {
|
|
50
53
|
VertexFormat_default
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-HYNBEK4C.js";
|
|
52
55
|
import {
|
|
53
56
|
EllipsoidTangentPlane_default
|
|
54
|
-
} from "./chunk-
|
|
55
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-TWN33EAP.js";
|
|
58
|
+
import "./chunk-ZBTL2GWA.js";
|
|
56
59
|
import {
|
|
57
60
|
PolygonPipeline_default,
|
|
58
61
|
WindingOrder_default
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import
|
|
63
|
-
|
|
62
|
+
} from "./chunk-Z6SS6KIF.js";
|
|
63
|
+
import "./chunk-J5YKECLG.js";
|
|
64
|
+
import "./chunk-54QBXZYE.js";
|
|
65
|
+
import {
|
|
66
|
+
IntersectionTests_default,
|
|
67
|
+
Ray_default
|
|
68
|
+
} from "./chunk-KXTDRKW5.js";
|
|
69
|
+
import "./chunk-FDNL4I6K.js";
|
|
64
70
|
import {
|
|
65
71
|
IndexDatatype_default
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import "./chunk-
|
|
72
|
+
} from "./chunk-CLVX47CD.js";
|
|
73
|
+
import "./chunk-I6R5G76Q.js";
|
|
68
74
|
import {
|
|
69
75
|
GeometryAttribute_default,
|
|
70
76
|
Geometry_default
|
|
71
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-VEPSTOBV.js";
|
|
72
78
|
import {
|
|
73
79
|
BoundingSphere_default,
|
|
74
80
|
Quaternion_default
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import "./chunk-
|
|
81
|
+
} from "./chunk-TV4Q4TKV.js";
|
|
82
|
+
import "./chunk-MQ32KIOU.js";
|
|
77
83
|
import {
|
|
78
84
|
Cartesian2_default,
|
|
79
85
|
Rectangle_default
|
|
80
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-EJWAO37W.js";
|
|
81
87
|
import {
|
|
82
88
|
ComponentDatatype_default
|
|
83
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-7W3AMBD6.js";
|
|
84
90
|
import {
|
|
85
91
|
Cartesian3_default,
|
|
86
92
|
Cartographic_default,
|
|
87
93
|
Ellipsoid_default,
|
|
88
94
|
Matrix3_default
|
|
89
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-M57VBCI4.js";
|
|
90
96
|
import {
|
|
91
97
|
Math_default
|
|
92
|
-
} from "./chunk-
|
|
93
|
-
import "./chunk-
|
|
94
|
-
import "./chunk-
|
|
98
|
+
} from "./chunk-A7T4GOG3.js";
|
|
99
|
+
import "./chunk-GQ66IPL6.js";
|
|
100
|
+
import "./chunk-ZADWOYGF.js";
|
|
95
101
|
import {
|
|
96
102
|
defaultValue_default
|
|
97
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-CGHLEZ43.js";
|
|
98
104
|
import {
|
|
99
105
|
Check_default,
|
|
100
106
|
DeveloperError_default
|
|
101
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-6EZ4NFIC.js";
|
|
102
108
|
import {
|
|
103
109
|
defined_default
|
|
104
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-XZKRFAT7.js";
|
|
111
|
+
|
|
112
|
+
// packages/engine/Source/Core/deprecationWarning.js
|
|
113
|
+
function deprecationWarning(identifier, message) {
|
|
114
|
+
if (!defined_default(identifier) || !defined_default(message)) {
|
|
115
|
+
throw new DeveloperError_default("identifier and message are required.");
|
|
116
|
+
}
|
|
117
|
+
oneTimeWarning_default(identifier, message);
|
|
118
|
+
}
|
|
119
|
+
var deprecationWarning_default = deprecationWarning;
|
|
120
|
+
|
|
121
|
+
// packages/engine/Source/Core/Stereographic.js
|
|
122
|
+
function Stereographic(position, tangentPlane) {
|
|
123
|
+
this.position = position;
|
|
124
|
+
if (!defined_default(this.position)) {
|
|
125
|
+
this.position = new Cartesian2_default();
|
|
126
|
+
}
|
|
127
|
+
this.tangentPlane = tangentPlane;
|
|
128
|
+
if (!defined_default(this.tangentPlane)) {
|
|
129
|
+
this.tangentPlane = Stereographic.NORTH_POLE_TANGENT_PLANE;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
Object.defineProperties(Stereographic.prototype, {
|
|
133
|
+
/**
|
|
134
|
+
* Gets the ellipsoid.
|
|
135
|
+
* @memberof Stereographic.prototype
|
|
136
|
+
* @type {Ellipsoid}
|
|
137
|
+
*/
|
|
138
|
+
ellipsoid: {
|
|
139
|
+
get: function() {
|
|
140
|
+
return this.tangentPlane.ellipsoid;
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Gets the x coordinate
|
|
145
|
+
* @memberof Stereographic.prototype
|
|
146
|
+
* @type {number}
|
|
147
|
+
*/
|
|
148
|
+
x: {
|
|
149
|
+
get: function() {
|
|
150
|
+
return this.position.x;
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
/**
|
|
154
|
+
* Gets the y coordinate
|
|
155
|
+
* @memberof Stereographic.prototype
|
|
156
|
+
* @type {number}
|
|
157
|
+
*/
|
|
158
|
+
y: {
|
|
159
|
+
get: function() {
|
|
160
|
+
return this.position.y;
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* Computes the conformal latitude, or the ellipsoidal latitude projected onto an arbitrary sphere.
|
|
165
|
+
* @memberof Stereographic.prototype
|
|
166
|
+
* @type {number}
|
|
167
|
+
*/
|
|
168
|
+
conformalLatitude: {
|
|
169
|
+
get: function() {
|
|
170
|
+
const r = Cartesian2_default.magnitude(this.position);
|
|
171
|
+
const d = 2 * this.ellipsoid.maximumRadius;
|
|
172
|
+
const sign = this.tangentPlane.plane.normal.z;
|
|
173
|
+
return sign * (Math_default.PI_OVER_TWO - 2 * Math.atan2(r, d));
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* Computes the longitude
|
|
178
|
+
* @memberof Stereographic.prototype
|
|
179
|
+
* @type {number}
|
|
180
|
+
*/
|
|
181
|
+
longitude: {
|
|
182
|
+
get: function() {
|
|
183
|
+
let longitude = Math_default.PI_OVER_TWO + Math.atan2(this.y, this.x);
|
|
184
|
+
if (longitude > Math.PI) {
|
|
185
|
+
longitude -= Math_default.TWO_PI;
|
|
186
|
+
}
|
|
187
|
+
return longitude;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
var scratchCartographic = new Cartographic_default();
|
|
192
|
+
var scratchCartesian = new Cartesian3_default();
|
|
193
|
+
Stereographic.prototype.getLatitude = function(ellipsoid) {
|
|
194
|
+
if (!defined_default(ellipsoid)) {
|
|
195
|
+
ellipsoid = Ellipsoid_default.WGS84;
|
|
196
|
+
}
|
|
197
|
+
scratchCartographic.latitude = this.conformalLatitude;
|
|
198
|
+
scratchCartographic.longitude = this.longitude;
|
|
199
|
+
scratchCartographic.height = 0;
|
|
200
|
+
const cartesian = this.ellipsoid.cartographicToCartesian(
|
|
201
|
+
scratchCartographic,
|
|
202
|
+
scratchCartesian
|
|
203
|
+
);
|
|
204
|
+
ellipsoid.cartesianToCartographic(cartesian, scratchCartographic);
|
|
205
|
+
return scratchCartographic.latitude;
|
|
206
|
+
};
|
|
207
|
+
var scratchProjectPointOntoPlaneRay = new Ray_default();
|
|
208
|
+
var scratchProjectPointOntoPlaneRayDirection = new Cartesian3_default();
|
|
209
|
+
var scratchProjectPointOntoPlaneCartesian3 = new Cartesian3_default();
|
|
210
|
+
Stereographic.fromCartesian = function(cartesian, result) {
|
|
211
|
+
Check_default.defined("cartesian", cartesian);
|
|
212
|
+
const sign = Math_default.signNotZero(cartesian.z);
|
|
213
|
+
let tangentPlane = Stereographic.NORTH_POLE_TANGENT_PLANE;
|
|
214
|
+
let origin = Stereographic.SOUTH_POLE;
|
|
215
|
+
if (sign < 0) {
|
|
216
|
+
tangentPlane = Stereographic.SOUTH_POLE_TANGENT_PLANE;
|
|
217
|
+
origin = Stereographic.NORTH_POLE;
|
|
218
|
+
}
|
|
219
|
+
const ray = scratchProjectPointOntoPlaneRay;
|
|
220
|
+
ray.origin = tangentPlane.ellipsoid.scaleToGeocentricSurface(
|
|
221
|
+
cartesian,
|
|
222
|
+
ray.origin
|
|
223
|
+
);
|
|
224
|
+
ray.direction = Cartesian3_default.subtract(
|
|
225
|
+
ray.origin,
|
|
226
|
+
origin,
|
|
227
|
+
scratchProjectPointOntoPlaneRayDirection
|
|
228
|
+
);
|
|
229
|
+
Cartesian3_default.normalize(ray.direction, ray.direction);
|
|
230
|
+
const intersectionPoint = IntersectionTests_default.rayPlane(
|
|
231
|
+
ray,
|
|
232
|
+
tangentPlane.plane,
|
|
233
|
+
scratchProjectPointOntoPlaneCartesian3
|
|
234
|
+
);
|
|
235
|
+
const v = Cartesian3_default.subtract(intersectionPoint, origin, intersectionPoint);
|
|
236
|
+
const x = Cartesian3_default.dot(tangentPlane.xAxis, v);
|
|
237
|
+
const y = sign * Cartesian3_default.dot(tangentPlane.yAxis, v);
|
|
238
|
+
if (!defined_default(result)) {
|
|
239
|
+
return new Stereographic(new Cartesian2_default(x, y), tangentPlane);
|
|
240
|
+
}
|
|
241
|
+
result.position = new Cartesian2_default(x, y);
|
|
242
|
+
result.tangentPlane = tangentPlane;
|
|
243
|
+
return result;
|
|
244
|
+
};
|
|
245
|
+
Stereographic.fromCartesianArray = function(cartesians, result) {
|
|
246
|
+
Check_default.defined("cartesians", cartesians);
|
|
247
|
+
const length = cartesians.length;
|
|
248
|
+
if (!defined_default(result)) {
|
|
249
|
+
result = new Array(length);
|
|
250
|
+
} else {
|
|
251
|
+
result.length = length;
|
|
252
|
+
}
|
|
253
|
+
for (let i = 0; i < length; i++) {
|
|
254
|
+
result[i] = Stereographic.fromCartesian(cartesians[i], result[i]);
|
|
255
|
+
}
|
|
256
|
+
return result;
|
|
257
|
+
};
|
|
258
|
+
Stereographic.clone = function(stereographic, result) {
|
|
259
|
+
if (!defined_default(stereographic)) {
|
|
260
|
+
return void 0;
|
|
261
|
+
}
|
|
262
|
+
if (!defined_default(result)) {
|
|
263
|
+
return new Stereographic(
|
|
264
|
+
stereographic.position,
|
|
265
|
+
stereographic.tangentPlane
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
result.position = stereographic.position;
|
|
269
|
+
result.tangentPlane = stereographic.tangentPlane;
|
|
270
|
+
return result;
|
|
271
|
+
};
|
|
272
|
+
Stereographic.HALF_UNIT_SPHERE = Object.freeze(new Ellipsoid_default(0.5, 0.5, 0.5));
|
|
273
|
+
Stereographic.NORTH_POLE = Object.freeze(new Cartesian3_default(0, 0, 0.5));
|
|
274
|
+
Stereographic.SOUTH_POLE = Object.freeze(new Cartesian3_default(0, 0, -0.5));
|
|
275
|
+
Stereographic.NORTH_POLE_TANGENT_PLANE = Object.freeze(
|
|
276
|
+
new EllipsoidTangentPlane_default(
|
|
277
|
+
Stereographic.NORTH_POLE,
|
|
278
|
+
Stereographic.HALF_UNIT_SPHERE
|
|
279
|
+
)
|
|
280
|
+
);
|
|
281
|
+
Stereographic.SOUTH_POLE_TANGENT_PLANE = Object.freeze(
|
|
282
|
+
new EllipsoidTangentPlane_default(
|
|
283
|
+
Stereographic.SOUTH_POLE,
|
|
284
|
+
Stereographic.HALF_UNIT_SPHERE
|
|
285
|
+
)
|
|
286
|
+
);
|
|
287
|
+
var Stereographic_default = Stereographic;
|
|
105
288
|
|
|
106
289
|
// packages/engine/Source/Core/PolygonGeometry.js
|
|
107
290
|
var scratchCarto1 = new Cartographic_default();
|
|
@@ -144,7 +327,8 @@ function computeAttributes(options) {
|
|
|
144
327
|
const bottom = options.bottom || wall;
|
|
145
328
|
if (vertexFormat.st || vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent || shadowVolume) {
|
|
146
329
|
const boundingRectangle = options.boundingRectangle;
|
|
147
|
-
const
|
|
330
|
+
const rotationAxis = options.rotationAxis;
|
|
331
|
+
const projectTo2d = options.projectTo2d;
|
|
148
332
|
const ellipsoid = options.ellipsoid;
|
|
149
333
|
const stRotation = options.stRotation;
|
|
150
334
|
const perPositionHeight = options.perPositionHeight;
|
|
@@ -173,13 +357,13 @@ function computeAttributes(options) {
|
|
|
173
357
|
let tangentRotationMatrix = tangentMatrixScratch;
|
|
174
358
|
if (stRotation !== 0) {
|
|
175
359
|
let rotation = Quaternion_default.fromAxisAngle(
|
|
176
|
-
|
|
360
|
+
rotationAxis,
|
|
177
361
|
stRotation,
|
|
178
362
|
appendTextureCoordinatesQuaternion
|
|
179
363
|
);
|
|
180
364
|
textureMatrix = Matrix3_default.fromQuaternion(rotation, textureMatrix);
|
|
181
365
|
rotation = Quaternion_default.fromAxisAngle(
|
|
182
|
-
|
|
366
|
+
rotationAxis,
|
|
183
367
|
-stRotation,
|
|
184
368
|
appendTextureCoordinatesQuaternion
|
|
185
369
|
);
|
|
@@ -215,10 +399,7 @@ function computeAttributes(options) {
|
|
|
215
399
|
scratchPosition
|
|
216
400
|
);
|
|
217
401
|
p = ellipsoid.scaleToGeodeticSurface(p, p);
|
|
218
|
-
const st =
|
|
219
|
-
p,
|
|
220
|
-
appendTextureCoordinatesCartesian2
|
|
221
|
-
);
|
|
402
|
+
const st = projectTo2d(p, appendTextureCoordinatesCartesian2);
|
|
222
403
|
Cartesian2_default.subtract(st, origin, st);
|
|
223
404
|
const stx = Math_default.clamp(st.x / boundingRectangle.width, 0, 1);
|
|
224
405
|
const sty = Math_default.clamp(st.y / boundingRectangle.height, 0, 1);
|
|
@@ -533,7 +714,7 @@ function interpolateAndGrowRectangle(ellipsoidGeodesic2, inverseChordLength, res
|
|
|
533
714
|
}
|
|
534
715
|
}
|
|
535
716
|
var createGeometryFromPositionsExtrudedPositions = [];
|
|
536
|
-
function createGeometryFromPositionsExtruded(ellipsoid,
|
|
717
|
+
function createGeometryFromPositionsExtruded(ellipsoid, polygon2, textureCoordinates, granularity, hierarchy, perPositionHeight, closeTop, closeBottom, vertexFormat, arcType) {
|
|
537
718
|
const geos = {
|
|
538
719
|
walls: []
|
|
539
720
|
};
|
|
@@ -541,7 +722,7 @@ function createGeometryFromPositionsExtruded(ellipsoid, polygon, textureCoordina
|
|
|
541
722
|
if (closeTop || closeBottom) {
|
|
542
723
|
const topGeo = PolygonGeometryLibrary_default.createGeometryFromPositions(
|
|
543
724
|
ellipsoid,
|
|
544
|
-
|
|
725
|
+
polygon2,
|
|
545
726
|
textureCoordinates,
|
|
546
727
|
granularity,
|
|
547
728
|
perPositionHeight,
|
|
@@ -833,9 +1014,144 @@ PolygonGeometry.unpack = function(array, startingIndex, result) {
|
|
|
833
1014
|
result.packedLength = packedLength;
|
|
834
1015
|
return result;
|
|
835
1016
|
};
|
|
1017
|
+
var scratchCartesian0 = new Cartesian2_default();
|
|
1018
|
+
var scratchCartesian1 = new Cartesian2_default();
|
|
1019
|
+
var scratchPolarClosest = new Stereographic_default();
|
|
1020
|
+
function expandRectangle(polar, lastPolar, ellipsoid, arcType, polygon2, result) {
|
|
1021
|
+
const longitude = polar.longitude;
|
|
1022
|
+
const lonAdjusted = longitude >= 0 ? longitude : longitude + Math_default.TWO_PI;
|
|
1023
|
+
polygon2.westOverIdl = Math.min(polygon2.westOverIdl, lonAdjusted);
|
|
1024
|
+
polygon2.eastOverIdl = Math.max(polygon2.eastOverIdl, lonAdjusted);
|
|
1025
|
+
result.west = Math.min(result.west, longitude);
|
|
1026
|
+
result.east = Math.max(result.east, longitude);
|
|
1027
|
+
const latitude = polar.getLatitude(ellipsoid);
|
|
1028
|
+
let segmentLatitude = latitude;
|
|
1029
|
+
result.south = Math.min(result.south, latitude);
|
|
1030
|
+
result.north = Math.max(result.north, latitude);
|
|
1031
|
+
if (arcType !== ArcType_default.RHUMB) {
|
|
1032
|
+
const segment = Cartesian2_default.subtract(
|
|
1033
|
+
lastPolar.position,
|
|
1034
|
+
polar.position,
|
|
1035
|
+
scratchCartesian0
|
|
1036
|
+
);
|
|
1037
|
+
const t = Cartesian2_default.dot(lastPolar.position, segment) / Cartesian2_default.dot(segment, segment);
|
|
1038
|
+
if (t > 0 && t < 1) {
|
|
1039
|
+
const projected = Cartesian2_default.add(
|
|
1040
|
+
lastPolar.position,
|
|
1041
|
+
Cartesian2_default.multiplyByScalar(segment, -t, segment),
|
|
1042
|
+
scratchCartesian1
|
|
1043
|
+
);
|
|
1044
|
+
const closestPolar = Stereographic_default.clone(lastPolar, scratchPolarClosest);
|
|
1045
|
+
closestPolar.position = projected;
|
|
1046
|
+
const adjustedLatitude = closestPolar.getLatitude(ellipsoid);
|
|
1047
|
+
result.south = Math.min(result.south, adjustedLatitude);
|
|
1048
|
+
result.north = Math.max(result.north, adjustedLatitude);
|
|
1049
|
+
if (Math.abs(latitude) > Math.abs(adjustedLatitude)) {
|
|
1050
|
+
segmentLatitude = adjustedLatitude;
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
const direction = lastPolar.x * polar.y - polar.x * lastPolar.y;
|
|
1055
|
+
let angle = Math.sign(direction);
|
|
1056
|
+
if (angle !== 0) {
|
|
1057
|
+
angle *= Cartesian2_default.angleBetween(lastPolar.position, polar.position);
|
|
1058
|
+
}
|
|
1059
|
+
if (segmentLatitude >= 0) {
|
|
1060
|
+
polygon2.northAngle += angle;
|
|
1061
|
+
}
|
|
1062
|
+
if (segmentLatitude <= 0) {
|
|
1063
|
+
polygon2.southAngle += angle;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
var scratchPolar = new Stereographic_default();
|
|
1067
|
+
var scratchPolarPrevious = new Stereographic_default();
|
|
1068
|
+
var polygon = {
|
|
1069
|
+
northAngle: 0,
|
|
1070
|
+
southAngle: 0,
|
|
1071
|
+
westOverIdl: 0,
|
|
1072
|
+
eastOverIdl: 0
|
|
1073
|
+
};
|
|
1074
|
+
PolygonGeometry.computeRectangleFromPositions = function(positions, ellipsoid, arcType, result) {
|
|
1075
|
+
Check_default.defined("positions", positions);
|
|
1076
|
+
if (!defined_default(result)) {
|
|
1077
|
+
result = new Rectangle_default();
|
|
1078
|
+
}
|
|
1079
|
+
if (positions.length < 3) {
|
|
1080
|
+
return result;
|
|
1081
|
+
}
|
|
1082
|
+
result.west = Number.POSITIVE_INFINITY;
|
|
1083
|
+
result.east = Number.NEGATIVE_INFINITY;
|
|
1084
|
+
result.south = Number.POSITIVE_INFINITY;
|
|
1085
|
+
result.north = Number.NEGATIVE_INFINITY;
|
|
1086
|
+
polygon.northAngle = 0;
|
|
1087
|
+
polygon.southAngle = 0;
|
|
1088
|
+
polygon.westOverIdl = Number.POSITIVE_INFINITY;
|
|
1089
|
+
polygon.eastOverIdl = Number.NEGATIVE_INFINITY;
|
|
1090
|
+
const positionsLength = positions.length;
|
|
1091
|
+
let lastPolarPosition = Stereographic_default.fromCartesian(
|
|
1092
|
+
positions[0],
|
|
1093
|
+
scratchPolarPrevious
|
|
1094
|
+
);
|
|
1095
|
+
for (let i = 1; i < positionsLength; i++) {
|
|
1096
|
+
const polarPosition = Stereographic_default.fromCartesian(
|
|
1097
|
+
positions[i],
|
|
1098
|
+
scratchPolar
|
|
1099
|
+
);
|
|
1100
|
+
expandRectangle(
|
|
1101
|
+
polarPosition,
|
|
1102
|
+
lastPolarPosition,
|
|
1103
|
+
ellipsoid,
|
|
1104
|
+
arcType,
|
|
1105
|
+
polygon,
|
|
1106
|
+
result
|
|
1107
|
+
);
|
|
1108
|
+
lastPolarPosition = Stereographic_default.clone(polarPosition, lastPolarPosition);
|
|
1109
|
+
}
|
|
1110
|
+
expandRectangle(
|
|
1111
|
+
Stereographic_default.fromCartesian(positions[0], scratchPolar),
|
|
1112
|
+
lastPolarPosition,
|
|
1113
|
+
ellipsoid,
|
|
1114
|
+
arcType,
|
|
1115
|
+
polygon,
|
|
1116
|
+
result
|
|
1117
|
+
);
|
|
1118
|
+
if (result.east - result.west > polygon.eastOverIdl - polygon.westOverIdl) {
|
|
1119
|
+
result.west = polygon.westOverIdl;
|
|
1120
|
+
result.east = polygon.eastOverIdl;
|
|
1121
|
+
if (result.east > Math_default.PI) {
|
|
1122
|
+
result.east = result.east - Math_default.TWO_PI;
|
|
1123
|
+
}
|
|
1124
|
+
if (result.west > Math_default.PI) {
|
|
1125
|
+
result.west = result.west - Math_default.TWO_PI;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
if (Math_default.equalsEpsilon(
|
|
1129
|
+
Math.abs(polygon.northAngle),
|
|
1130
|
+
Math_default.TWO_PI,
|
|
1131
|
+
Math_default.EPSILON10
|
|
1132
|
+
)) {
|
|
1133
|
+
result.north = Math_default.PI_OVER_TWO;
|
|
1134
|
+
result.east = Math_default.PI;
|
|
1135
|
+
result.west = -Math_default.PI;
|
|
1136
|
+
}
|
|
1137
|
+
if (Math_default.equalsEpsilon(
|
|
1138
|
+
Math.abs(polygon.southAngle),
|
|
1139
|
+
Math_default.TWO_PI,
|
|
1140
|
+
Math_default.EPSILON10
|
|
1141
|
+
)) {
|
|
1142
|
+
result.south = -Math_default.PI_OVER_TWO;
|
|
1143
|
+
result.east = Math_default.PI;
|
|
1144
|
+
result.west = -Math_default.PI;
|
|
1145
|
+
}
|
|
1146
|
+
return result;
|
|
1147
|
+
};
|
|
836
1148
|
PolygonGeometry.computeRectangle = function(options, result) {
|
|
837
1149
|
Check_default.typeOf.object("options", options);
|
|
838
1150
|
Check_default.typeOf.object("options.polygonHierarchy", options.polygonHierarchy);
|
|
1151
|
+
deprecationWarning_default(
|
|
1152
|
+
"PolygonGeometry.computeRectangle",
|
|
1153
|
+
"PolygonGeometry.computeRectangle was deprecated in CesiumJS 1.110. It will be removed in CesiumJS 1.112. Use PolygonGeometry.computeRectangleFromPositions instead."
|
|
1154
|
+
);
|
|
839
1155
|
const granularity = defaultValue_default(
|
|
840
1156
|
options.granularity,
|
|
841
1157
|
Math_default.RADIANS_PER_DEGREE
|
|
@@ -856,6 +1172,101 @@ PolygonGeometry.computeRectangle = function(options, result) {
|
|
|
856
1172
|
result
|
|
857
1173
|
);
|
|
858
1174
|
};
|
|
1175
|
+
var scratchPolarForPlane = new Stereographic_default();
|
|
1176
|
+
function getTangentPlane(rectangle, positions, ellipsoid) {
|
|
1177
|
+
if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
|
|
1178
|
+
const polar = Stereographic_default.fromCartesian(
|
|
1179
|
+
positions[0],
|
|
1180
|
+
scratchPolarForPlane
|
|
1181
|
+
);
|
|
1182
|
+
return polar.tangentPlane;
|
|
1183
|
+
}
|
|
1184
|
+
return EllipsoidTangentPlane_default.fromPoints(positions, ellipsoid);
|
|
1185
|
+
}
|
|
1186
|
+
var scratchCartographicCyllindrical = new Cartographic_default();
|
|
1187
|
+
function createProjectTo2d(rectangle, ellipsoid) {
|
|
1188
|
+
return (positions, results) => {
|
|
1189
|
+
if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
|
|
1190
|
+
if (rectangle.south < 0 && rectangle.north > 0) {
|
|
1191
|
+
if (!defined_default(results)) {
|
|
1192
|
+
results = [];
|
|
1193
|
+
}
|
|
1194
|
+
for (let i = 0; i < positions.length; ++i) {
|
|
1195
|
+
const cartographic = ellipsoid.cartesianToCartographic(
|
|
1196
|
+
positions[i],
|
|
1197
|
+
scratchCartographicCyllindrical
|
|
1198
|
+
);
|
|
1199
|
+
results[i] = new Cartesian2_default(
|
|
1200
|
+
cartographic.longitude / Math_default.PI,
|
|
1201
|
+
cartographic.latitude / Math_default.PI_OVER_TWO
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
results.length = positions.length;
|
|
1205
|
+
return results;
|
|
1206
|
+
}
|
|
1207
|
+
return Stereographic_default.fromCartesianArray(positions, results);
|
|
1208
|
+
}
|
|
1209
|
+
const tangentPlane = EllipsoidTangentPlane_default.fromPoints(positions, ellipsoid);
|
|
1210
|
+
return tangentPlane.projectPointsOntoPlane(positions, results);
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1213
|
+
function createProjectPositionTo2d(rectangle, outerRing, ellipsoid) {
|
|
1214
|
+
if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
|
|
1215
|
+
return (position, result) => {
|
|
1216
|
+
if (rectangle.south < 0 && rectangle.north > 0) {
|
|
1217
|
+
const cartographic = ellipsoid.cartesianToCartographic(
|
|
1218
|
+
position,
|
|
1219
|
+
scratchCartographicCyllindrical
|
|
1220
|
+
);
|
|
1221
|
+
if (!defined_default(result)) {
|
|
1222
|
+
result = new Cartesian2_default();
|
|
1223
|
+
}
|
|
1224
|
+
result.x = cartographic.longitude / Math_default.PI;
|
|
1225
|
+
result.y = cartographic.latitude / Math_default.PI_OVER_TWO;
|
|
1226
|
+
return result;
|
|
1227
|
+
}
|
|
1228
|
+
return Stereographic_default.fromCartesian(position, result);
|
|
1229
|
+
};
|
|
1230
|
+
}
|
|
1231
|
+
const tangentPlane = EllipsoidTangentPlane_default.fromPoints(outerRing, ellipsoid);
|
|
1232
|
+
return (position, result) => {
|
|
1233
|
+
return tangentPlane.projectPointsOntoPlane(position, result);
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
function createSplitPolygons(rectangle, ellipsoid, arcType, perPositionHeight) {
|
|
1237
|
+
return (polygons, results) => {
|
|
1238
|
+
if (!perPositionHeight && (rectangle.height >= Math_default.PI_OVER_TWO || rectangle.width >= 2 * Math_default.PI_OVER_THREE)) {
|
|
1239
|
+
return PolygonGeometryLibrary_default.splitPolygonsOnEquator(
|
|
1240
|
+
polygons,
|
|
1241
|
+
ellipsoid,
|
|
1242
|
+
arcType,
|
|
1243
|
+
results
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
return polygons;
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
function computeBoundingRectangle(outerRing, rectangle, ellipsoid, stRotation) {
|
|
1250
|
+
if (rectangle.height >= Math_default.PI || rectangle.width >= Math_default.PI) {
|
|
1251
|
+
return BoundingRectangle_default.fromRectangle(
|
|
1252
|
+
rectangle,
|
|
1253
|
+
void 0,
|
|
1254
|
+
scratchBoundingRectangle
|
|
1255
|
+
);
|
|
1256
|
+
}
|
|
1257
|
+
const outerPositions = outerRing;
|
|
1258
|
+
const tangentPlane = EllipsoidTangentPlane_default.fromPoints(
|
|
1259
|
+
outerPositions,
|
|
1260
|
+
ellipsoid
|
|
1261
|
+
);
|
|
1262
|
+
return PolygonGeometryLibrary_default.computeBoundingRectangle(
|
|
1263
|
+
tangentPlane.plane.normal,
|
|
1264
|
+
tangentPlane.projectPointOntoPlane.bind(tangentPlane),
|
|
1265
|
+
outerPositions,
|
|
1266
|
+
stRotation,
|
|
1267
|
+
scratchBoundingRectangle
|
|
1268
|
+
);
|
|
1269
|
+
}
|
|
859
1270
|
PolygonGeometry.createGeometry = function(polygonGeometry) {
|
|
860
1271
|
const vertexFormat = polygonGeometry._vertexFormat;
|
|
861
1272
|
const ellipsoid = polygonGeometry._ellipsoid;
|
|
@@ -868,20 +1279,18 @@ PolygonGeometry.createGeometry = function(polygonGeometry) {
|
|
|
868
1279
|
const arcType = polygonGeometry._arcType;
|
|
869
1280
|
const textureCoordinates = polygonGeometry._textureCoordinates;
|
|
870
1281
|
const hasTextureCoordinates = defined_default(textureCoordinates);
|
|
871
|
-
|
|
1282
|
+
const outerPositions = polygonHierarchy.positions;
|
|
872
1283
|
if (outerPositions.length < 3) {
|
|
873
1284
|
return;
|
|
874
1285
|
}
|
|
875
|
-
const
|
|
876
|
-
outerPositions,
|
|
877
|
-
ellipsoid
|
|
878
|
-
);
|
|
1286
|
+
const rectangle = polygonGeometry.rectangle;
|
|
879
1287
|
const results = PolygonGeometryLibrary_default.polygonsFromHierarchy(
|
|
880
1288
|
polygonHierarchy,
|
|
881
1289
|
hasTextureCoordinates,
|
|
882
|
-
|
|
1290
|
+
createProjectTo2d(rectangle, ellipsoid),
|
|
883
1291
|
!perPositionHeight,
|
|
884
|
-
ellipsoid
|
|
1292
|
+
ellipsoid,
|
|
1293
|
+
createSplitPolygons(rectangle, ellipsoid, arcType, perPositionHeight)
|
|
885
1294
|
);
|
|
886
1295
|
const hierarchy = results.hierarchy;
|
|
887
1296
|
const polygons = results.polygons;
|
|
@@ -892,18 +1301,18 @@ PolygonGeometry.createGeometry = function(polygonGeometry) {
|
|
|
892
1301
|
textureCoordinates,
|
|
893
1302
|
true,
|
|
894
1303
|
dummyFunction,
|
|
895
|
-
false
|
|
1304
|
+
false,
|
|
1305
|
+
ellipsoid
|
|
896
1306
|
).polygons : void 0;
|
|
897
1307
|
if (hierarchy.length === 0) {
|
|
898
1308
|
return;
|
|
899
1309
|
}
|
|
900
|
-
|
|
901
|
-
const boundingRectangle =
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
stRotation
|
|
906
|
-
scratchBoundingRectangle
|
|
1310
|
+
const outerRing = hierarchy[0].outerRing;
|
|
1311
|
+
const boundingRectangle = computeBoundingRectangle(
|
|
1312
|
+
outerRing,
|
|
1313
|
+
rectangle,
|
|
1314
|
+
ellipsoid,
|
|
1315
|
+
stRotation
|
|
907
1316
|
);
|
|
908
1317
|
const geometries = [];
|
|
909
1318
|
const height = polygonGeometry._height;
|
|
@@ -913,7 +1322,8 @@ PolygonGeometry.createGeometry = function(polygonGeometry) {
|
|
|
913
1322
|
perPositionHeight,
|
|
914
1323
|
vertexFormat,
|
|
915
1324
|
geometry: void 0,
|
|
916
|
-
|
|
1325
|
+
rotationAxis: getTangentPlane(rectangle, outerRing, ellipsoid).plane.normal,
|
|
1326
|
+
projectTo2d: createProjectPositionTo2d(rectangle, outerRing, ellipsoid),
|
|
917
1327
|
boundingRectangle,
|
|
918
1328
|
ellipsoid,
|
|
919
1329
|
stRotation,
|
|
@@ -1093,11 +1503,10 @@ Object.defineProperties(PolygonGeometry.prototype, {
|
|
|
1093
1503
|
get: function() {
|
|
1094
1504
|
if (!defined_default(this._rectangle)) {
|
|
1095
1505
|
const positions = this._polygonHierarchy.positions;
|
|
1096
|
-
this._rectangle =
|
|
1506
|
+
this._rectangle = PolygonGeometry.computeRectangleFromPositions(
|
|
1097
1507
|
positions,
|
|
1098
1508
|
this._ellipsoid,
|
|
1099
|
-
this._arcType
|
|
1100
|
-
this._granularity
|
|
1509
|
+
this._arcType
|
|
1101
1510
|
);
|
|
1102
1511
|
}
|
|
1103
1512
|
return this._rectangle;
|