@cesium/engine 9.2.0 → 10.1.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-GOQEANLM.js → chunk-2GEAGYUY.js} +13 -13
- package/Build/Workers/{chunk-WOYQB5HM.js → chunk-2J3JKXCP.js} +5 -5
- package/Build/Workers/{chunk-IXYFH7DV.js → chunk-3WUV74WM.js} +2 -2
- package/Build/Workers/{chunk-WHDEZSAL.js → chunk-4MSUJ4I7.js} +8 -8
- package/Build/Workers/chunk-4RMIRG6T.js +1800 -0
- package/Build/Workers/{chunk-CVCVMOQA.js → chunk-4VFBBNQ3.js} +1 -1
- package/Build/Workers/{chunk-ZHJDE6JN.js → chunk-4YSNMHZ4.js} +6 -6
- package/Build/Workers/{chunk-YGNQJ4YI.js → chunk-5BLJ5ZM6.js} +5 -5
- package/Build/Workers/{chunk-4RG6WOXH.js → chunk-5KWHSZYL.js} +11 -11
- package/Build/Workers/{chunk-BBBTT36L.js → chunk-5O6JWQ4E.js} +14 -14
- package/Build/Workers/{chunk-GX2BWBN2.js → chunk-65MZOUNU.js} +14 -14
- package/Build/Workers/{chunk-K5F23SZO.js → chunk-6D66DPRV.js} +7 -7
- package/Build/Workers/{chunk-2TRB253J.js → chunk-6OFDHMHR.js} +7 -7
- package/Build/Workers/{chunk-U6MTSO6A.js → chunk-76BYYG7N.js} +424 -449
- package/Build/Workers/{chunk-3PV5HQ2R.js → chunk-A5CODJ4M.js} +6 -6
- package/Build/Workers/{chunk-IF2OX6R4.js → chunk-AA4GZKOT.js} +1 -1
- package/Build/Workers/{chunk-OYP23VAL.js → chunk-ACRTCBN5.js} +11 -11
- package/Build/Workers/chunk-B75IEX2S.js +390 -0
- package/Build/Workers/{chunk-EODIOQ35.js → chunk-BAVI3ZS2.js} +1 -1
- package/Build/Workers/{chunk-CFBGPZU6.js → chunk-BBDZYSZB.js} +10 -10
- package/Build/Workers/{chunk-LZFFO4KB.js → chunk-BGE4QVG7.js} +12 -12
- package/Build/Workers/chunk-BY3E4ONI.js +456 -0
- package/Build/Workers/{chunk-RDR4KVPA.js → chunk-C3Z23UUJ.js} +18 -18
- package/Build/Workers/{chunk-I6CW7ZE5.js → chunk-C45MU4GZ.js} +10 -8
- package/Build/Workers/chunk-CF7P7K7E.js +684 -0
- package/Build/Workers/{chunk-KTZK2UDR.js → chunk-D2U4RI64.js} +7 -7
- package/Build/Workers/{chunk-QZIWFSRM.js → chunk-D4K27X2M.js} +4 -4
- package/Build/Workers/{chunk-UYKG3UFK.js → chunk-DKVHRNFY.js} +5 -5
- package/Build/Workers/{chunk-5OK5JFDP.js → chunk-EB7PNZTK.js} +5 -5
- package/Build/Workers/{chunk-7PFZ4Z7C.js → chunk-ELI4BUOT.js} +11 -9
- package/Build/Workers/chunk-F3NDOSTZ.js +963 -0
- package/Build/Workers/{chunk-3VDHTBY5.js → chunk-FDCLACT5.js} +10 -10
- package/Build/Workers/{chunk-BNT2SNWU.js → chunk-FEVVHITK.js} +4 -4
- package/Build/Workers/{chunk-7HLZRYGD.js → chunk-FOZWUH4T.js} +7 -7
- package/Build/Workers/chunk-FQPSOOPH.js +258 -0
- package/Build/Workers/{chunk-A5CSB5ZE.js → chunk-G5V4GPZE.js} +9 -9
- package/Build/Workers/{chunk-TDIGL45B.js → chunk-GNHZH7HP.js} +1 -1
- package/Build/Workers/{chunk-26NE4LRW.js → chunk-GPJR7MPQ.js} +11 -8
- package/Build/Workers/chunk-GWT64LKY.js +171 -0
- package/Build/Workers/{chunk-PUQR43HZ.js → chunk-HGEEOMSC.js} +6 -6
- package/Build/Workers/{chunk-SC3TBKST.js → chunk-I2RC4XVN.js} +4 -4
- package/Build/Workers/chunk-IUROUBPA.js +300 -0
- package/Build/Workers/{chunk-G7IAO7CW.js → chunk-J7MQUQJY.js} +7 -7
- package/Build/Workers/chunk-JNLWLSTP.js +476 -0
- package/Build/Workers/{chunk-TP4FFUAH.js → chunk-JYQNWIQQ.js} +2 -2
- package/Build/Workers/{chunk-RRUO4QEK.js → chunk-KUN2ZA5X.js} +4 -4
- package/Build/Workers/chunk-KV4EQHK4.js +1477 -0
- package/Build/Workers/chunk-LSSWVB2X.js +138 -0
- package/Build/Workers/{chunk-EJZVBTX4.js → chunk-LXQ5QAEJ.js} +6 -6
- package/Build/Workers/chunk-MBZH7YZ7.js +945 -0
- package/Build/Workers/{chunk-WP3LCUOE.js → chunk-MKXWJTFQ.js} +13 -13
- package/Build/Workers/{chunk-AROLUUGS.js → chunk-MMV6TO3P.js} +2 -2
- package/Build/Workers/{chunk-ETC45PHH.js → chunk-MSKXMXJI.js} +4 -4
- package/Build/Workers/chunk-N4QEHO3U.js +75 -0
- package/Build/Workers/chunk-NVOABL76.js +100 -0
- package/Build/Workers/chunk-OAPA2RTG.js +239 -0
- package/Build/Workers/{chunk-PHT53MCH.js → chunk-OE4MCOC7.js} +13 -13
- package/Build/Workers/chunk-OJF4RTJG.js +634 -0
- package/Build/Workers/{chunk-UICVDDCQ.js → chunk-OOK53QUQ.js} +1 -1
- package/Build/Workers/{chunk-W4OS542B.js → chunk-OOMCT7OL.js} +13 -13
- package/Build/Workers/{chunk-YGTWKLFY.js → chunk-OWGTMVDB.js} +19 -19
- package/Build/Workers/{chunk-GUFV24F4.js → chunk-OXALEQPI.js} +61 -17
- package/Build/Workers/chunk-OXSI7N4C.js +768 -0
- package/Build/Workers/{chunk-26XJDV3D.js → chunk-PNFHVBSF.js} +15 -15
- package/Build/Workers/chunk-POSRARY7.js +834 -0
- package/Build/Workers/{chunk-GX5LMUGZ.js → chunk-PYHLO636.js} +42 -13
- package/Build/Workers/chunk-Q55ECN3Y.js +37 -0
- package/Build/Workers/chunk-QD4KM3GO.js +138 -0
- package/Build/Workers/chunk-QMLTCCYG.js +55 -0
- package/Build/Workers/chunk-QX5XS4LC.js +101 -0
- package/Build/Workers/{chunk-UKJCFXVV.js → chunk-QYQIVZBU.js} +6 -6
- package/Build/Workers/chunk-R3TKLC6E.js +1075 -0
- package/Build/Workers/chunk-R4OIEIPE.js +500 -0
- package/Build/Workers/chunk-R4ZEWO4I.js +122 -0
- package/Build/Workers/chunk-R6B7UCQB.js +44 -0
- package/Build/Workers/chunk-RCK55EDX.js +691 -0
- package/Build/Workers/chunk-RHBWXX7C.js +629 -0
- package/Build/Workers/chunk-RZLZWKFN.js +305 -0
- package/Build/Workers/{chunk-DIVFF6DK.js → chunk-S3PI2KFM.js} +2 -2
- package/Build/Workers/chunk-SAPFXU5X.js +102 -0
- package/Build/Workers/chunk-T6LPN7RI.js +2857 -0
- package/Build/Workers/{chunk-U2LSTOMA.js → chunk-T77JILCU.js} +2 -2
- package/Build/Workers/chunk-TBBFDFCS.js +368 -0
- package/Build/Workers/chunk-TF776XCO.js +1258 -0
- package/Build/Workers/chunk-TGY6H6N6.js +163 -0
- package/Build/Workers/{chunk-RTIT7UDN.js → chunk-TO2PVHKI.js} +2 -2
- package/Build/Workers/chunk-UCIPJSZX.js +398 -0
- package/Build/Workers/chunk-UOEUCKKU.js +59 -0
- package/Build/Workers/chunk-VE7BFUIX.js +39 -0
- package/Build/Workers/chunk-VFBNELXB.js +353 -0
- package/Build/Workers/chunk-VRZ46QZ5.js +781 -0
- package/Build/Workers/chunk-VYWUFRRR.js +1052 -0
- package/Build/Workers/chunk-WVSELU6O.js +2716 -0
- package/Build/Workers/chunk-X23FRWHJ.js +117 -0
- package/Build/Workers/chunk-X2ZQ7RJR.js +287 -0
- package/Build/Workers/chunk-X43SJLQL.js +10364 -0
- package/Build/Workers/chunk-XLTOBCDI.js +220 -0
- package/Build/Workers/chunk-XQI7XZHX.js +196 -0
- package/Build/Workers/chunk-XUOJCLOH.js +511 -0
- package/Build/Workers/chunk-XZZNKIEV.js +157 -0
- package/Build/Workers/chunk-YLYBLJ3Y.js +73 -0
- package/Build/Workers/chunk-ZEE2EIFD.js +430 -0
- package/Build/Workers/chunk-ZIKGV7EL.js +58 -0
- package/Build/Workers/chunk-ZU334IDQ.js +421 -0
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +29 -25
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +24 -24
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createPolylineGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
- package/Build/Workers/createSimplePolylineGeometry.js +22 -22
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +21 -21
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- 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 +10 -10
- package/Build/Workers/transcodeKTX2.js +8 -11
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/ApproximateTerrainHeights.js +4 -4
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
- package/Source/Core/BoundingRectangle.js +2 -0
- package/Source/Core/BoundingSphere.js +4 -2
- package/Source/Core/Cartesian3.js +13 -10
- package/Source/Core/Cartographic.js +11 -8
- package/Source/Core/CesiumTerrainProvider.js +3 -2
- package/Source/Core/CircleGeometry.js +6 -2
- package/Source/Core/CircleOutlineGeometry.js +1 -1
- package/Source/Core/CoplanarPolygonGeometry.js +3 -3
- package/Source/Core/CorridorGeometry.js +4 -4
- package/Source/Core/CorridorOutlineGeometry.js +2 -2
- package/Source/Core/Credit.js +3 -2
- package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
- package/Source/Core/EllipseGeometry.js +4 -4
- package/Source/Core/EllipseOutlineGeometry.js +2 -2
- package/Source/Core/Ellipsoid.js +34 -0
- package/Source/Core/EllipsoidGeodesic.js +2 -2
- package/Source/Core/EllipsoidRhumbLine.js +4 -4
- package/Source/Core/EllipsoidTangentPlane.js +3 -3
- package/Source/Core/EllipsoidTerrainProvider.js +3 -3
- package/Source/Core/GeographicProjection.js +4 -3
- package/Source/Core/GeographicTilingScheme.js +3 -3
- package/Source/Core/GeometryPipeline.js +2 -2
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
- package/Source/Core/GoogleMaps.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +1 -1
- package/Source/Core/HeightmapTessellator.js +2 -2
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Occluder.js +3 -3
- package/Source/Core/OrientedBoundingBox.js +2 -2
- package/Source/Core/PolygonGeometry.js +4 -4
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +3 -3
- package/Source/Core/PolygonPipeline.js +2 -2
- package/Source/Core/PolylineGeometry.js +2 -2
- package/Source/Core/PolylinePipeline.js +6 -6
- package/Source/Core/PolylineVolumeGeometry.js +2 -2
- package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
- package/Source/Core/Rectangle.js +6 -6
- package/Source/Core/RectangleGeometry.js +6 -6
- package/Source/Core/RectangleGeometryLibrary.js +3 -0
- package/Source/Core/RectangleOutlineGeometry.js +2 -2
- package/Source/Core/Simon1994PlanetaryPositions.js +4 -2
- package/Source/Core/SimplePolylineGeometry.js +2 -2
- package/Source/Core/Stereographic.js +2 -2
- package/Source/Core/Transforms.js +154 -19
- package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
- package/Source/Core/WallGeometry.js +3 -3
- package/Source/Core/WallOutlineGeometry.js +3 -3
- package/Source/Core/WebMercatorTilingScheme.js +3 -3
- package/Source/Core/createWorldTerrainAsync.js +2 -0
- package/Source/DataSources/BillboardGraphics.js +16 -0
- package/Source/DataSources/BillboardVisualizer.js +7 -0
- package/Source/DataSources/BoxGeometryUpdater.js +2 -2
- package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
- package/Source/DataSources/CzmlDataSource.js +8 -8
- package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
- package/Source/DataSources/EntityCluster.js +1 -1
- package/Source/DataSources/EntityView.js +2 -2
- package/Source/DataSources/KmlDataSource.js +4 -4
- package/Source/DataSources/ModelVisualizer.js +1 -2
- package/Source/DataSources/PathVisualizer.js +4 -4
- package/Source/DataSources/PointGraphics.js +17 -0
- package/Source/DataSources/PointVisualizer.js +12 -0
- package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
- package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
- package/Source/DataSources/PositionProperty.js +4 -7
- package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
- package/Source/DataSources/ScaledPositionProperty.js +2 -2
- package/Source/DataSources/TerrainOffsetProperty.js +3 -7
- package/Source/DataSources/VelocityOrientationProperty.js +2 -2
- package/Source/DataSources/exportKml.js +2 -2
- package/Source/Renderer/AutomaticUniforms.js +1 -1
- package/Source/Renderer/UniformState.js +6 -12
- package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +35 -6
- package/Source/Scene/BillboardCollection.js +49 -0
- package/Source/Scene/BingMapsImageryProvider.js +11 -2
- package/Source/Scene/Camera.js +16 -10
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClippingPolygon.js +2 -2
- package/Source/Scene/ClippingPolygonCollection.js +1 -1
- package/Source/Scene/CreditDisplay.js +94 -104
- package/Source/Scene/Globe.js +16 -13
- package/Source/Scene/GltfLoaderUtil.js +2 -4
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
- package/Source/Scene/GridImageryProvider.js +2 -2
- package/Source/Scene/ImageBasedLighting.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +2 -2
- package/Source/Scene/MapboxImageryProvider.js +1 -1
- package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
- package/Source/Scene/MetadataSemantic.js +4 -4
- package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
- package/Source/Scene/Model/MaterialPipelineStage.js +49 -0
- package/Source/Scene/Model/Model.js +8 -5
- package/Source/Scene/Model/ModelSceneGraph.js +1 -1
- package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
- package/Source/Scene/Model/pickModel.js +2 -2
- package/Source/Scene/ModelComponents.js +9 -0
- package/Source/Scene/OctahedralProjectedCubeMap.js +5 -6
- package/Source/Scene/Picking.js +4 -13
- package/Source/Scene/PointPrimitive.js +33 -4
- package/Source/Scene/PointPrimitiveCollection.js +22 -9
- package/Source/Scene/Scene.js +39 -31
- package/Source/Scene/SceneTransforms.js +78 -20
- package/Source/Scene/SceneTransitioner.js +2 -2
- package/Source/Scene/ScreenSpaceCameraController.js +29 -19
- package/Source/Scene/SkyBox.js +26 -0
- package/Source/Scene/Sun.js +1 -1
- package/Source/Shaders/BillboardCollectionFS.glsl +4 -0
- package/Source/Shaders/BillboardCollectionFS.js +4 -0
- package/Source/Shaders/BillboardCollectionVS.glsl +3 -1
- package/Source/Shaders/BillboardCollectionVS.js +3 -1
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +30 -13
- package/Source/Shaders/BrdfLutGeneratorFS.js +30 -13
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -2
- package/Source/Shaders/Builtin/Functions/ellipsoidTextureCoordinates.glsl +10 -0
- package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
- package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +40 -39
- package/Source/Shaders/Builtin/Functions/pbrLighting.js +40 -39
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +1 -1
- package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
- package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
- package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +2 -0
- package/Source/Shaders/Builtin/Structs/modelMaterial.js +2 -0
- package/Source/Shaders/EllipsoidFS.glsl +1 -1
- package/Source/Shaders/EllipsoidFS.js +1 -1
- package/Source/Shaders/GlobeFS.glsl +2 -2
- package/Source/Shaders/GlobeFS.js +2 -2
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +23 -23
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +23 -23
- package/Source/Shaders/Model/LightingStageFS.glsl +6 -5
- package/Source/Shaders/Model/LightingStageFS.js +6 -5
- package/Source/Shaders/Model/MaterialStageFS.glsl +31 -26
- package/Source/Shaders/Model/MaterialStageFS.js +31 -26
- package/Source/Shaders/PointPrimitiveCollectionFS.glsl +4 -0
- package/Source/Shaders/PointPrimitiveCollectionFS.js +4 -0
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +9 -7
- package/Source/Shaders/PointPrimitiveCollectionVS.js +9 -7
- package/Source/Widget/CesiumWidget.css +0 -5
- package/Source/Widget/CesiumWidget.js +29 -28
- package/index.d.ts +254 -117
- package/index.js +45 -45
- package/package.json +4 -4
- package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +0 -10
package/Source/Core/Rectangle.js
CHANGED
|
@@ -285,7 +285,7 @@ Rectangle.fromCartographicArray = function (cartographics, result) {
|
|
|
285
285
|
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
|
|
286
286
|
*
|
|
287
287
|
* @param {Cartesian3[]} cartesians The list of Cartesian instances.
|
|
288
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
288
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid the cartesians are on.
|
|
289
289
|
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
|
|
290
290
|
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
|
|
291
291
|
*/
|
|
@@ -293,7 +293,7 @@ Rectangle.fromCartesianArray = function (cartesians, ellipsoid, result) {
|
|
|
293
293
|
//>>includeStart('debug', pragmas.debug);
|
|
294
294
|
Check.defined("cartesians", cartesians);
|
|
295
295
|
//>>includeEnd('debug');
|
|
296
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
296
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
297
297
|
|
|
298
298
|
let west = Number.MAX_VALUE;
|
|
299
299
|
let east = -Number.MAX_VALUE;
|
|
@@ -354,7 +354,7 @@ for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
|
|
|
354
354
|
*
|
|
355
355
|
*
|
|
356
356
|
* @param {BoundingSphere} boundingSphere The bounding sphere.
|
|
357
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
357
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid.
|
|
358
358
|
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
|
|
359
359
|
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
|
|
360
360
|
*/
|
|
@@ -367,7 +367,7 @@ Rectangle.fromBoundingSphere = function (boundingSphere, ellipsoid, result) {
|
|
|
367
367
|
const radius = boundingSphere.radius;
|
|
368
368
|
|
|
369
369
|
if (!defined(ellipsoid)) {
|
|
370
|
-
ellipsoid = Ellipsoid.
|
|
370
|
+
ellipsoid = Ellipsoid.default;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
if (!defined(result)) {
|
|
@@ -912,7 +912,7 @@ const subsampleLlaScratch = new Cartographic();
|
|
|
912
912
|
* for rectangles that cover the poles or cross the equator.
|
|
913
913
|
*
|
|
914
914
|
* @param {Rectangle} rectangle The rectangle to subsample.
|
|
915
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
915
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
|
|
916
916
|
* @param {number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
|
|
917
917
|
* @param {Cartesian3[]} [result] The array of Cartesians onto which to store the result.
|
|
918
918
|
* @returns {Cartesian3[]} The modified result parameter or a new Array of Cartesians instances if none was provided.
|
|
@@ -922,7 +922,7 @@ Rectangle.subsample = function (rectangle, ellipsoid, surfaceHeight, result) {
|
|
|
922
922
|
Check.typeOf.object("rectangle", rectangle);
|
|
923
923
|
//>>includeEnd('debug');
|
|
924
924
|
|
|
925
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
925
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
926
926
|
surfaceHeight = defaultValue(surfaceHeight, 0.0);
|
|
927
927
|
|
|
928
928
|
if (!defined(result)) {
|
|
@@ -978,7 +978,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
|
|
978
978
|
* @param {object} options Object with the following properties:
|
|
979
979
|
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
|
980
980
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
981
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
981
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
|
|
982
982
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
983
983
|
* @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
|
|
984
984
|
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
|
@@ -998,7 +998,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
|
|
998
998
|
* @example
|
|
999
999
|
* // 1. create a rectangle
|
|
1000
1000
|
* const rectangle = new Cesium.RectangleGeometry({
|
|
1001
|
-
* ellipsoid : Cesium.Ellipsoid.
|
|
1001
|
+
* ellipsoid : Cesium.Ellipsoid.default,
|
|
1002
1002
|
* rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
|
|
1003
1003
|
* height : 10000.0
|
|
1004
1004
|
* });
|
|
@@ -1006,7 +1006,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
|
|
1006
1006
|
*
|
|
1007
1007
|
* // 2. create an extruded rectangle without a top
|
|
1008
1008
|
* const rectangle = new Cesium.RectangleGeometry({
|
|
1009
|
-
* ellipsoid : Cesium.Ellipsoid.
|
|
1009
|
+
* ellipsoid : Cesium.Ellipsoid.default,
|
|
1010
1010
|
* rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
|
|
1011
1011
|
* height : 10000.0,
|
|
1012
1012
|
* extrudedHeight: 300000
|
|
@@ -1037,7 +1037,7 @@ function RectangleGeometry(options) {
|
|
|
1037
1037
|
CesiumMath.RADIANS_PER_DEGREE
|
|
1038
1038
|
);
|
|
1039
1039
|
this._ellipsoid = Ellipsoid.clone(
|
|
1040
|
-
defaultValue(options.ellipsoid, Ellipsoid.
|
|
1040
|
+
defaultValue(options.ellipsoid, Ellipsoid.default)
|
|
1041
1041
|
);
|
|
1042
1042
|
this._surfaceHeight = Math.max(height, extrudedHeight);
|
|
1043
1043
|
this._rotation = defaultValue(options.rotation, 0.0);
|
|
@@ -1185,7 +1185,7 @@ RectangleGeometry.unpack = function (array, startingIndex, result) {
|
|
|
1185
1185
|
*
|
|
1186
1186
|
* @param {object} options Object with the following properties:
|
|
1187
1187
|
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
|
1188
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
1188
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
|
|
1189
1189
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
1190
1190
|
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
|
1191
1191
|
* @param {Rectangle} [result] An object in which to store the result.
|
|
@@ -1211,7 +1211,7 @@ RectangleGeometry.computeRectangle = function (options, result) {
|
|
|
1211
1211
|
options.granularity,
|
|
1212
1212
|
CesiumMath.RADIANS_PER_DEGREE
|
|
1213
1213
|
);
|
|
1214
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
1214
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
1215
1215
|
const rotation = defaultValue(options.rotation, 0.0);
|
|
1216
1216
|
|
|
1217
1217
|
return computeRectangle(rectangle, granularity, rotation, ellipsoid, result);
|
|
@@ -2,6 +2,7 @@ import Cartesian3 from "./Cartesian3.js";
|
|
|
2
2
|
import Cartographic from "./Cartographic.js";
|
|
3
3
|
import defined from "./defined.js";
|
|
4
4
|
import DeveloperError from "./DeveloperError.js";
|
|
5
|
+
import Ellipsoid from "./Ellipsoid.js";
|
|
5
6
|
import GeographicProjection from "./GeographicProjection.js";
|
|
6
7
|
import CesiumMath from "./Math.js";
|
|
7
8
|
import Matrix2 from "./Matrix2.js";
|
|
@@ -100,6 +101,7 @@ function getRotationOptions(
|
|
|
100
101
|
const granYSin = granularityY * sinRotation;
|
|
101
102
|
const granXSin = granularityX * sinRotation;
|
|
102
103
|
|
|
104
|
+
proj._ellipsoid = Ellipsoid.default;
|
|
103
105
|
nwCartesian = proj.project(nwCorner, nwCartesian);
|
|
104
106
|
|
|
105
107
|
nwCartesian = Cartesian3.subtract(nwCartesian, centerCartesian, nwCartesian);
|
|
@@ -190,6 +192,7 @@ RectangleGeometryLibrary.computeOptions = function (
|
|
|
190
192
|
if (center.longitude < nwCorner.longitude) {
|
|
191
193
|
center.longitude += CesiumMath.TWO_PI;
|
|
192
194
|
}
|
|
195
|
+
proj._ellipsoid = Ellipsoid.default;
|
|
193
196
|
centerCartesian = proj.project(center, centerCartesian);
|
|
194
197
|
}
|
|
195
198
|
|
|
@@ -247,7 +247,7 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
|
|
|
247
247
|
*
|
|
248
248
|
* @param {object} options Object with the following properties:
|
|
249
249
|
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
|
250
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
250
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
|
|
251
251
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
|
252
252
|
* @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
|
|
253
253
|
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
|
@@ -277,7 +277,7 @@ function RectangleOutlineGeometry(options) {
|
|
|
277
277
|
options.granularity,
|
|
278
278
|
CesiumMath.RADIANS_PER_DEGREE
|
|
279
279
|
);
|
|
280
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
280
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
281
281
|
const rotation = defaultValue(options.rotation, 0.0);
|
|
282
282
|
|
|
283
283
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -613,7 +613,7 @@ function computeSimonEarth(date, result) {
|
|
|
613
613
|
}
|
|
614
614
|
|
|
615
615
|
// Values for the <code>axesTransformation</code> needed for the rotation were found using the STK Components
|
|
616
|
-
//
|
|
616
|
+
// GeographicTransformer on the position of the sun center of mass point and the earth J2000 frame.
|
|
617
617
|
|
|
618
618
|
const axesTransformation = new Matrix3(
|
|
619
619
|
1.0000000000000002,
|
|
@@ -627,6 +627,7 @@ const axesTransformation = new Matrix3(
|
|
|
627
627
|
0.9174820620691819
|
|
628
628
|
);
|
|
629
629
|
let translation = new Cartesian3();
|
|
630
|
+
|
|
630
631
|
/**
|
|
631
632
|
* Computes the position of the Sun in the Earth-centered inertial frame
|
|
632
633
|
*
|
|
@@ -662,7 +663,7 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
|
|
|
662
663
|
/**
|
|
663
664
|
* Computes the position of the Moon in the Earth-centered inertial frame
|
|
664
665
|
*
|
|
665
|
-
* @param {JulianDate} [julianDate] The time at which to compute the
|
|
666
|
+
* @param {JulianDate} [julianDate] The time at which to compute the Moon's position, if not provided the current system time is used.
|
|
666
667
|
* @param {Cartesian3} [result] The object onto which to store the result.
|
|
667
668
|
* @returns {Cartesian3} Calculated moon position
|
|
668
669
|
*/
|
|
@@ -679,4 +680,5 @@ Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame = function (
|
|
|
679
680
|
|
|
680
681
|
return result;
|
|
681
682
|
};
|
|
683
|
+
|
|
682
684
|
export default Simon1994PlanetaryPositions;
|
|
@@ -68,7 +68,7 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
|
|
|
68
68
|
* @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
|
|
69
69
|
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
|
|
70
70
|
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
|
|
71
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
71
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
|
|
72
72
|
*
|
|
73
73
|
* @exception {DeveloperError} At least two positions are required.
|
|
74
74
|
* @exception {DeveloperError} colors has an invalid length.
|
|
@@ -114,7 +114,7 @@ function SimplePolylineGeometry(options) {
|
|
|
114
114
|
options.granularity,
|
|
115
115
|
CesiumMath.RADIANS_PER_DEGREE
|
|
116
116
|
);
|
|
117
|
-
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
117
|
+
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
118
118
|
this._workerName = "createSimplePolylineGeometry";
|
|
119
119
|
|
|
120
120
|
let numComponents = 1 + positions.length * Cartesian3.packedLength;
|
|
@@ -99,12 +99,12 @@ const scratchCartesian = new Cartesian3();
|
|
|
99
99
|
/**
|
|
100
100
|
* Computes the latitude based on an ellipsoid.
|
|
101
101
|
*
|
|
102
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
102
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which to compute the longitude.
|
|
103
103
|
* @returns {number} The latitude
|
|
104
104
|
*/
|
|
105
105
|
Stereographic.prototype.getLatitude = function (ellipsoid) {
|
|
106
106
|
if (!defined(ellipsoid)) {
|
|
107
|
-
ellipsoid = Ellipsoid.
|
|
107
|
+
ellipsoid = Ellipsoid.default;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
scratchCartographic.latitude = this.conformalLatitude;
|
|
@@ -113,7 +113,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
113
113
|
* centered at the provided origin to the provided ellipsoid's fixed reference frame.
|
|
114
114
|
* @callback Transforms.LocalFrameToFixedFrame
|
|
115
115
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
116
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
116
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
117
117
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
118
118
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
119
119
|
*/
|
|
@@ -199,7 +199,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
} else {
|
|
202
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
202
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
203
203
|
ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up);
|
|
204
204
|
|
|
205
205
|
const up = scratchCalculateCartesian.up;
|
|
@@ -265,7 +265,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
|
|
|
265
265
|
*
|
|
266
266
|
* @function
|
|
267
267
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
268
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
268
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
269
269
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
270
270
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
271
271
|
*
|
|
@@ -291,7 +291,7 @@ Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
|
|
|
291
291
|
*
|
|
292
292
|
* @function
|
|
293
293
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
294
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
294
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
295
295
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
296
296
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
297
297
|
*
|
|
@@ -317,7 +317,7 @@ Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerato
|
|
|
317
317
|
*
|
|
318
318
|
* @function
|
|
319
319
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
320
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
320
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
321
321
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
322
322
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
323
323
|
*
|
|
@@ -343,7 +343,7 @@ Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
|
|
|
343
343
|
*
|
|
344
344
|
* @function
|
|
345
345
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
346
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
346
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
347
347
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
348
348
|
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
|
|
349
349
|
*
|
|
@@ -369,7 +369,7 @@ const scratchHPRMatrix4 = new Matrix4();
|
|
|
369
369
|
*
|
|
370
370
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
371
371
|
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
|
|
372
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
372
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
373
373
|
* @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
|
|
374
374
|
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
|
|
375
375
|
* @param {Matrix4} [result] The object onto which to store the result.
|
|
@@ -424,7 +424,7 @@ const scratchHPRMatrix3 = new Matrix3();
|
|
|
424
424
|
*
|
|
425
425
|
* @param {Cartesian3} origin The center point of the local reference frame.
|
|
426
426
|
* @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
|
|
427
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
427
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
428
428
|
* @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
|
|
429
429
|
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
|
|
430
430
|
* @param {Quaternion} [result] The object onto which to store the result.
|
|
@@ -473,7 +473,7 @@ const hprQuaternionScratch = new Quaternion();
|
|
|
473
473
|
* are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
|
|
474
474
|
*
|
|
475
475
|
* @param {Matrix4} transform The transform
|
|
476
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
476
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
477
477
|
* @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
|
|
478
478
|
* matrix from a reference frame to the provided ellipsoid's fixed reference frame
|
|
479
479
|
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
|
|
@@ -489,7 +489,7 @@ Transforms.fixedFrameToHeadingPitchRoll = function (
|
|
|
489
489
|
Check.defined("transform", transform);
|
|
490
490
|
//>>includeEnd('debug');
|
|
491
491
|
|
|
492
|
-
ellipsoid = defaultValue(ellipsoid, Ellipsoid.
|
|
492
|
+
ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
|
|
493
493
|
fixedFrameTransform = defaultValue(
|
|
494
494
|
fixedFrameTransform,
|
|
495
495
|
Transforms.eastNorthUpToFixedFrame
|
|
@@ -538,6 +538,35 @@ const wgs84WRPrecessing = 7.2921158553e-5;
|
|
|
538
538
|
const twoPiOverSecondsInDay = CesiumMath.TWO_PI / 86400.0;
|
|
539
539
|
let dateInUtc = new JulianDate();
|
|
540
540
|
|
|
541
|
+
/**
|
|
542
|
+
* The default function to compute a rotation matrix to transform a point or vector from the International Celestial
|
|
543
|
+
* Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given
|
|
544
|
+
* time for use in lighting and transformation from inertial reference frames. This function may return undefined if
|
|
545
|
+
* the data necessary to do the transformation is not yet loaded.
|
|
546
|
+
*
|
|
547
|
+
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
548
|
+
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
549
|
+
* not specified, a new instance is created and returned.
|
|
550
|
+
* @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
|
|
551
|
+
* transformation is not yet loaded.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* // Set the default ICRF to fixed transformation to that of the Moon.
|
|
555
|
+
* Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
|
|
556
|
+
*
|
|
557
|
+
* @see Transforms.computeIcrfToFixedMatrix
|
|
558
|
+
* @see Transforms.computeTemeToPseudoFixedMatrix
|
|
559
|
+
* @see Transforms.computeIcrfToMoonFixedMatrix
|
|
560
|
+
*/
|
|
561
|
+
Transforms.computeIcrfToCentralBodyFixedMatrix = function (date, result) {
|
|
562
|
+
let transformMatrix = Transforms.computeIcrfToFixedMatrix(date, result);
|
|
563
|
+
if (!defined(transformMatrix)) {
|
|
564
|
+
transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(date, result);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
return transformMatrix;
|
|
568
|
+
};
|
|
569
|
+
|
|
541
570
|
/**
|
|
542
571
|
* Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the
|
|
543
572
|
* pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.
|
|
@@ -691,7 +720,7 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
|
|
|
691
720
|
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
692
721
|
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
693
722
|
* not specified, a new instance is created and returned.
|
|
694
|
-
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
|
|
723
|
+
* @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
|
|
695
724
|
* transformation is not yet loaded.
|
|
696
725
|
*
|
|
697
726
|
*
|
|
@@ -726,6 +755,112 @@ Transforms.computeIcrfToFixedMatrix = function (date, result) {
|
|
|
726
755
|
return Matrix3.transpose(fixedToIcrfMtx, result);
|
|
727
756
|
};
|
|
728
757
|
|
|
758
|
+
const TdtMinusTai = 32.184;
|
|
759
|
+
const J2000d = 2451545;
|
|
760
|
+
const scratchHpr = new HeadingPitchRoll();
|
|
761
|
+
const scratchRotationMatrix = new Matrix3();
|
|
762
|
+
const dateScratch = new JulianDate();
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes
|
|
766
|
+
* to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
|
|
767
|
+
* at a given time.
|
|
768
|
+
*
|
|
769
|
+
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
770
|
+
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
771
|
+
* not specified, a new instance is created and returned.
|
|
772
|
+
* @returns {Matrix3} The rotation matrix.
|
|
773
|
+
*
|
|
774
|
+
* @example
|
|
775
|
+
* // Transform a point from the Fixed axes to the ICRF axes.
|
|
776
|
+
* const now = Cesium.JulianDate.now();
|
|
777
|
+
* const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
778
|
+
* const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);
|
|
779
|
+
* let pointInInertial = new Cesium.Cartesian3();
|
|
780
|
+
* if (Cesium.defined(fixedToIcrf)) {
|
|
781
|
+
* pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
|
|
782
|
+
* }
|
|
783
|
+
*/
|
|
784
|
+
Transforms.computeMoonFixedToIcrfMatrix = function (date, result) {
|
|
785
|
+
//>>includeStart('debug', pragmas.debug);
|
|
786
|
+
if (!defined(date)) {
|
|
787
|
+
throw new DeveloperError("date is required.");
|
|
788
|
+
}
|
|
789
|
+
//>>includeEnd('debug');
|
|
790
|
+
|
|
791
|
+
if (!defined(result)) {
|
|
792
|
+
result = new Matrix3();
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// Converts TAI to TT
|
|
796
|
+
const secondsTT = JulianDate.addSeconds(date, TdtMinusTai, dateScratch);
|
|
797
|
+
|
|
798
|
+
// Converts TT to TDB, interval in days since the standard epoch
|
|
799
|
+
const d = JulianDate.totalDays(secondsTT) - J2000d;
|
|
800
|
+
|
|
801
|
+
// Compute the approximate rotation, using https://articles.adsabs.harvard.edu//full/1980CeMec..22..205D/0000209.000.html
|
|
802
|
+
const e1 = CesiumMath.toRadians(12.112) - CesiumMath.toRadians(0.052992) * d;
|
|
803
|
+
const e2 = CesiumMath.toRadians(24.224) - CesiumMath.toRadians(0.105984) * d;
|
|
804
|
+
const e3 = CesiumMath.toRadians(227.645) + CesiumMath.toRadians(13.012) * d;
|
|
805
|
+
const e4 =
|
|
806
|
+
CesiumMath.toRadians(261.105) + CesiumMath.toRadians(13.340716) * d;
|
|
807
|
+
const e5 = CesiumMath.toRadians(358.0) + CesiumMath.toRadians(0.9856) * d;
|
|
808
|
+
|
|
809
|
+
scratchHpr.pitch =
|
|
810
|
+
CesiumMath.toRadians(270.0 - 90) -
|
|
811
|
+
CesiumMath.toRadians(3.878) * Math.sin(e1) -
|
|
812
|
+
CesiumMath.toRadians(0.12) * Math.sin(e2) +
|
|
813
|
+
CesiumMath.toRadians(0.07) * Math.sin(e3) -
|
|
814
|
+
CesiumMath.toRadians(0.017) * Math.sin(e4);
|
|
815
|
+
scratchHpr.roll =
|
|
816
|
+
CesiumMath.toRadians(66.53 - 90) +
|
|
817
|
+
CesiumMath.toRadians(1.543) * Math.cos(e1) +
|
|
818
|
+
CesiumMath.toRadians(0.24) * Math.cos(e2) -
|
|
819
|
+
CesiumMath.toRadians(0.028) * Math.cos(e3) +
|
|
820
|
+
CesiumMath.toRadians(0.007) * Math.cos(e4);
|
|
821
|
+
scratchHpr.heading =
|
|
822
|
+
CesiumMath.toRadians(244.375 - 90) +
|
|
823
|
+
CesiumMath.toRadians(13.17635831) * d +
|
|
824
|
+
CesiumMath.toRadians(3.558) * Math.sin(e1) +
|
|
825
|
+
CesiumMath.toRadians(0.121) * Math.sin(e2) -
|
|
826
|
+
CesiumMath.toRadians(0.064) * Math.sin(e3) +
|
|
827
|
+
CesiumMath.toRadians(0.016) * Math.sin(e4) +
|
|
828
|
+
CesiumMath.toRadians(0.025) * Math.sin(e5);
|
|
829
|
+
return Matrix3.fromHeadingPitchRoll(scratchHpr, scratchRotationMatrix);
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Computes a rotation matrix to transform a point or vector from the International Celestial
|
|
834
|
+
* Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes
|
|
835
|
+
* at a given time.
|
|
836
|
+
*
|
|
837
|
+
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
838
|
+
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
839
|
+
* not specified, a new instance is created and returned.
|
|
840
|
+
* @returns {Matrix3} The rotation matrix.
|
|
841
|
+
*
|
|
842
|
+
* @example
|
|
843
|
+
* // Set the default ICRF to fixed transformation to that of the Moon.
|
|
844
|
+
* Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
|
|
845
|
+
*/
|
|
846
|
+
Transforms.computeIcrfToMoonFixedMatrix = function (date, result) {
|
|
847
|
+
//>>includeStart('debug', pragmas.debug);
|
|
848
|
+
if (!defined(date)) {
|
|
849
|
+
throw new DeveloperError("date is required.");
|
|
850
|
+
}
|
|
851
|
+
//>>includeEnd('debug');
|
|
852
|
+
if (!defined(result)) {
|
|
853
|
+
result = new Matrix3();
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
const fixedToIcrfMtx = Transforms.computeMoonFixedToIcrfMatrix(date, result);
|
|
857
|
+
if (!defined(fixedToIcrfMtx)) {
|
|
858
|
+
return undefined;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
return Matrix3.transpose(fixedToIcrfMtx, result);
|
|
862
|
+
};
|
|
863
|
+
|
|
729
864
|
const xysScratch = new Iau2006XysSample(0.0, 0.0, 0.0);
|
|
730
865
|
const eopScratch = new EarthOrientationParametersSample(
|
|
731
866
|
0.0,
|
|
@@ -747,7 +882,7 @@ const rotation2Scratch = new Matrix3();
|
|
|
747
882
|
* @param {JulianDate} date The time at which to compute the rotation matrix.
|
|
748
883
|
* @param {Matrix3} [result] The object onto which to store the result. If this parameter is
|
|
749
884
|
* not specified, a new instance is created and returned.
|
|
750
|
-
* @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
|
|
885
|
+
* @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
|
|
751
886
|
* transformation is not yet loaded.
|
|
752
887
|
*
|
|
753
888
|
*
|
|
@@ -950,7 +1085,7 @@ const upScratch = new Cartesian3();
|
|
|
950
1085
|
*
|
|
951
1086
|
* @param {Cartesian3} position The position to transform.
|
|
952
1087
|
* @param {Cartesian3} velocity The velocity vector to transform.
|
|
953
|
-
* @param {Ellipsoid} [ellipsoid=Ellipsoid.
|
|
1088
|
+
* @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
|
|
954
1089
|
* @param {Matrix3} [result] The object onto which to store the result.
|
|
955
1090
|
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
|
|
956
1091
|
*/
|
|
@@ -970,10 +1105,10 @@ Transforms.rotationMatrixFromPositionVelocity = function (
|
|
|
970
1105
|
}
|
|
971
1106
|
//>>includeEnd('debug');
|
|
972
1107
|
|
|
973
|
-
const normal = defaultValue(
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
);
|
|
1108
|
+
const normal = defaultValue(
|
|
1109
|
+
ellipsoid,
|
|
1110
|
+
Ellipsoid.default
|
|
1111
|
+
).geodeticSurfaceNormal(position, normalScratch);
|
|
977
1112
|
let right = Cartesian3.cross(velocity, normal, rightScratch);
|
|
978
1113
|
|
|
979
1114
|
if (Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)) {
|
|
@@ -1073,7 +1208,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
|
|
|
1073
1208
|
);
|
|
1074
1209
|
}
|
|
1075
1210
|
|
|
1076
|
-
// Assuming the instance are positioned
|
|
1211
|
+
// Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D
|
|
1077
1212
|
const fromENU = Transforms.eastNorthUpToFixedFrame(
|
|
1078
1213
|
rtcCenter,
|
|
1079
1214
|
ellipsoid,
|
|
@@ -1091,7 +1226,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
|
|
|
1091
1226
|
/**
|
|
1092
1227
|
* @private
|
|
1093
1228
|
*/
|
|
1094
|
-
Transforms.
|
|
1229
|
+
Transforms.ellipsoidTo2DModelMatrix = function (projection, center, result) {
|
|
1095
1230
|
//>>includeStart('debug', pragmas.debug);
|
|
1096
1231
|
if (!defined(projection)) {
|
|
1097
1232
|
throw new DeveloperError("projection is required.");
|
|
@@ -24,7 +24,7 @@ function DataRectangle(rectangle, maxLevel) {
|
|
|
24
24
|
*
|
|
25
25
|
* Initialization options for the VRTheWorldTerrainProvider constructor
|
|
26
26
|
*
|
|
27
|
-
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the
|
|
27
|
+
* @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
|
|
28
28
|
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
|
|
29
29
|
*/
|
|
30
30
|
|
|
@@ -37,7 +37,7 @@ function DataRectangle(rectangle, maxLevel) {
|
|
|
37
37
|
* @param {VRTheWorldTerrainProvider.ConstructorOptions} options An object describing initialization options
|
|
38
38
|
*/
|
|
39
39
|
function TerrainProviderBuilder(options) {
|
|
40
|
-
this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
40
|
+
this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
41
41
|
this.tilingScheme = undefined;
|
|
42
42
|
this.heightmapWidth = undefined;
|
|
43
43
|
this.heightmapHeight = undefined;
|
|
@@ -36,7 +36,7 @@ const scratchNormal = new Cartesian3();
|
|
|
36
36
|
* wall at <code>positions</code>. If undefined, the height of each position in used.
|
|
37
37
|
* @param {number[]} [options.minimumHeights] An array parallel to <code>positions</code> that give the minimum height of the
|
|
38
38
|
* wall at <code>positions</code>. If undefined, the height at each position is 0.0.
|
|
39
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
39
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
|
|
40
40
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
41
41
|
*
|
|
42
42
|
* @exception {DeveloperError} positions length must be greater than or equal to 2.
|
|
@@ -95,7 +95,7 @@ function WallGeometry(options) {
|
|
|
95
95
|
options.granularity,
|
|
96
96
|
CesiumMath.RADIANS_PER_DEGREE
|
|
97
97
|
);
|
|
98
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
98
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
99
99
|
|
|
100
100
|
this._positions = wallPositions;
|
|
101
101
|
this._minimumHeights = minimumHeights;
|
|
@@ -280,7 +280,7 @@ WallGeometry.unpack = function (array, startingIndex, result) {
|
|
|
280
280
|
* wall at <code>positions</code>. If undefined, the height of each position in used.
|
|
281
281
|
* @param {number} [options.minimumHeight] A constant that defines the minimum height of the
|
|
282
282
|
* wall at <code>positions</code>. If undefined, the height at each position is 0.0.
|
|
283
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
283
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
|
|
284
284
|
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
|
285
285
|
* @returns {WallGeometry}
|
|
286
286
|
*
|
|
@@ -30,7 +30,7 @@ const scratchCartesian3Position2 = new Cartesian3();
|
|
|
30
30
|
* wall at <code>positions</code>. If undefined, the height of each position in used.
|
|
31
31
|
* @param {number[]} [options.minimumHeights] An array parallel to <code>positions</code> that give the minimum height of the
|
|
32
32
|
* wall at <code>positions</code>. If undefined, the height at each position is 0.0.
|
|
33
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
33
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
|
|
34
34
|
*
|
|
35
35
|
* @exception {DeveloperError} positions length must be greater than or equal to 2.
|
|
36
36
|
* @exception {DeveloperError} positions and maximumHeights must have the same length.
|
|
@@ -85,7 +85,7 @@ function WallOutlineGeometry(options) {
|
|
|
85
85
|
options.granularity,
|
|
86
86
|
CesiumMath.RADIANS_PER_DEGREE
|
|
87
87
|
);
|
|
88
|
-
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
88
|
+
const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
89
89
|
|
|
90
90
|
this._positions = wallPositions;
|
|
91
91
|
this._minimumHeights = minimumHeights;
|
|
@@ -255,7 +255,7 @@ WallOutlineGeometry.unpack = function (array, startingIndex, result) {
|
|
|
255
255
|
* wall at <code>positions</code>. If undefined, the height of each position in used.
|
|
256
256
|
* @param {number} [options.minimumHeight] A constant that defines the minimum height of the
|
|
257
257
|
* wall at <code>positions</code>. If undefined, the height at each position is 0.0.
|
|
258
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
258
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
|
|
259
259
|
* @returns {WallOutlineGeometry}
|
|
260
260
|
*
|
|
261
261
|
*
|
|
@@ -13,8 +13,8 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
|
|
|
13
13
|
* @constructor
|
|
14
14
|
*
|
|
15
15
|
* @param {object} [options] Object with the following properties:
|
|
16
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.
|
|
17
|
-
* the
|
|
16
|
+
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid whose surface is being tiled. Defaults to
|
|
17
|
+
* the default ellipsoid.
|
|
18
18
|
* @param {number} [options.numberOfLevelZeroTilesX=1] The number of tiles in the X direction at level zero of
|
|
19
19
|
* the tile tree.
|
|
20
20
|
* @param {number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of
|
|
@@ -31,7 +31,7 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
|
|
|
31
31
|
function WebMercatorTilingScheme(options) {
|
|
32
32
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
33
33
|
|
|
34
|
-
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.
|
|
34
|
+
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
|
|
35
35
|
this._numberOfLevelZeroTilesX = defaultValue(
|
|
36
36
|
options.numberOfLevelZeroTilesX,
|
|
37
37
|
1
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import CesiumTerrainProvider from "./CesiumTerrainProvider.js";
|
|
2
2
|
import defaultValue from "./defaultValue.js";
|
|
3
|
+
import Ellipsoid from "./Ellipsoid.js";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Creates a {@link CesiumTerrainProvider} instance for the {@link https://cesium.com/content/#cesium-world-terrain|Cesium World Terrain}.
|
|
@@ -43,6 +44,7 @@ function createWorldTerrainAsync(options) {
|
|
|
43
44
|
return CesiumTerrainProvider.fromIonAssetId(1, {
|
|
44
45
|
requestVertexNormals: defaultValue(options.requestVertexNormals, false),
|
|
45
46
|
requestWaterMask: defaultValue(options.requestWaterMask, false),
|
|
47
|
+
ellipsoid: Ellipsoid.WGS84,
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
export default createWorldTerrainAsync;
|