gis-cesium-helper 2.1.5 → 3.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Cesium/Cesium.js +10642 -11041
- package/dist/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +1 -1
- package/dist/Cesium/ThirdParty/Workers/pako_deflate.min.js +1 -1
- package/dist/Cesium/ThirdParty/Workers/pako_inflate.min.js +1 -1
- package/dist/Cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
- package/dist/Cesium/Workers/chunk-2BUTAXOJ.js +26 -0
- package/dist/Cesium/Workers/chunk-4DWHRTTP.js +26 -0
- package/dist/Cesium/Workers/chunk-4RJDMIO4.js +26 -0
- package/dist/Cesium/Workers/chunk-4Y673DAX.js +26 -0
- package/dist/Cesium/Workers/chunk-5APIVAIA.js +26 -0
- package/dist/Cesium/Workers/chunk-5HTTNN4T.js +26 -0
- package/dist/Cesium/Workers/chunk-6JIR5UA6.js +26 -0
- package/dist/Cesium/Workers/chunk-7GPSWUNQ.js +26 -0
- package/dist/Cesium/Workers/chunk-7JE52M2E.js +26 -0
- package/dist/Cesium/Workers/chunk-A2GTHHER.js +26 -0
- package/dist/Cesium/Workers/chunk-BLQIHQVM.js +26 -0
- package/dist/Cesium/Workers/chunk-BYGMMPBC.js +26 -0
- package/dist/Cesium/Workers/chunk-C4OMKOTM.js +26 -0
- package/dist/Cesium/Workers/chunk-D3TZ2KW7.js +26 -0
- package/dist/Cesium/Workers/chunk-E2BL2RZG.js +27 -0
- package/dist/Cesium/Workers/chunk-ECIWWYM6.js +26 -0
- package/dist/Cesium/Workers/chunk-EH5BIXGS.js +26 -0
- package/dist/Cesium/Workers/chunk-EJ4M7ZWT.js +26 -0
- package/dist/Cesium/Workers/chunk-F2VBKMFQ.js +26 -0
- package/dist/Cesium/Workers/chunk-FAMH7QPQ.js +26 -0
- package/dist/Cesium/Workers/chunk-FRIKFALT.js +26 -0
- package/dist/Cesium/Workers/chunk-GCHOMXEL.js +26 -0
- package/dist/Cesium/Workers/chunk-H4IFK52P.js +26 -0
- package/dist/Cesium/Workers/chunk-HBEVV6IK.js +26 -0
- package/dist/Cesium/Workers/chunk-HKVMSEEW.js +26 -0
- package/dist/Cesium/Workers/chunk-HQCE7D5L.js +26 -0
- package/dist/Cesium/Workers/chunk-HXIAOT7H.js +26 -0
- package/dist/Cesium/Workers/chunk-I2A6O4RG.js +26 -0
- package/dist/Cesium/Workers/chunk-IYA25EHI.js +26 -0
- package/dist/Cesium/Workers/chunk-JJYRRIWN.js +26 -0
- package/dist/Cesium/Workers/chunk-KLK65KFE.js +26 -0
- package/dist/Cesium/Workers/chunk-LJJKLY2N.js +26 -0
- package/dist/Cesium/Workers/chunk-LO4XCY55.js +26 -0
- package/dist/Cesium/Workers/chunk-LXL44TDT.js +26 -0
- package/dist/Cesium/Workers/chunk-NVQN2WQZ.js +26 -0
- package/dist/Cesium/Workers/chunk-OPGPRG5D.js +26 -0
- package/dist/Cesium/Workers/chunk-PEHZZEN4.js +26 -0
- package/dist/Cesium/Workers/chunk-PTGCDCSG.js +26 -0
- package/dist/Cesium/Workers/chunk-PXJWIUYV.js +26 -0
- package/dist/Cesium/Workers/chunk-Q3IJMJJ2.js +62 -0
- package/dist/Cesium/Workers/chunk-SOPLNYSA.js +26 -0
- package/dist/Cesium/Workers/chunk-STB6TCFY.js +26 -0
- package/dist/Cesium/Workers/{package.js → chunk-T4QAV6EX.js} +2 -2
- package/dist/Cesium/Workers/chunk-TQL3YWK4.js +28 -0
- package/dist/Cesium/Workers/chunk-UYEV4TJN.js +26 -0
- package/dist/Cesium/Workers/chunk-W2RVA34K.js +26 -0
- package/dist/Cesium/Workers/chunk-X7PMFMCX.js +30 -0
- package/dist/Cesium/Workers/chunk-XUP5J7GQ.js +26 -0
- package/dist/Cesium/Workers/chunk-Y6JLAJTJ.js +27 -0
- package/dist/Cesium/Workers/chunk-YGFN6UZV.js +26 -0
- package/dist/Cesium/Workers/chunk-YJTMGLB7.js +26 -0
- package/dist/Cesium/Workers/chunk-ZBFGV7QI.js +26 -0
- package/dist/Cesium/Workers/chunk-ZD25UQM7.js +26 -0
- package/dist/Cesium/Workers/chunk-ZGGJSLK5.js +28 -0
- package/dist/Cesium/Workers/combineGeometry.js +26 -1
- package/dist/Cesium/Workers/createBoxGeometry.js +26 -1
- package/dist/Cesium/Workers/createBoxOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCircleGeometry.js +26 -1
- package/dist/Cesium/Workers/createCircleOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCoplanarPolygonGeometry.js +26 -1
- package/dist/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCorridorGeometry.js +26 -1
- package/dist/Cesium/Workers/createCorridorOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createCylinderGeometry.js +26 -1
- package/dist/Cesium/Workers/createCylinderOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipseGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipseOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipsoidGeometry.js +26 -1
- package/dist/Cesium/Workers/createEllipsoidOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createFrustumGeometry.js +26 -1
- package/dist/Cesium/Workers/createFrustumOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createGeometry.js +26 -1
- package/dist/Cesium/Workers/createGroundPolylineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPlaneGeometry.js +26 -1
- package/dist/Cesium/Workers/createPlaneOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolygonGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolygonOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolylineGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolylineVolumeGeometry.js +26 -1
- package/dist/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createRectangleGeometry.js +26 -1
- package/dist/Cesium/Workers/createRectangleOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createSimplePolylineGeometry.js +26 -1
- package/dist/Cesium/Workers/createSphereGeometry.js +26 -1
- package/dist/Cesium/Workers/createSphereOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/createTaskProcessorWorker.js +26 -1
- package/dist/Cesium/Workers/createVectorTileClampedPolylines.js +26 -1
- package/dist/Cesium/Workers/createVectorTileGeometries.js +26 -1
- package/dist/Cesium/Workers/createVectorTilePoints.js +26 -1
- package/dist/Cesium/Workers/createVectorTilePolygons.js +26 -1
- package/dist/Cesium/Workers/createVectorTilePolylines.js +26 -1
- package/dist/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -1
- package/dist/Cesium/Workers/createVerticesFromHeightmap.js +26 -3
- package/dist/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -1
- package/dist/Cesium/Workers/createWallGeometry.js +26 -1
- package/dist/Cesium/Workers/createWallOutlineGeometry.js +26 -1
- package/dist/Cesium/Workers/decodeDraco.js +26 -1
- package/dist/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +26 -1
- package/dist/Cesium/Workers/decodeI3S.js +26 -1
- package/dist/Cesium/Workers/transcodeKTX2.js +56 -1
- package/dist/Cesium/Workers/transferTypedArrayTest.js +2 -2
- package/dist/Cesium/Workers/upsampleQuantizedTerrainMesh.js +26 -1
- package/dist/Cesium/index.cjs +10505 -10904
- package/dist/Cesium/index.js +10736 -11135
- package/dist/gis-cesium-helper.es.js +1 -1
- package/dist/gis-cesium-helper.umd.js +1 -1
- package/dist/gis3d/gis3d.css +2 -13
- package/dist/gis3d/gis3d.js +7 -1
- package/package.json +4 -4
- package/dist/Cesium/Cesium.d.ts +0 -45206
- package/dist/Cesium/README.md +0 -13
- package/dist/Cesium/Scene/ModelExperimental/CustomShaderGuide/README.md +0 -4
- package/dist/Cesium/ThirdParty/Workers/basis_transcoder.js +0 -31
- package/dist/Cesium/ThirdParty/Workers/package.js +0 -1
- package/dist/Cesium/Widgets/Images/ImageryProviders/esriNationalGeographic.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/esriWorldImagery.png +0 -0
- package/dist/Cesium/Widgets/Images/ImageryProviders/esriWorldStreetMap.png +0 -0
- package/dist/Cesium/Workers/ArcType-26a3f38d.js +0 -1
- package/dist/Cesium/Workers/ArcType-e1641d8d.js +0 -1
- package/dist/Cesium/Workers/AttributeCompression-48e336db.js +0 -1
- package/dist/Cesium/Workers/AttributeCompression-7a823eb1.js +0 -1
- package/dist/Cesium/Workers/AxisAlignedBoundingBox-2c8f82be.js +0 -1
- package/dist/Cesium/Workers/AxisAlignedBoundingBox-ef345290.js +0 -1
- package/dist/Cesium/Workers/BoundingRectangle-b8248608.js +0 -1
- package/dist/Cesium/Workers/BoundingRectangle-ffeef844.js +0 -1
- package/dist/Cesium/Workers/BoxGeometry-85afccf5.js +0 -1
- package/dist/Cesium/Workers/BoxGeometry-c0d41d4f.js +0 -1
- package/dist/Cesium/Workers/Color-50ebab71.js +0 -1
- package/dist/Cesium/Workers/Color-75e74066.js +0 -1
- package/dist/Cesium/Workers/ComponentDatatype-a9820060.js +0 -1
- package/dist/Cesium/Workers/ComponentDatatype-ab629b88.js +0 -1
- package/dist/Cesium/Workers/CoplanarPolygonGeometryLibrary-0d63b099.js +0 -1
- package/dist/Cesium/Workers/CoplanarPolygonGeometryLibrary-44d91286.js +0 -1
- package/dist/Cesium/Workers/CorridorGeometryLibrary-0169e68d.js +0 -1
- package/dist/Cesium/Workers/CorridorGeometryLibrary-0fed6511.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometry-068eebd3.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometry-4802140c.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometryLibrary-f49f33a8.js +0 -1
- package/dist/Cesium/Workers/CylinderGeometryLibrary-fe5ec654.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometry-e8ae6742.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometry-eeb1db07.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometryLibrary-6ce53de3.js +0 -1
- package/dist/Cesium/Workers/EllipseGeometryLibrary-eedf4d0b.js +0 -1
- package/dist/Cesium/Workers/EllipseOutlineGeometry-52d25fd2.js +0 -1
- package/dist/Cesium/Workers/EllipseOutlineGeometry-7c871752.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeodesic-2723ab86.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeodesic-7d405754.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeometry-7cbedd8f.js +0 -1
- package/dist/Cesium/Workers/EllipsoidGeometry-954ef938.js +0 -1
- package/dist/Cesium/Workers/EllipsoidOutlineGeometry-79998e39.js +0 -1
- package/dist/Cesium/Workers/EllipsoidOutlineGeometry-876d584e.js +0 -1
- package/dist/Cesium/Workers/EllipsoidRhumbLine-77eff028.js +0 -1
- package/dist/Cesium/Workers/EllipsoidRhumbLine-7b6199fa.js +0 -1
- package/dist/Cesium/Workers/EllipsoidTangentPlane-330be9cc.js +0 -1
- package/dist/Cesium/Workers/EllipsoidTangentPlane-4cf30b6c.js +0 -1
- package/dist/Cesium/Workers/EncodedCartesian3-5e2017ab.js +0 -1
- package/dist/Cesium/Workers/EncodedCartesian3-ee8e4156.js +0 -1
- package/dist/Cesium/Workers/FrustumGeometry-1e1111d8.js +0 -1
- package/dist/Cesium/Workers/FrustumGeometry-cffd2aa8.js +0 -1
- package/dist/Cesium/Workers/GeometryAttribute-71155085.js +0 -1
- package/dist/Cesium/Workers/GeometryAttribute-b10c5c29.js +0 -1
- package/dist/Cesium/Workers/GeometryAttributes-1b4134a9.js +0 -1
- package/dist/Cesium/Workers/GeometryAttributes-1e4ddcd2.js +0 -1
- package/dist/Cesium/Workers/GeometryInstance-0318e0cd.js +0 -1
- package/dist/Cesium/Workers/GeometryInstance-86b030a6.js +0 -1
- package/dist/Cesium/Workers/GeometryOffsetAttribute-2579b8d2.js +0 -1
- package/dist/Cesium/Workers/GeometryOffsetAttribute-4d39b441.js +0 -1
- package/dist/Cesium/Workers/GeometryPipeline-5926bf6a.js +0 -1
- package/dist/Cesium/Workers/GeometryPipeline-b15e7fd0.js +0 -1
- package/dist/Cesium/Workers/IndexDatatype-1cbc8622.js +0 -1
- package/dist/Cesium/Workers/IndexDatatype-d3db4e7d.js +0 -1
- package/dist/Cesium/Workers/IntersectionTests-832aa5c7.js +0 -1
- package/dist/Cesium/Workers/IntersectionTests-f15438d8.js +0 -1
- package/dist/Cesium/Workers/Math-2ce22ee9.js +0 -1
- package/dist/Cesium/Workers/Matrix2-1509208a.js +0 -1
- package/dist/Cesium/Workers/Matrix2-413c4048.js +0 -1
- package/dist/Cesium/Workers/Matrix3-81054f0f.js +0 -1
- package/dist/Cesium/Workers/OrientedBoundingBox-c3eda7c2.js +0 -1
- package/dist/Cesium/Workers/OrientedBoundingBox-fa9056b2.js +0 -1
- package/dist/Cesium/Workers/Plane-6add0ae1.js +0 -1
- package/dist/Cesium/Workers/Plane-e3daa19b.js +0 -1
- package/dist/Cesium/Workers/PolygonGeometryLibrary-cb0bc5e9.js +0 -1
- package/dist/Cesium/Workers/PolygonGeometryLibrary-d5f3e119.js +0 -1
- package/dist/Cesium/Workers/PolygonPipeline-32699305.js +0 -1
- package/dist/Cesium/Workers/PolygonPipeline-e8d27f39.js +0 -1
- package/dist/Cesium/Workers/PolylinePipeline-3006b0cf.js +0 -1
- package/dist/Cesium/Workers/PolylinePipeline-39d7619d.js +0 -1
- package/dist/Cesium/Workers/PolylineVolumeGeometryLibrary-437b726e.js +0 -1
- package/dist/Cesium/Workers/PolylineVolumeGeometryLibrary-bd0bbdaf.js +0 -1
- package/dist/Cesium/Workers/PrimitivePipeline-90884677.js +0 -1
- package/dist/Cesium/Workers/PrimitivePipeline-e1f3eb3d.js +0 -1
- package/dist/Cesium/Workers/RectangleGeometryLibrary-11b080fb.js +0 -1
- package/dist/Cesium/Workers/RectangleGeometryLibrary-a44974f6.js +0 -1
- package/dist/Cesium/Workers/RuntimeError-9b4ce3fb.js +0 -1
- package/dist/Cesium/Workers/RuntimeError-ac440aa5.js +0 -1
- package/dist/Cesium/Workers/TerrainEncoding-341cc7d2.js +0 -1
- package/dist/Cesium/Workers/TerrainEncoding-7b6ac0c5.js +0 -1
- package/dist/Cesium/Workers/Transforms-bf323bcf.js +0 -39
- package/dist/Cesium/Workers/Transforms-c65aae74.js +0 -14
- package/dist/Cesium/Workers/VertexFormat-e68722dd.js +0 -1
- package/dist/Cesium/Workers/VertexFormat-fbdec922.js +0 -1
- package/dist/Cesium/Workers/WallGeometryLibrary-0cfe87c2.js +0 -1
- package/dist/Cesium/Workers/WallGeometryLibrary-dc44247b.js +0 -1
- package/dist/Cesium/Workers/WebGLConstants-7f557f93.js +0 -1
- package/dist/Cesium/Workers/WebGLConstants-f63312fc.js +0 -1
- package/dist/Cesium/Workers/WebMercatorProjection-2d827489.js +0 -1
- package/dist/Cesium/Workers/WebMercatorProjection-943e2226.js +0 -1
- package/dist/Cesium/Workers/_commonjsHelpers-3aae1032-15991586.js +0 -1
- package/dist/Cesium/Workers/arrayRemoveDuplicates-9b636830.js +0 -1
- package/dist/Cesium/Workers/arrayRemoveDuplicates-fe254feb.js +0 -1
- package/dist/Cesium/Workers/cesiumWorkerBootstrapper.js +0 -31
- package/dist/Cesium/Workers/combine-0259f56f.js +0 -1
- package/dist/Cesium/Workers/combine-0c102d93.js +0 -1
- package/dist/Cesium/Workers/defaultValue-69ee94f4.js +0 -1
- package/dist/Cesium/Workers/defaultValue-f6d5e6da.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./RuntimeError-ac440aa5","./defaultValue-69ee94f4","./ComponentDatatype-a9820060"],(function(t,e,n,r){"use strict";function i(t,e,r){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.z=n.defaultValue(r,0)}i.fromSpherical=function(t,e){n.defined(e)||(e=new i);const r=t.clock,a=t.cone,u=n.defaultValue(t.magnitude,1),o=u*Math.sin(a);return e.x=o*Math.cos(r),e.y=o*Math.sin(r),e.z=u*Math.cos(a),e},i.fromElements=function(t,e,r,a){return n.defined(a)?(a.x=t,a.y=e,a.z=r,a):new i(t,e,r)},i.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e):new i(t.x,t.y,t.z)},i.fromCartesian4=i.clone,i.packedLength=3,i.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t.x,e[r++]=t.y,e[r]=t.z,e},i.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new i),r.x=t[e++],r.y=t[e++],r.z=t[e],r},i.packArray=function(t,e){const r=t.length,a=3*r;n.defined(e)?(Array.isArray(e)||e.length===a)&&e.length!==a&&(e.length=a):e=new Array(a);for(let n=0;n<r;++n)i.pack(t[n],e,3*n);return e},i.unpackArray=function(t,e){const r=t.length;n.defined(e)?e.length=r/3:e=new Array(r/3);for(let n=0;n<r;n+=3){const r=n/3;e[r]=i.unpack(t,n,e[r])}return e},i.fromArray=i.unpack,i.maximumComponent=function(t){return Math.max(t.x,t.y,t.z)},i.minimumComponent=function(t){return Math.min(t.x,t.y,t.z)},i.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n},i.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n},i.clamp=function(t,e,n,i){const a=r.CesiumMath.clamp(t.x,e.x,n.x),u=r.CesiumMath.clamp(t.y,e.y,n.y),o=r.CesiumMath.clamp(t.z,e.z,n.z);return i.x=a,i.y=u,i.z=o,i},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z},i.magnitude=function(t){return Math.sqrt(i.magnitudeSquared(t))};const a=new i;i.distance=function(t,e){return i.subtract(t,e,a),i.magnitude(a)},i.distanceSquared=function(t,e){return i.subtract(t,e,a),i.magnitudeSquared(a)},i.normalize=function(t,e){const n=i.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e},i.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},i.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n},i.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n.z=t.z/e.z,n},i.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n},i.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n},i.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n},i.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n},i.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e},i.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e};const u=new i;i.lerp=function(t,e,n,r){return i.multiplyByScalar(e,n,u),r=i.multiplyByScalar(t,1-n,r),i.add(u,r,r)};const o=new i,s=new i;i.angleBetween=function(t,e){i.normalize(t,o),i.normalize(e,s);const n=i.dot(o,s),r=i.magnitude(i.cross(o,s,o));return Math.atan2(r,n)};const c=new i;i.mostOrthogonalAxis=function(t,e){const n=i.normalize(t,c);return i.abs(n,n),e=n.x<=n.y?n.x<=n.z?i.clone(i.UNIT_X,e):i.clone(i.UNIT_Z,e):n.y<=n.z?i.clone(i.UNIT_Y,e):i.clone(i.UNIT_Z,e)},i.projectVector=function(t,e,n){const r=i.dot(t,e)/i.dot(e,e);return i.multiplyByScalar(e,r,n)},i.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z},i.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]&&t.z===e[n+2]},i.equalsEpsilon=function(t,e,i,a){return t===e||n.defined(t)&&n.defined(e)&&r.CesiumMath.equalsEpsilon(t.x,e.x,i,a)&&r.CesiumMath.equalsEpsilon(t.y,e.y,i,a)&&r.CesiumMath.equalsEpsilon(t.z,e.z,i,a)},i.cross=function(t,e,n){const r=t.x,i=t.y,a=t.z,u=e.x,o=e.y,s=e.z,c=i*s-a*o,l=a*u-r*s,f=r*o-i*u;return n.x=c,n.y=l,n.z=f,n},i.midpoint=function(t,e,n){return n.x=.5*(t.x+e.x),n.y=.5*(t.y+e.y),n.z=.5*(t.z+e.z),n},i.fromDegrees=function(t,e,n,a,u){return t=r.CesiumMath.toRadians(t),e=r.CesiumMath.toRadians(e),i.fromRadians(t,e,n,a,u)};let l=new i,f=new i;const d=new i(40680631590769,40680631590769,40408299984661.445);i.fromRadians=function(t,e,r,a,u){r=n.defaultValue(r,0);const o=n.defined(a)?a.radiiSquared:d,s=Math.cos(e);l.x=s*Math.cos(t),l.y=s*Math.sin(t),l.z=Math.sin(e),l=i.normalize(l,l),i.multiplyComponents(o,l,f);const c=Math.sqrt(i.dot(l,f));return f=i.divideByScalar(f,c,f),l=i.multiplyByScalar(l,r,l),n.defined(u)||(u=new i),i.add(f,l,u)},i.fromDegreesArray=function(t,e,r){const a=t.length;n.defined(r)?r.length=a/2:r=new Array(a/2);for(let n=0;n<a;n+=2){const a=t[n],u=t[n+1],o=n/2;r[o]=i.fromDegrees(a,u,0,e,r[o])}return r},i.fromRadiansArray=function(t,e,r){const a=t.length;n.defined(r)?r.length=a/2:r=new Array(a/2);for(let n=0;n<a;n+=2){const a=t[n],u=t[n+1],o=n/2;r[o]=i.fromRadians(a,u,0,e,r[o])}return r},i.fromDegreesArrayHeights=function(t,e,r){const a=t.length;n.defined(r)?r.length=a/3:r=new Array(a/3);for(let n=0;n<a;n+=3){const a=t[n],u=t[n+1],o=t[n+2],s=n/3;r[s]=i.fromDegrees(a,u,o,e,r[s])}return r},i.fromRadiansArrayHeights=function(t,e,r){const a=t.length;n.defined(r)?r.length=a/3:r=new Array(a/3);for(let n=0;n<a;n+=3){const a=t[n],u=t[n+1],o=t[n+2],s=n/3;r[s]=i.fromRadians(a,u,o,e,r[s])}return r},i.ZERO=Object.freeze(new i(0,0,0)),i.ONE=Object.freeze(new i(1,1,1)),i.UNIT_X=Object.freeze(new i(1,0,0)),i.UNIT_Y=Object.freeze(new i(0,1,0)),i.UNIT_Z=Object.freeze(new i(0,0,1)),i.prototype.clone=function(t){return i.clone(this,t)},i.prototype.equals=function(t){return i.equals(this,t)},i.prototype.equalsEpsilon=function(t,e,n){return i.equalsEpsilon(this,t,e,n)},i.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};const h=new i,m=new i;function y(t,e,a,u,o){const s=t.x,c=t.y,l=t.z,f=e.x,d=e.y,y=e.z,p=s*s*f*f,x=c*c*d*d,w=l*l*y*y,M=p+x+w,g=Math.sqrt(1/M),z=i.multiplyByScalar(t,g,h);if(M<u)return isFinite(g)?i.clone(z,o):void 0;const C=a.x,O=a.y,b=a.z,S=m;S.x=z.x*C*2,S.y=z.y*O*2,S.z=z.z*b*2;let q,R,_,T,V,A,E,I,N,U,P,L=(1-g)*i.magnitude(t)/(.5*i.magnitude(S)),k=0;do{L-=k,_=1/(1+L*C),T=1/(1+L*O),V=1/(1+L*b),A=_*_,E=T*T,I=V*V,N=A*_,U=E*T,P=I*V,q=p*A+x*E+w*I-1,R=p*N*C+x*U*O+w*P*b;k=q/(-2*R)}while(Math.abs(q)>r.CesiumMath.EPSILON12);return n.defined(o)?(o.x=s*_,o.y=c*T,o.z=l*V,o):new i(s*_,c*T,l*V)}function p(t,e,r){this.longitude=n.defaultValue(t,0),this.latitude=n.defaultValue(e,0),this.height=n.defaultValue(r,0)}p.fromRadians=function(t,e,r,i){return r=n.defaultValue(r,0),n.defined(i)?(i.longitude=t,i.latitude=e,i.height=r,i):new p(t,e,r)},p.fromDegrees=function(t,e,n,i){return t=r.CesiumMath.toRadians(t),e=r.CesiumMath.toRadians(e),p.fromRadians(t,e,n,i)};const x=new i,w=new i,M=new i,g=new i(1/6378137,1/6378137,1/6356752.314245179),z=new i(1/40680631590769,1/40680631590769,1/40408299984661.445),C=r.CesiumMath.EPSILON1;function O(t,e,a,u){e=n.defaultValue(e,0),a=n.defaultValue(a,0),u=n.defaultValue(u,0),t._radii=new i(e,a,u),t._radiiSquared=new i(e*e,a*a,u*u),t._radiiToTheFourth=new i(e*e*e*e,a*a*a*a,u*u*u*u),t._oneOverRadii=new i(0===e?0:1/e,0===a?0:1/a,0===u?0:1/u),t._oneOverRadiiSquared=new i(0===e?0:1/(e*e),0===a?0:1/(a*a),0===u?0:1/(u*u)),t._minimumRadius=Math.min(e,a,u),t._maximumRadius=Math.max(e,a,u),t._centerToleranceSquared=r.CesiumMath.EPSILON1,0!==t._radiiSquared.z&&(t._squaredXOverSquaredZ=t._radiiSquared.x/t._radiiSquared.z)}function b(t,e,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,O(this,t,e,n)}p.fromCartesian=function(t,e,a){const u=n.defined(e)?e.oneOverRadii:g,o=n.defined(e)?e.oneOverRadiiSquared:z,s=y(t,u,o,n.defined(e)?e._centerToleranceSquared:C,w);if(!n.defined(s))return;let c=i.multiplyComponents(s,o,x);c=i.normalize(c,c);const l=i.subtract(t,s,M),f=Math.atan2(c.y,c.x),d=Math.asin(c.z),h=r.CesiumMath.sign(i.dot(l,t))*i.magnitude(l);return n.defined(a)?(a.longitude=f,a.latitude=d,a.height=h,a):new p(f,d,h)},p.toCartesian=function(t,e,n){return i.fromRadians(t.longitude,t.latitude,t.height,e,n)},p.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.longitude=t.longitude,e.latitude=t.latitude,e.height=t.height,e):new p(t.longitude,t.latitude,t.height)},p.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.longitude===e.longitude&&t.latitude===e.latitude&&t.height===e.height},p.equalsEpsilon=function(t,e,r){return r=n.defaultValue(r,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t.longitude-e.longitude)<=r&&Math.abs(t.latitude-e.latitude)<=r&&Math.abs(t.height-e.height)<=r},p.ZERO=Object.freeze(new p(0,0,0)),p.prototype.clone=function(t){return p.clone(this,t)},p.prototype.equals=function(t){return p.equals(this,t)},p.prototype.equalsEpsilon=function(t,e){return p.equalsEpsilon(this,t,e)},p.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`},Object.defineProperties(b.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),b.clone=function(t,e){if(!n.defined(t))return;const r=t._radii;return n.defined(e)?(i.clone(r,e._radii),i.clone(t._radiiSquared,e._radiiSquared),i.clone(t._radiiToTheFourth,e._radiiToTheFourth),i.clone(t._oneOverRadii,e._oneOverRadii),i.clone(t._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=t._minimumRadius,e._maximumRadius=t._maximumRadius,e._centerToleranceSquared=t._centerToleranceSquared,e):new b(r.x,r.y,r.z)},b.fromCartesian3=function(t,e){return n.defined(e)||(e=new b),n.defined(t)?(O(e,t.x,t.y,t.z),e):e},b.WGS84=Object.freeze(new b(6378137,6378137,6356752.314245179)),b.UNIT_SPHERE=Object.freeze(new b(1,1,1)),b.MOON=Object.freeze(new b(r.CesiumMath.LUNAR_RADIUS,r.CesiumMath.LUNAR_RADIUS,r.CesiumMath.LUNAR_RADIUS)),b.prototype.clone=function(t){return b.clone(this,t)},b.packedLength=i.packedLength,b.pack=function(t,e,r){return r=n.defaultValue(r,0),i.pack(t._radii,e,r),e},b.unpack=function(t,e,r){e=n.defaultValue(e,0);const a=i.unpack(t,e);return b.fromCartesian3(a,r)},b.prototype.geocentricSurfaceNormal=i.normalize,b.prototype.geodeticSurfaceNormalCartographic=function(t,e){const r=t.longitude,a=t.latitude,u=Math.cos(a),o=u*Math.cos(r),s=u*Math.sin(r),c=Math.sin(a);return n.defined(e)||(e=new i),e.x=o,e.y=s,e.z=c,i.normalize(e,e)},b.prototype.geodeticSurfaceNormal=function(t,e){if(!i.equalsEpsilon(t,i.ZERO,r.CesiumMath.EPSILON14))return n.defined(e)||(e=new i),e=i.multiplyComponents(t,this._oneOverRadiiSquared,e),i.normalize(e,e)};const S=new i,q=new i;b.prototype.cartographicToCartesian=function(t,e){const r=S,a=q;this.geodeticSurfaceNormalCartographic(t,r),i.multiplyComponents(this._radiiSquared,r,a);const u=Math.sqrt(i.dot(r,a));return i.divideByScalar(a,u,a),i.multiplyByScalar(r,t.height,r),n.defined(e)||(e=new i),i.add(a,r,e)},b.prototype.cartographicArrayToCartesianArray=function(t,e){const r=t.length;n.defined(e)?e.length=r:e=new Array(r);for(let n=0;n<r;n++)e[n]=this.cartographicToCartesian(t[n],e[n]);return e};const R=new i,_=new i,T=new i;b.prototype.cartesianToCartographic=function(t,e){const a=this.scaleToGeodeticSurface(t,_);if(!n.defined(a))return;const u=this.geodeticSurfaceNormal(a,R),o=i.subtract(t,a,T),s=Math.atan2(u.y,u.x),c=Math.asin(u.z),l=r.CesiumMath.sign(i.dot(o,t))*i.magnitude(o);return n.defined(e)?(e.longitude=s,e.latitude=c,e.height=l,e):new p(s,c,l)},b.prototype.cartesianArrayToCartographicArray=function(t,e){const r=t.length;n.defined(e)?e.length=r:e=new Array(r);for(let n=0;n<r;++n)e[n]=this.cartesianToCartographic(t[n],e[n]);return e},b.prototype.scaleToGeodeticSurface=function(t,e){return y(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)},b.prototype.scaleToGeocentricSurface=function(t,e){n.defined(e)||(e=new i);const r=t.x,a=t.y,u=t.z,o=this._oneOverRadiiSquared,s=1/Math.sqrt(r*r*o.x+a*a*o.y+u*u*o.z);return i.multiplyByScalar(t,s,e)},b.prototype.transformPositionToScaledSpace=function(t,e){return n.defined(e)||(e=new i),i.multiplyComponents(t,this._oneOverRadii,e)},b.prototype.transformPositionFromScaledSpace=function(t,e){return n.defined(e)||(e=new i),i.multiplyComponents(t,this._radii,e)},b.prototype.equals=function(t){return this===t||n.defined(t)&&i.equals(this._radii,t._radii)},b.prototype.toString=function(){return this._radii.toString()},b.prototype.getSurfaceNormalIntersectionWithZAxis=function(t,e,r){e=n.defaultValue(e,0);const a=this._squaredXOverSquaredZ;if(n.defined(r)||(r=new i),r.x=0,r.y=0,r.z=t.z*(1-a),!(Math.abs(r.z)>=this._radii.z-e))return r};const V=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],A=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function E(t,e,n){const r=.5*(e+t),i=.5*(e-t);let a=0;for(let t=0;t<5;t++){const e=i*V[t];a+=A[t]*(n(r+e)+n(r-e))}return a*=i,a}function I(t,e,r,i,a,u,o,s,c){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(i,0),this[2]=n.defaultValue(o,0),this[3]=n.defaultValue(e,0),this[4]=n.defaultValue(a,0),this[5]=n.defaultValue(s,0),this[6]=n.defaultValue(r,0),this[7]=n.defaultValue(u,0),this[8]=n.defaultValue(c,0)}b.prototype.surfaceArea=function(t){const e=t.west;let n=t.east;const i=t.south,a=t.north;for(;n<e;)n+=r.CesiumMath.TWO_PI;const u=this._radiiSquared,o=u.x,s=u.y,c=u.z,l=o*s;return E(i,a,(function(t){const r=Math.cos(t),i=Math.sin(t);return Math.cos(t)*E(e,n,(function(t){const e=Math.cos(t),n=Math.sin(t);return Math.sqrt(l*i*i+c*(s*e*e+o*n*n)*r*r)}))}))},I.packedLength=9,I.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t[0],e[r++]=t[1],e[r++]=t[2],e[r++]=t[3],e[r++]=t[4],e[r++]=t[5],e[r++]=t[6],e[r++]=t[7],e[r++]=t[8],e},I.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new I),r[0]=t[e++],r[1]=t[e++],r[2]=t[e++],r[3]=t[e++],r[4]=t[e++],r[5]=t[e++],r[6]=t[e++],r[7]=t[e++],r[8]=t[e++],r},I.packArray=function(t,e){const r=t.length,i=9*r;n.defined(e)?(Array.isArray(e)||e.length===i)&&e.length!==i&&(e.length=i):e=new Array(i);for(let n=0;n<r;++n)I.pack(t[n],e,9*n);return e},I.unpackArray=function(t,e){const r=t.length;n.defined(e)?e.length=r/9:e=new Array(r/9);for(let n=0;n<r;n+=9){const r=n/9;e[r]=I.unpack(t,n,e[r])}return e},I.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e):new I(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])},I.fromArray=I.unpack,I.fromColumnMajorArray=function(t,e){return I.clone(t,e)},I.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],e):new I(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},I.fromQuaternion=function(t,e){const r=t.x*t.x,i=t.x*t.y,a=t.x*t.z,u=t.x*t.w,o=t.y*t.y,s=t.y*t.z,c=t.y*t.w,l=t.z*t.z,f=t.z*t.w,d=t.w*t.w,h=r-o-l+d,m=2*(i-f),y=2*(a+c),p=2*(i+f),x=-r+o-l+d,w=2*(s-u),M=2*(a-c),g=2*(s+u),z=-r-o+l+d;return n.defined(e)?(e[0]=h,e[1]=p,e[2]=M,e[3]=m,e[4]=x,e[5]=g,e[6]=y,e[7]=w,e[8]=z,e):new I(h,m,y,p,x,w,M,g,z)},I.fromHeadingPitchRoll=function(t,e){const r=Math.cos(-t.pitch),i=Math.cos(-t.heading),a=Math.cos(t.roll),u=Math.sin(-t.pitch),o=Math.sin(-t.heading),s=Math.sin(t.roll),c=r*i,l=-a*o+s*u*i,f=s*o+a*u*i,d=r*o,h=a*i+s*u*o,m=-s*i+a*u*o,y=-u,p=s*r,x=a*r;return n.defined(e)?(e[0]=c,e[1]=d,e[2]=y,e[3]=l,e[4]=h,e[5]=p,e[6]=f,e[7]=m,e[8]=x,e):new I(c,l,f,d,h,m,y,p,x)},I.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=t.y,e[5]=0,e[6]=0,e[7]=0,e[8]=t.z,e):new I(t.x,0,0,0,t.y,0,0,0,t.z)},I.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=t,e[5]=0,e[6]=0,e[7]=0,e[8]=t,e):new I(t,0,0,0,t,0,0,0,t)},I.fromCrossProduct=function(t,e){return n.defined(e)?(e[0]=0,e[1]=t.z,e[2]=-t.y,e[3]=-t.z,e[4]=0,e[5]=t.x,e[6]=t.y,e[7]=-t.x,e[8]=0,e):new I(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)},I.fromRotationX=function(t,e){const r=Math.cos(t),i=Math.sin(t);return n.defined(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=r,e[5]=i,e[6]=0,e[7]=-i,e[8]=r,e):new I(1,0,0,0,r,-i,0,i,r)},I.fromRotationY=function(t,e){const r=Math.cos(t),i=Math.sin(t);return n.defined(e)?(e[0]=r,e[1]=0,e[2]=-i,e[3]=0,e[4]=1,e[5]=0,e[6]=i,e[7]=0,e[8]=r,e):new I(r,0,i,0,1,0,-i,0,r)},I.fromRotationZ=function(t,e){const r=Math.cos(t),i=Math.sin(t);return n.defined(e)?(e[0]=r,e[1]=i,e[2]=0,e[3]=-i,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new I(r,-i,0,i,r,0,0,0,1)},I.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},I.getElementIndex=function(t,e){return 3*t+e},I.getColumn=function(t,e,n){const r=3*e,i=t[r],a=t[r+1],u=t[r+2];return n.x=i,n.y=a,n.z=u,n},I.setColumn=function(t,e,n,r){const i=3*e;return(r=I.clone(t,r))[i]=n.x,r[i+1]=n.y,r[i+2]=n.z,r},I.getRow=function(t,e,n){const r=t[e],i=t[e+3],a=t[e+6];return n.x=r,n.y=i,n.z=a,n},I.setRow=function(t,e,n,r){return(r=I.clone(t,r))[e]=n.x,r[e+3]=n.y,r[e+6]=n.z,r};const N=new i;I.setScale=function(t,e,n){const r=I.getScale(t,N),i=e.x/r.x,a=e.y/r.y,u=e.z/r.z;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=t[3]*a,n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*u,n[7]=t[7]*u,n[8]=t[8]*u,n};const U=new i;I.setUniformScale=function(t,e,n){const r=I.getScale(t,U),i=e/r.x,a=e/r.y,u=e/r.z;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=t[3]*a,n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*u,n[7]=t[7]*u,n[8]=t[8]*u,n};const P=new i;I.getScale=function(t,e){return e.x=i.magnitude(i.fromElements(t[0],t[1],t[2],P)),e.y=i.magnitude(i.fromElements(t[3],t[4],t[5],P)),e.z=i.magnitude(i.fromElements(t[6],t[7],t[8],P)),e};const L=new i;I.getMaximumScale=function(t){return I.getScale(t,L),i.maximumComponent(L)};const k=new i;I.setRotation=function(t,e,n){const r=I.getScale(t,k);return n[0]=e[0]*r.x,n[1]=e[1]*r.x,n[2]=e[2]*r.x,n[3]=e[3]*r.y,n[4]=e[4]*r.y,n[5]=e[5]*r.y,n[6]=e[6]*r.z,n[7]=e[7]*r.z,n[8]=e[8]*r.z,n};const W=new i;I.getRotation=function(t,e){const n=I.getScale(t,W);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.x,e[3]=t[3]/n.y,e[4]=t[4]/n.y,e[5]=t[5]/n.y,e[6]=t[6]/n.z,e[7]=t[7]/n.z,e[8]=t[8]/n.z,e},I.multiply=function(t,e,n){const r=t[0]*e[0]+t[3]*e[1]+t[6]*e[2],i=t[1]*e[0]+t[4]*e[1]+t[7]*e[2],a=t[2]*e[0]+t[5]*e[1]+t[8]*e[2],u=t[0]*e[3]+t[3]*e[4]+t[6]*e[5],o=t[1]*e[3]+t[4]*e[4]+t[7]*e[5],s=t[2]*e[3]+t[5]*e[4]+t[8]*e[5],c=t[0]*e[6]+t[3]*e[7]+t[6]*e[8],l=t[1]*e[6]+t[4]*e[7]+t[7]*e[8],f=t[2]*e[6]+t[5]*e[7]+t[8]*e[8];return n[0]=r,n[1]=i,n[2]=a,n[3]=u,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=f,n},I.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n[4]=t[4]+e[4],n[5]=t[5]+e[5],n[6]=t[6]+e[6],n[7]=t[7]+e[7],n[8]=t[8]+e[8],n},I.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n[4]=t[4]-e[4],n[5]=t[5]-e[5],n[6]=t[6]-e[6],n[7]=t[7]-e[7],n[8]=t[8]-e[8],n},I.multiplyByVector=function(t,e,n){const r=e.x,i=e.y,a=e.z,u=t[0]*r+t[3]*i+t[6]*a,o=t[1]*r+t[4]*i+t[7]*a,s=t[2]*r+t[5]*i+t[8]*a;return n.x=u,n.y=o,n.z=s,n},I.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n},I.multiplyByScale=function(t,e,n){return n[0]=t[0]*e.x,n[1]=t[1]*e.x,n[2]=t[2]*e.x,n[3]=t[3]*e.y,n[4]=t[4]*e.y,n[5]=t[5]*e.y,n[6]=t[6]*e.z,n[7]=t[7]*e.z,n[8]=t[8]*e.z,n},I.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n},I.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e},I.transpose=function(t,e){const n=t[0],r=t[3],i=t[6],a=t[1],u=t[4],o=t[7],s=t[2],c=t[5],l=t[8];return e[0]=n,e[1]=r,e[2]=i,e[3]=a,e[4]=u,e[5]=o,e[6]=s,e[7]=c,e[8]=l,e};const v=[1,0,0],B=[2,2,1];function $(t){let e=0;for(let n=0;n<3;++n){const r=t[I.getElementIndex(B[n],v[n])];e+=2*r*r}return Math.sqrt(e)}function j(t,e){const n=r.CesiumMath.EPSILON15;let i=0,a=1;for(let e=0;e<3;++e){const n=Math.abs(t[I.getElementIndex(B[e],v[e])]);n>i&&(a=e,i=n)}let u=1,o=0;const s=v[a],c=B[a];if(Math.abs(t[I.getElementIndex(c,s)])>n){const e=(t[I.getElementIndex(c,c)]-t[I.getElementIndex(s,s)])/2/t[I.getElementIndex(c,s)];let n;n=e<0?-1/(-e+Math.sqrt(1+e*e)):1/(e+Math.sqrt(1+e*e)),u=1/Math.sqrt(1+n*n),o=n*u}return(e=I.clone(I.IDENTITY,e))[I.getElementIndex(s,s)]=e[I.getElementIndex(c,c)]=u,e[I.getElementIndex(c,s)]=o,e[I.getElementIndex(s,c)]=-o,e}const X=new I,Z=new I;I.computeEigenDecomposition=function(t,e){const i=r.CesiumMath.EPSILON20;let a=0,u=0;n.defined(e)||(e={});const o=e.unitary=I.clone(I.IDENTITY,e.unitary),s=e.diagonal=I.clone(t,e.diagonal),c=i*function(t){let e=0;for(let n=0;n<9;++n){const r=t[n];e+=r*r}return Math.sqrt(e)}(s);for(;u<10&&$(s)>c;)j(s,X),I.transpose(X,Z),I.multiply(s,X,s),I.multiply(Z,s,s),I.multiply(o,X,o),++a>2&&(++u,a=0);return e},I.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e},I.determinant=function(t){const e=t[0],n=t[3],r=t[6],i=t[1],a=t[4],u=t[7],o=t[2],s=t[5],c=t[8];return e*(a*c-s*u)+i*(s*r-n*c)+o*(n*u-a*r)},I.inverse=function(t,e){const n=t[0],r=t[1],i=t[2],a=t[3],u=t[4],o=t[5],s=t[6],c=t[7],l=t[8],f=I.determinant(t);e[0]=u*l-c*o,e[1]=c*i-r*l,e[2]=r*o-u*i,e[3]=s*o-a*l,e[4]=n*l-s*i,e[5]=a*i-n*o,e[6]=a*c-s*u,e[7]=s*r-n*c,e[8]=n*u-a*r;const d=1/f;return I.multiplyByScalar(e,d,e)};const D=new I;function Y(t,e,r,i){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.z=n.defaultValue(r,0),this.w=n.defaultValue(i,0)}I.inverseTranspose=function(t,e){return I.inverse(I.transpose(t,D),e)},I.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},I.equalsEpsilon=function(t,e,r){return r=n.defaultValue(r,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=r&&Math.abs(t[1]-e[1])<=r&&Math.abs(t[2]-e[2])<=r&&Math.abs(t[3]-e[3])<=r&&Math.abs(t[4]-e[4])<=r&&Math.abs(t[5]-e[5])<=r&&Math.abs(t[6]-e[6])<=r&&Math.abs(t[7]-e[7])<=r&&Math.abs(t[8]-e[8])<=r},I.IDENTITY=Object.freeze(new I(1,0,0,0,1,0,0,0,1)),I.ZERO=Object.freeze(new I(0,0,0,0,0,0,0,0,0)),I.COLUMN0ROW0=0,I.COLUMN0ROW1=1,I.COLUMN0ROW2=2,I.COLUMN1ROW0=3,I.COLUMN1ROW1=4,I.COLUMN1ROW2=5,I.COLUMN2ROW0=6,I.COLUMN2ROW1=7,I.COLUMN2ROW2=8,Object.defineProperties(I.prototype,{length:{get:function(){return I.packedLength}}}),I.prototype.clone=function(t){return I.clone(this,t)},I.prototype.equals=function(t){return I.equals(this,t)},I.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]&&t[4]===e[n+4]&&t[5]===e[n+5]&&t[6]===e[n+6]&&t[7]===e[n+7]&&t[8]===e[n+8]},I.prototype.equalsEpsilon=function(t,e){return I.equalsEpsilon(this,t,e)},I.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},Y.fromElements=function(t,e,r,i,a){return n.defined(a)?(a.x=t,a.y=e,a.z=r,a.w=i,a):new Y(t,e,r,i)},Y.fromColor=function(t,e){return n.defined(e)?(e.x=t.red,e.y=t.green,e.z=t.blue,e.w=t.alpha,e):new Y(t.red,t.green,t.blue,t.alpha)},Y.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e):new Y(t.x,t.y,t.z,t.w)},Y.packedLength=4,Y.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t.x,e[r++]=t.y,e[r++]=t.z,e[r]=t.w,e},Y.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new Y),r.x=t[e++],r.y=t[e++],r.z=t[e++],r.w=t[e],r},Y.packArray=function(t,e){const r=t.length,i=4*r;n.defined(e)?(Array.isArray(e)||e.length===i)&&e.length!==i&&(e.length=i):e=new Array(i);for(let n=0;n<r;++n)Y.pack(t[n],e,4*n);return e},Y.unpackArray=function(t,e){const r=t.length;n.defined(e)?e.length=r/4:e=new Array(r/4);for(let n=0;n<r;n+=4){const r=n/4;e[r]=Y.unpack(t,n,e[r])}return e},Y.fromArray=Y.unpack,Y.maximumComponent=function(t){return Math.max(t.x,t.y,t.z,t.w)},Y.minimumComponent=function(t){return Math.min(t.x,t.y,t.z,t.w)},Y.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n.w=Math.min(t.w,e.w),n},Y.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n.w=Math.max(t.w,e.w),n},Y.clamp=function(t,e,n,i){const a=r.CesiumMath.clamp(t.x,e.x,n.x),u=r.CesiumMath.clamp(t.y,e.y,n.y),o=r.CesiumMath.clamp(t.z,e.z,n.z),s=r.CesiumMath.clamp(t.w,e.w,n.w);return i.x=a,i.y=u,i.z=o,i.w=s,i},Y.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},Y.magnitude=function(t){return Math.sqrt(Y.magnitudeSquared(t))};const F=new Y;Y.distance=function(t,e){return Y.subtract(t,e,F),Y.magnitude(F)},Y.distanceSquared=function(t,e){return Y.subtract(t,e,F),Y.magnitudeSquared(F)},Y.normalize=function(t,e){const n=Y.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},Y.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},Y.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n.w=t.w*e.w,n},Y.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n.z=t.z/e.z,n.w=t.w/e.w,n},Y.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n.w=t.w+e.w,n},Y.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n.w=t.w-e.w,n},Y.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n.w=t.w*e,n},Y.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,n},Y.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e.w=-t.w,e},Y.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e.w=Math.abs(t.w),e};const G=new Y;Y.lerp=function(t,e,n,r){return Y.multiplyByScalar(e,n,G),r=Y.multiplyByScalar(t,1-n,r),Y.add(G,r,r)};const H=new Y;Y.mostOrthogonalAxis=function(t,e){const n=Y.normalize(t,H);return Y.abs(n,n),e=n.x<=n.y?n.x<=n.z?n.x<=n.w?Y.clone(Y.UNIT_X,e):Y.clone(Y.UNIT_W,e):n.z<=n.w?Y.clone(Y.UNIT_Z,e):Y.clone(Y.UNIT_W,e):n.y<=n.z?n.y<=n.w?Y.clone(Y.UNIT_Y,e):Y.clone(Y.UNIT_W,e):n.z<=n.w?Y.clone(Y.UNIT_Z,e):Y.clone(Y.UNIT_W,e)},Y.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},Y.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]&&t.z===e[n+2]&&t.w===e[n+3]},Y.equalsEpsilon=function(t,e,i,a){return t===e||n.defined(t)&&n.defined(e)&&r.CesiumMath.equalsEpsilon(t.x,e.x,i,a)&&r.CesiumMath.equalsEpsilon(t.y,e.y,i,a)&&r.CesiumMath.equalsEpsilon(t.z,e.z,i,a)&&r.CesiumMath.equalsEpsilon(t.w,e.w,i,a)},Y.ZERO=Object.freeze(new Y(0,0,0,0)),Y.ONE=Object.freeze(new Y(1,1,1,1)),Y.UNIT_X=Object.freeze(new Y(1,0,0,0)),Y.UNIT_Y=Object.freeze(new Y(0,1,0,0)),Y.UNIT_Z=Object.freeze(new Y(0,0,1,0)),Y.UNIT_W=Object.freeze(new Y(0,0,0,1)),Y.prototype.clone=function(t){return Y.clone(this,t)},Y.prototype.equals=function(t){return Y.equals(this,t)},Y.prototype.equalsEpsilon=function(t,e,n){return Y.equalsEpsilon(this,t,e,n)},Y.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const Q=new Float32Array(1),J=new Uint8Array(Q.buffer),K=new Uint32Array([287454020]),tt=68===new Uint8Array(K.buffer)[0];function et(t,e,r,i,a,u,o,s,c,l,f,d,h,m,y,p){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(a,0),this[2]=n.defaultValue(c,0),this[3]=n.defaultValue(h,0),this[4]=n.defaultValue(e,0),this[5]=n.defaultValue(u,0),this[6]=n.defaultValue(l,0),this[7]=n.defaultValue(m,0),this[8]=n.defaultValue(r,0),this[9]=n.defaultValue(o,0),this[10]=n.defaultValue(f,0),this[11]=n.defaultValue(y,0),this[12]=n.defaultValue(i,0),this[13]=n.defaultValue(s,0),this[14]=n.defaultValue(d,0),this[15]=n.defaultValue(p,0)}Y.packFloat=function(t,e){return n.defined(e)||(e=new Y),Q[0]=t,tt?(e.x=J[0],e.y=J[1],e.z=J[2],e.w=J[3]):(e.x=J[3],e.y=J[2],e.z=J[1],e.w=J[0]),e},Y.unpackFloat=function(t){return tt?(J[0]=t.x,J[1]=t.y,J[2]=t.z,J[3]=t.w):(J[0]=t.w,J[1]=t.z,J[2]=t.y,J[3]=t.x),Q[0]},et.packedLength=16,et.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t[0],e[r++]=t[1],e[r++]=t[2],e[r++]=t[3],e[r++]=t[4],e[r++]=t[5],e[r++]=t[6],e[r++]=t[7],e[r++]=t[8],e[r++]=t[9],e[r++]=t[10],e[r++]=t[11],e[r++]=t[12],e[r++]=t[13],e[r++]=t[14],e[r]=t[15],e},et.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new et),r[0]=t[e++],r[1]=t[e++],r[2]=t[e++],r[3]=t[e++],r[4]=t[e++],r[5]=t[e++],r[6]=t[e++],r[7]=t[e++],r[8]=t[e++],r[9]=t[e++],r[10]=t[e++],r[11]=t[e++],r[12]=t[e++],r[13]=t[e++],r[14]=t[e++],r[15]=t[e],r},et.packArray=function(t,e){const r=t.length,i=16*r;n.defined(e)?(Array.isArray(e)||e.length===i)&&e.length!==i&&(e.length=i):e=new Array(i);for(let n=0;n<r;++n)et.pack(t[n],e,16*n);return e},et.unpackArray=function(t,e){const r=t.length;n.defined(e)?e.length=r/16:e=new Array(r/16);for(let n=0;n<r;n+=16){const r=n/16;e[r]=et.unpack(t,n,e[r])}return e},et.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):new et(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])},et.fromArray=et.unpack,et.fromColumnMajorArray=function(t,e){return et.clone(t,e)},et.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e):new et(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},et.fromRotationTranslation=function(t,e,r){return e=n.defaultValue(e,i.ZERO),n.defined(r)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=0,r[4]=t[3],r[5]=t[4],r[6]=t[5],r[7]=0,r[8]=t[6],r[9]=t[7],r[10]=t[8],r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,r):new et(t[0],t[3],t[6],e.x,t[1],t[4],t[7],e.y,t[2],t[5],t[8],e.z,0,0,0,1)},et.fromTranslationQuaternionRotationScale=function(t,e,r,i){n.defined(i)||(i=new et);const a=r.x,u=r.y,o=r.z,s=e.x*e.x,c=e.x*e.y,l=e.x*e.z,f=e.x*e.w,d=e.y*e.y,h=e.y*e.z,m=e.y*e.w,y=e.z*e.z,p=e.z*e.w,x=e.w*e.w,w=s-d-y+x,M=2*(c-p),g=2*(l+m),z=2*(c+p),C=-s+d-y+x,O=2*(h-f),b=2*(l-m),S=2*(h+f),q=-s-d+y+x;return i[0]=w*a,i[1]=z*a,i[2]=b*a,i[3]=0,i[4]=M*u,i[5]=C*u,i[6]=S*u,i[7]=0,i[8]=g*o,i[9]=O*o,i[10]=q*o,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i},et.fromTranslationRotationScale=function(t,e){return et.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,e)},et.fromTranslation=function(t,e){return et.fromRotationTranslation(I.IDENTITY,t,e)},et.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new et(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},et.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new et(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)},et.fromRotation=function(t,e){return n.defined(e)||(e=new et),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e};const nt=new i,rt=new i,it=new i;et.fromCamera=function(t,e){const r=t.position,a=t.direction,u=t.up;i.normalize(a,nt),i.normalize(i.cross(nt,u,rt),rt),i.normalize(i.cross(rt,nt,it),it);const o=rt.x,s=rt.y,c=rt.z,l=nt.x,f=nt.y,d=nt.z,h=it.x,m=it.y,y=it.z,p=r.x,x=r.y,w=r.z,M=o*-p+s*-x+c*-w,g=h*-p+m*-x+y*-w,z=l*p+f*x+d*w;return n.defined(e)?(e[0]=o,e[1]=h,e[2]=-l,e[3]=0,e[4]=s,e[5]=m,e[6]=-f,e[7]=0,e[8]=c,e[9]=y,e[10]=-d,e[11]=0,e[12]=M,e[13]=g,e[14]=z,e[15]=1,e):new et(o,s,c,M,h,m,y,g,-l,-f,-d,z,0,0,0,1)},et.computePerspectiveFieldOfView=function(t,e,n,r,i){const a=1/Math.tan(.5*t),u=a/e,o=(r+n)/(n-r),s=2*r*n/(n-r);return i[0]=u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=o,i[11]=-1,i[12]=0,i[13]=0,i[14]=s,i[15]=0,i},et.computeOrthographicOffCenter=function(t,e,n,r,i,a,u){let o=1/(e-t),s=1/(r-n),c=1/(a-i);const l=-(e+t)*o,f=-(r+n)*s,d=-(a+i)*c;return o*=2,s*=2,c*=-2,u[0]=o,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=s,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=c,u[11]=0,u[12]=l,u[13]=f,u[14]=d,u[15]=1,u},et.computePerspectiveOffCenter=function(t,e,n,r,i,a,u){const o=2*i/(e-t),s=2*i/(r-n),c=(e+t)/(e-t),l=(r+n)/(r-n),f=-(a+i)/(a-i),d=-2*a*i/(a-i);return u[0]=o,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=s,u[6]=0,u[7]=0,u[8]=c,u[9]=l,u[10]=f,u[11]=-1,u[12]=0,u[13]=0,u[14]=d,u[15]=0,u},et.computeInfinitePerspectiveOffCenter=function(t,e,n,r,i,a){const u=2*i/(e-t),o=2*i/(r-n),s=(e+t)/(e-t),c=(r+n)/(r-n),l=-2*i;return a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=o,a[6]=0,a[7]=0,a[8]=s,a[9]=c,a[10]=-1,a[11]=-1,a[12]=0,a[13]=0,a[14]=l,a[15]=0,a},et.computeViewportTransformation=function(t,e,r,i){n.defined(i)||(i=new et),t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT);const a=n.defaultValue(t.x,0),u=n.defaultValue(t.y,0),o=n.defaultValue(t.width,0),s=n.defaultValue(t.height,0);e=n.defaultValue(e,0);const c=.5*o,l=.5*s,f=.5*((r=n.defaultValue(r,1))-e),d=c,h=l,m=f,y=a+c,p=u+l,x=e+f;return i[0]=d,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=h,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=m,i[11]=0,i[12]=y,i[13]=p,i[14]=x,i[15]=1,i},et.computeView=function(t,e,n,r,a){return a[0]=r.x,a[1]=n.x,a[2]=-e.x,a[3]=0,a[4]=r.y,a[5]=n.y,a[6]=-e.y,a[7]=0,a[8]=r.z,a[9]=n.z,a[10]=-e.z,a[11]=0,a[12]=-i.dot(r,t),a[13]=-i.dot(n,t),a[14]=i.dot(e,t),a[15]=1,a},et.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},et.getElementIndex=function(t,e){return 4*t+e},et.getColumn=function(t,e,n){const r=4*e,i=t[r],a=t[r+1],u=t[r+2],o=t[r+3];return n.x=i,n.y=a,n.z=u,n.w=o,n},et.setColumn=function(t,e,n,r){const i=4*e;return(r=et.clone(t,r))[i]=n.x,r[i+1]=n.y,r[i+2]=n.z,r[i+3]=n.w,r},et.getRow=function(t,e,n){const r=t[e],i=t[e+4],a=t[e+8],u=t[e+12];return n.x=r,n.y=i,n.z=a,n.w=u,n},et.setRow=function(t,e,n,r){return(r=et.clone(t,r))[e]=n.x,r[e+4]=n.y,r[e+8]=n.z,r[e+12]=n.w,r},et.setTranslation=function(t,e,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=t[15],n};const at=new i;et.setScale=function(t,e,n){const r=et.getScale(t,at),i=e.x/r.x,a=e.y/r.y,u=e.z/r.z;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=t[3],n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*a,n[7]=t[7],n[8]=t[8]*u,n[9]=t[9]*u,n[10]=t[10]*u,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const ut=new i;et.setUniformScale=function(t,e,n){const r=et.getScale(t,ut),i=e/r.x,a=e/r.y,u=e/r.z;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n[3]=t[3],n[4]=t[4]*a,n[5]=t[5]*a,n[6]=t[6]*a,n[7]=t[7],n[8]=t[8]*u,n[9]=t[9]*u,n[10]=t[10]*u,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const ot=new i;et.getScale=function(t,e){return e.x=i.magnitude(i.fromElements(t[0],t[1],t[2],ot)),e.y=i.magnitude(i.fromElements(t[4],t[5],t[6],ot)),e.z=i.magnitude(i.fromElements(t[8],t[9],t[10],ot)),e};const st=new i;et.getMaximumScale=function(t){return et.getScale(t,st),i.maximumComponent(st)};const ct=new i;et.setRotation=function(t,e,n){const r=et.getScale(t,ct);return n[0]=e[0]*r.x,n[1]=e[1]*r.x,n[2]=e[2]*r.x,n[3]=t[3],n[4]=e[3]*r.y,n[5]=e[4]*r.y,n[6]=e[5]*r.y,n[7]=t[7],n[8]=e[6]*r.z,n[9]=e[7]*r.z,n[10]=e[8]*r.z,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const lt=new i;et.getRotation=function(t,e){const n=et.getScale(t,lt);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.x,e[3]=t[4]/n.y,e[4]=t[5]/n.y,e[5]=t[6]/n.y,e[6]=t[8]/n.z,e[7]=t[9]/n.z,e[8]=t[10]/n.z,e},et.multiply=function(t,e,n){const r=t[0],i=t[1],a=t[2],u=t[3],o=t[4],s=t[5],c=t[6],l=t[7],f=t[8],d=t[9],h=t[10],m=t[11],y=t[12],p=t[13],x=t[14],w=t[15],M=e[0],g=e[1],z=e[2],C=e[3],O=e[4],b=e[5],S=e[6],q=e[7],R=e[8],_=e[9],T=e[10],V=e[11],A=e[12],E=e[13],I=e[14],N=e[15],U=r*M+o*g+f*z+y*C,P=i*M+s*g+d*z+p*C,L=a*M+c*g+h*z+x*C,k=u*M+l*g+m*z+w*C,W=r*O+o*b+f*S+y*q,v=i*O+s*b+d*S+p*q,B=a*O+c*b+h*S+x*q,$=u*O+l*b+m*S+w*q,j=r*R+o*_+f*T+y*V,X=i*R+s*_+d*T+p*V,Z=a*R+c*_+h*T+x*V,D=u*R+l*_+m*T+w*V,Y=r*A+o*E+f*I+y*N,F=i*A+s*E+d*I+p*N,G=a*A+c*E+h*I+x*N,H=u*A+l*E+m*I+w*N;return n[0]=U,n[1]=P,n[2]=L,n[3]=k,n[4]=W,n[5]=v,n[6]=B,n[7]=$,n[8]=j,n[9]=X,n[10]=Z,n[11]=D,n[12]=Y,n[13]=F,n[14]=G,n[15]=H,n},et.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n[4]=t[4]+e[4],n[5]=t[5]+e[5],n[6]=t[6]+e[6],n[7]=t[7]+e[7],n[8]=t[8]+e[8],n[9]=t[9]+e[9],n[10]=t[10]+e[10],n[11]=t[11]+e[11],n[12]=t[12]+e[12],n[13]=t[13]+e[13],n[14]=t[14]+e[14],n[15]=t[15]+e[15],n},et.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n[4]=t[4]-e[4],n[5]=t[5]-e[5],n[6]=t[6]-e[6],n[7]=t[7]-e[7],n[8]=t[8]-e[8],n[9]=t[9]-e[9],n[10]=t[10]-e[10],n[11]=t[11]-e[11],n[12]=t[12]-e[12],n[13]=t[13]-e[13],n[14]=t[14]-e[14],n[15]=t[15]-e[15],n},et.multiplyTransformation=function(t,e,n){const r=t[0],i=t[1],a=t[2],u=t[4],o=t[5],s=t[6],c=t[8],l=t[9],f=t[10],d=t[12],h=t[13],m=t[14],y=e[0],p=e[1],x=e[2],w=e[4],M=e[5],g=e[6],z=e[8],C=e[9],O=e[10],b=e[12],S=e[13],q=e[14],R=r*y+u*p+c*x,_=i*y+o*p+l*x,T=a*y+s*p+f*x,V=r*w+u*M+c*g,A=i*w+o*M+l*g,E=a*w+s*M+f*g,I=r*z+u*C+c*O,N=i*z+o*C+l*O,U=a*z+s*C+f*O,P=r*b+u*S+c*q+d,L=i*b+o*S+l*q+h,k=a*b+s*S+f*q+m;return n[0]=R,n[1]=_,n[2]=T,n[3]=0,n[4]=V,n[5]=A,n[6]=E,n[7]=0,n[8]=I,n[9]=N,n[10]=U,n[11]=0,n[12]=P,n[13]=L,n[14]=k,n[15]=1,n},et.multiplyByMatrix3=function(t,e,n){const r=t[0],i=t[1],a=t[2],u=t[4],o=t[5],s=t[6],c=t[8],l=t[9],f=t[10],d=e[0],h=e[1],m=e[2],y=e[3],p=e[4],x=e[5],w=e[6],M=e[7],g=e[8],z=r*d+u*h+c*m,C=i*d+o*h+l*m,O=a*d+s*h+f*m,b=r*y+u*p+c*x,S=i*y+o*p+l*x,q=a*y+s*p+f*x,R=r*w+u*M+c*g,_=i*w+o*M+l*g,T=a*w+s*M+f*g;return n[0]=z,n[1]=C,n[2]=O,n[3]=0,n[4]=b,n[5]=S,n[6]=q,n[7]=0,n[8]=R,n[9]=_,n[10]=T,n[11]=0,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},et.multiplyByTranslation=function(t,e,n){const r=e.x,i=e.y,a=e.z,u=r*t[0]+i*t[4]+a*t[8]+t[12],o=r*t[1]+i*t[5]+a*t[9]+t[13],s=r*t[2]+i*t[6]+a*t[10]+t[14];return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=u,n[13]=o,n[14]=s,n[15]=t[15],n},et.multiplyByScale=function(t,e,n){const r=e.x,i=e.y,a=e.z;return 1===r&&1===i&&1===a?et.clone(t,n):(n[0]=r*t[0],n[1]=r*t[1],n[2]=r*t[2],n[3]=t[3],n[4]=i*t[4],n[5]=i*t[5],n[6]=i*t[6],n[7]=t[7],n[8]=a*t[8],n[9]=a*t[9],n[10]=a*t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n)},et.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3],n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7],n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},et.multiplyByVector=function(t,e,n){const r=e.x,i=e.y,a=e.z,u=e.w,o=t[0]*r+t[4]*i+t[8]*a+t[12]*u,s=t[1]*r+t[5]*i+t[9]*a+t[13]*u,c=t[2]*r+t[6]*i+t[10]*a+t[14]*u,l=t[3]*r+t[7]*i+t[11]*a+t[15]*u;return n.x=o,n.y=s,n.z=c,n.w=l,n},et.multiplyByPointAsVector=function(t,e,n){const r=e.x,i=e.y,a=e.z,u=t[0]*r+t[4]*i+t[8]*a,o=t[1]*r+t[5]*i+t[9]*a,s=t[2]*r+t[6]*i+t[10]*a;return n.x=u,n.y=o,n.z=s,n},et.multiplyByPoint=function(t,e,n){const r=e.x,i=e.y,a=e.z,u=t[0]*r+t[4]*i+t[8]*a+t[12],o=t[1]*r+t[5]*i+t[9]*a+t[13],s=t[2]*r+t[6]*i+t[10]*a+t[14];return n.x=u,n.y=o,n.z=s,n},et.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11]*e,n[12]=t[12]*e,n[13]=t[13]*e,n[14]=t[14]*e,n[15]=t[15]*e,n},et.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e},et.transpose=function(t,e){const n=t[1],r=t[2],i=t[3],a=t[6],u=t[7],o=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[10]=t[10],e[11]=t[14],e[12]=i,e[13]=u,e[14]=o,e[15]=t[15],e},et.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e[9]=Math.abs(t[9]),e[10]=Math.abs(t[10]),e[11]=Math.abs(t[11]),e[12]=Math.abs(t[12]),e[13]=Math.abs(t[13]),e[14]=Math.abs(t[14]),e[15]=Math.abs(t[15]),e},et.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[3]===e[3]&&t[7]===e[7]&&t[11]===e[11]&&t[15]===e[15]},et.equalsEpsilon=function(t,e,r){return r=n.defaultValue(r,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=r&&Math.abs(t[1]-e[1])<=r&&Math.abs(t[2]-e[2])<=r&&Math.abs(t[3]-e[3])<=r&&Math.abs(t[4]-e[4])<=r&&Math.abs(t[5]-e[5])<=r&&Math.abs(t[6]-e[6])<=r&&Math.abs(t[7]-e[7])<=r&&Math.abs(t[8]-e[8])<=r&&Math.abs(t[9]-e[9])<=r&&Math.abs(t[10]-e[10])<=r&&Math.abs(t[11]-e[11])<=r&&Math.abs(t[12]-e[12])<=r&&Math.abs(t[13]-e[13])<=r&&Math.abs(t[14]-e[14])<=r&&Math.abs(t[15]-e[15])<=r},et.getTranslation=function(t,e){return e.x=t[12],e.y=t[13],e.z=t[14],e},et.getMatrix3=function(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e};const ft=new I,dt=new I,ht=new Y,mt=new Y(0,0,0,1);et.inverse=function(t,n){const i=t[0],a=t[4],u=t[8],o=t[12],s=t[1],c=t[5],l=t[9],f=t[13],d=t[2],h=t[6],m=t[10],y=t[14],p=t[3],x=t[7],w=t[11],M=t[15];let g=m*M,z=y*w,C=h*M,O=y*x,b=h*w,S=m*x,q=d*M,R=y*p,_=d*w,T=m*p,V=d*x,A=h*p;const E=g*c+O*l+b*f-(z*c+C*l+S*f),N=z*s+q*l+T*f-(g*s+R*l+_*f),U=C*s+R*c+V*f-(O*s+q*c+A*f),P=S*s+_*c+A*l-(b*s+T*c+V*l),L=z*a+C*u+S*o-(g*a+O*u+b*o),k=g*i+R*u+_*o-(z*i+q*u+T*o),W=O*i+q*a+A*o-(C*i+R*a+V*o),v=b*i+T*a+V*u-(S*i+_*a+A*u);g=u*f,z=o*l,C=a*f,O=o*c,b=a*l,S=u*c,q=i*f,R=o*s,_=i*l,T=u*s,V=i*c,A=a*s;const B=g*x+O*w+b*M-(z*x+C*w+S*M),$=z*p+q*w+T*M-(g*p+R*w+_*M),j=C*p+R*x+V*M-(O*p+q*x+A*M),X=S*p+_*x+A*w-(b*p+T*x+V*w),Z=C*m+S*y+z*h-(b*y+g*h+O*m),D=_*y+g*d+R*m-(q*m+T*y+z*d),F=q*h+A*y+O*d-(V*y+C*d+R*h),G=V*m+b*d+T*h-(_*h+A*m+S*d);let H=i*E+a*N+u*U+o*P;if(Math.abs(H)<r.CesiumMath.EPSILON21){if(I.equalsEpsilon(et.getMatrix3(t,ft),dt,r.CesiumMath.EPSILON7)&&Y.equals(et.getRow(t,3,ht),mt))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new e.RuntimeError("matrix is not invertible because its determinate is zero.")}return H=1/H,n[0]=E*H,n[1]=N*H,n[2]=U*H,n[3]=P*H,n[4]=L*H,n[5]=k*H,n[6]=W*H,n[7]=v*H,n[8]=B*H,n[9]=$*H,n[10]=j*H,n[11]=X*H,n[12]=Z*H,n[13]=D*H,n[14]=F*H,n[15]=G*H,n},et.inverseTransformation=function(t,e){const n=t[0],r=t[1],i=t[2],a=t[4],u=t[5],o=t[6],s=t[8],c=t[9],l=t[10],f=t[12],d=t[13],h=t[14],m=-n*f-r*d-i*h,y=-a*f-u*d-o*h,p=-s*f-c*d-l*h;return e[0]=n,e[1]=a,e[2]=s,e[3]=0,e[4]=r,e[5]=u,e[6]=c,e[7]=0,e[8]=i,e[9]=o,e[10]=l,e[11]=0,e[12]=m,e[13]=y,e[14]=p,e[15]=1,e};const yt=new et;function pt(t,e,r,i){this.west=n.defaultValue(t,0),this.south=n.defaultValue(e,0),this.east=n.defaultValue(r,0),this.north=n.defaultValue(i,0)}et.inverseTranspose=function(t,e){return et.inverse(et.transpose(t,yt),e)},et.IDENTITY=Object.freeze(new et(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),et.ZERO=Object.freeze(new et(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),et.COLUMN0ROW0=0,et.COLUMN0ROW1=1,et.COLUMN0ROW2=2,et.COLUMN0ROW3=3,et.COLUMN1ROW0=4,et.COLUMN1ROW1=5,et.COLUMN1ROW2=6,et.COLUMN1ROW3=7,et.COLUMN2ROW0=8,et.COLUMN2ROW1=9,et.COLUMN2ROW2=10,et.COLUMN2ROW3=11,et.COLUMN3ROW0=12,et.COLUMN3ROW1=13,et.COLUMN3ROW2=14,et.COLUMN3ROW3=15,Object.defineProperties(et.prototype,{length:{get:function(){return et.packedLength}}}),et.prototype.clone=function(t){return et.clone(this,t)},et.prototype.equals=function(t){return et.equals(this,t)},et.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]&&t[4]===e[n+4]&&t[5]===e[n+5]&&t[6]===e[n+6]&&t[7]===e[n+7]&&t[8]===e[n+8]&&t[9]===e[n+9]&&t[10]===e[n+10]&&t[11]===e[n+11]&&t[12]===e[n+12]&&t[13]===e[n+13]&&t[14]===e[n+14]&&t[15]===e[n+15]},et.prototype.equalsEpsilon=function(t,e){return et.equalsEpsilon(this,t,e)},et.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`},Object.defineProperties(pt.prototype,{width:{get:function(){return pt.computeWidth(this)}},height:{get:function(){return pt.computeHeight(this)}}}),pt.packedLength=4,pt.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t.west,e[r++]=t.south,e[r++]=t.east,e[r]=t.north,e},pt.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new pt),r.west=t[e++],r.south=t[e++],r.east=t[e++],r.north=t[e],r},pt.computeWidth=function(t){let e=t.east;const n=t.west;return e<n&&(e+=r.CesiumMath.TWO_PI),e-n},pt.computeHeight=function(t){return t.north-t.south},pt.fromDegrees=function(t,e,i,a,u){return t=r.CesiumMath.toRadians(n.defaultValue(t,0)),e=r.CesiumMath.toRadians(n.defaultValue(e,0)),i=r.CesiumMath.toRadians(n.defaultValue(i,0)),a=r.CesiumMath.toRadians(n.defaultValue(a,0)),n.defined(u)?(u.west=t,u.south=e,u.east=i,u.north=a,u):new pt(t,e,i,a)},pt.fromRadians=function(t,e,r,i,a){return n.defined(a)?(a.west=n.defaultValue(t,0),a.south=n.defaultValue(e,0),a.east=n.defaultValue(r,0),a.north=n.defaultValue(i,0),a):new pt(t,e,r,i)},pt.fromCartographicArray=function(t,e){let i=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let e=0,n=t.length;e<n;e++){const n=t[e];i=Math.min(i,n.longitude),a=Math.max(a,n.longitude),s=Math.min(s,n.latitude),c=Math.max(c,n.latitude);const l=n.longitude>=0?n.longitude:n.longitude+r.CesiumMath.TWO_PI;u=Math.min(u,l),o=Math.max(o,l)}return a-i>o-u&&(i=u,a=o,a>r.CesiumMath.PI&&(a-=r.CesiumMath.TWO_PI),i>r.CesiumMath.PI&&(i-=r.CesiumMath.TWO_PI)),n.defined(e)?(e.west=i,e.south=s,e.east=a,e.north=c,e):new pt(i,s,a,c)},pt.fromCartesianArray=function(t,e,i){e=n.defaultValue(e,b.WGS84);let a=Number.MAX_VALUE,u=-Number.MAX_VALUE,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,c=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let n=0,i=t.length;n<i;n++){const i=e.cartesianToCartographic(t[n]);a=Math.min(a,i.longitude),u=Math.max(u,i.longitude),c=Math.min(c,i.latitude),l=Math.max(l,i.latitude);const f=i.longitude>=0?i.longitude:i.longitude+r.CesiumMath.TWO_PI;o=Math.min(o,f),s=Math.max(s,f)}return u-a>s-o&&(a=o,u=s,u>r.CesiumMath.PI&&(u-=r.CesiumMath.TWO_PI),a>r.CesiumMath.PI&&(a-=r.CesiumMath.TWO_PI)),n.defined(i)?(i.west=a,i.south=c,i.east=u,i.north=l,i):new pt(a,c,u,l)},pt.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new pt(t.west,t.south,t.east,t.north)},pt.equalsEpsilon=function(t,e,r){return r=n.defaultValue(r,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t.west-e.west)<=r&&Math.abs(t.south-e.south)<=r&&Math.abs(t.east-e.east)<=r&&Math.abs(t.north-e.north)<=r},pt.prototype.clone=function(t){return pt.clone(this,t)},pt.prototype.equals=function(t){return pt.equals(this,t)},pt.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},pt.prototype.equalsEpsilon=function(t,e){return pt.equalsEpsilon(this,t,e)},pt.validate=function(t){},pt.southwest=function(t,e){return n.defined(e)?(e.longitude=t.west,e.latitude=t.south,e.height=0,e):new p(t.west,t.south)},pt.northwest=function(t,e){return n.defined(e)?(e.longitude=t.west,e.latitude=t.north,e.height=0,e):new p(t.west,t.north)},pt.northeast=function(t,e){return n.defined(e)?(e.longitude=t.east,e.latitude=t.north,e.height=0,e):new p(t.east,t.north)},pt.southeast=function(t,e){return n.defined(e)?(e.longitude=t.east,e.latitude=t.south,e.height=0,e):new p(t.east,t.south)},pt.center=function(t,e){let i=t.east;const a=t.west;i<a&&(i+=r.CesiumMath.TWO_PI);const u=r.CesiumMath.negativePiToPi(.5*(a+i)),o=.5*(t.south+t.north);return n.defined(e)?(e.longitude=u,e.latitude=o,e.height=0,e):new p(u,o)},pt.intersection=function(t,e,i){let a=t.east,u=t.west,o=e.east,s=e.west;a<u&&o>0?a+=r.CesiumMath.TWO_PI:o<s&&a>0&&(o+=r.CesiumMath.TWO_PI),a<u&&s<0?s+=r.CesiumMath.TWO_PI:o<s&&u<0&&(u+=r.CesiumMath.TWO_PI);const c=r.CesiumMath.negativePiToPi(Math.max(u,s)),l=r.CesiumMath.negativePiToPi(Math.min(a,o));if((t.west<t.east||e.west<e.east)&&l<=c)return;const f=Math.max(t.south,e.south),d=Math.min(t.north,e.north);return f>=d?void 0:n.defined(i)?(i.west=c,i.south=f,i.east=l,i.north=d,i):new pt(c,f,l,d)},pt.simpleIntersection=function(t,e,r){const i=Math.max(t.west,e.west),a=Math.max(t.south,e.south),u=Math.min(t.east,e.east),o=Math.min(t.north,e.north);if(!(a>=o||i>=u))return n.defined(r)?(r.west=i,r.south=a,r.east=u,r.north=o,r):new pt(i,a,u,o)},pt.union=function(t,e,i){n.defined(i)||(i=new pt);let a=t.east,u=t.west,o=e.east,s=e.west;a<u&&o>0?a+=r.CesiumMath.TWO_PI:o<s&&a>0&&(o+=r.CesiumMath.TWO_PI),a<u&&s<0?s+=r.CesiumMath.TWO_PI:o<s&&u<0&&(u+=r.CesiumMath.TWO_PI);const c=r.CesiumMath.negativePiToPi(Math.min(u,s)),l=r.CesiumMath.negativePiToPi(Math.max(a,o));return i.west=c,i.south=Math.min(t.south,e.south),i.east=l,i.north=Math.max(t.north,e.north),i},pt.expand=function(t,e,r){return n.defined(r)||(r=new pt),r.west=Math.min(t.west,e.longitude),r.south=Math.min(t.south,e.latitude),r.east=Math.max(t.east,e.longitude),r.north=Math.max(t.north,e.latitude),r},pt.contains=function(t,e){let n=e.longitude;const i=e.latitude,a=t.west;let u=t.east;return u<a&&(u+=r.CesiumMath.TWO_PI,n<0&&(n+=r.CesiumMath.TWO_PI)),(n>a||r.CesiumMath.equalsEpsilon(n,a,r.CesiumMath.EPSILON14))&&(n<u||r.CesiumMath.equalsEpsilon(n,u,r.CesiumMath.EPSILON14))&&i>=t.south&&i<=t.north};const xt=new p;function wt(t,e){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0)}pt.subsample=function(t,e,i,a){e=n.defaultValue(e,b.WGS84),i=n.defaultValue(i,0),n.defined(a)||(a=[]);let u=0;const o=t.north,s=t.south,c=t.east,l=t.west,f=xt;f.height=i,f.longitude=l,f.latitude=o,a[u]=e.cartographicToCartesian(f,a[u]),u++,f.longitude=c,a[u]=e.cartographicToCartesian(f,a[u]),u++,f.latitude=s,a[u]=e.cartographicToCartesian(f,a[u]),u++,f.longitude=l,a[u]=e.cartographicToCartesian(f,a[u]),u++,f.latitude=o<0?o:s>0?s:0;for(let n=1;n<8;++n)f.longitude=-Math.PI+n*r.CesiumMath.PI_OVER_TWO,pt.contains(t,f)&&(a[u]=e.cartographicToCartesian(f,a[u]),u++);return 0===f.latitude&&(f.longitude=l,a[u]=e.cartographicToCartesian(f,a[u]),u++,f.longitude=c,a[u]=e.cartographicToCartesian(f,a[u]),u++),a.length=u,a},pt.subsection=function(t,e,i,a,u,o){if(n.defined(o)||(o=new pt),t.west<=t.east){const n=t.east-t.west;o.west=t.west+e*n,o.east=t.west+a*n}else{const n=r.CesiumMath.TWO_PI+t.east-t.west;o.west=r.CesiumMath.negativePiToPi(t.west+e*n),o.east=r.CesiumMath.negativePiToPi(t.west+a*n)}const s=t.north-t.south;return o.south=t.south+i*s,o.north=t.south+u*s,1===e&&(o.west=t.east),1===a&&(o.east=t.east),1===i&&(o.south=t.north),1===u&&(o.north=t.north),o},pt.MAX_VALUE=Object.freeze(new pt(-Math.PI,-r.CesiumMath.PI_OVER_TWO,Math.PI,r.CesiumMath.PI_OVER_TWO)),wt.fromElements=function(t,e,r){return n.defined(r)?(r.x=t,r.y=e,r):new wt(t,e)},wt.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e):new wt(t.x,t.y)},wt.fromCartesian3=wt.clone,wt.fromCartesian4=wt.clone,wt.packedLength=2,wt.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t.x,e[r]=t.y,e},wt.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new wt),r.x=t[e++],r.y=t[e],r},wt.packArray=function(t,e){const r=t.length,i=2*r;n.defined(e)?(Array.isArray(e)||e.length===i)&&e.length!==i&&(e.length=i):e=new Array(i);for(let n=0;n<r;++n)wt.pack(t[n],e,2*n);return e},wt.unpackArray=function(t,e){const r=t.length;n.defined(e)?e.length=r/2:e=new Array(r/2);for(let n=0;n<r;n+=2){const r=n/2;e[r]=wt.unpack(t,n,e[r])}return e},wt.fromArray=wt.unpack,wt.maximumComponent=function(t){return Math.max(t.x,t.y)},wt.minimumComponent=function(t){return Math.min(t.x,t.y)},wt.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n},wt.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n},wt.clamp=function(t,e,n,i){const a=r.CesiumMath.clamp(t.x,e.x,n.x),u=r.CesiumMath.clamp(t.y,e.y,n.y);return i.x=a,i.y=u,i},wt.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},wt.magnitude=function(t){return Math.sqrt(wt.magnitudeSquared(t))};const Mt=new wt;wt.distance=function(t,e){return wt.subtract(t,e,Mt),wt.magnitude(Mt)},wt.distanceSquared=function(t,e){return wt.subtract(t,e,Mt),wt.magnitudeSquared(Mt)},wt.normalize=function(t,e){const n=wt.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e},wt.dot=function(t,e){return t.x*e.x+t.y*e.y},wt.cross=function(t,e){return t.x*e.y-t.y*e.x},wt.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n},wt.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n},wt.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n},wt.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n},wt.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n},wt.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n},wt.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e},wt.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e};const gt=new wt;wt.lerp=function(t,e,n,r){return wt.multiplyByScalar(e,n,gt),r=wt.multiplyByScalar(t,1-n,r),wt.add(gt,r,r)};const zt=new wt,Ct=new wt;wt.angleBetween=function(t,e){return wt.normalize(t,zt),wt.normalize(e,Ct),r.CesiumMath.acosClamped(wt.dot(zt,Ct))};const Ot=new wt;function bt(t,e,r,i){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(r,0),this[2]=n.defaultValue(e,0),this[3]=n.defaultValue(i,0)}wt.mostOrthogonalAxis=function(t,e){const n=wt.normalize(t,Ot);return wt.abs(n,n),e=n.x<=n.y?wt.clone(wt.UNIT_X,e):wt.clone(wt.UNIT_Y,e)},wt.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y},wt.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]},wt.equalsEpsilon=function(t,e,i,a){return t===e||n.defined(t)&&n.defined(e)&&r.CesiumMath.equalsEpsilon(t.x,e.x,i,a)&&r.CesiumMath.equalsEpsilon(t.y,e.y,i,a)},wt.ZERO=Object.freeze(new wt(0,0)),wt.ONE=Object.freeze(new wt(1,1)),wt.UNIT_X=Object.freeze(new wt(1,0)),wt.UNIT_Y=Object.freeze(new wt(0,1)),wt.prototype.clone=function(t){return wt.clone(this,t)},wt.prototype.equals=function(t){return wt.equals(this,t)},wt.prototype.equalsEpsilon=function(t,e,n){return wt.equalsEpsilon(this,t,e,n)},wt.prototype.toString=function(){return`(${this.x}, ${this.y})`},bt.packedLength=4,bt.pack=function(t,e,r){return r=n.defaultValue(r,0),e[r++]=t[0],e[r++]=t[1],e[r++]=t[2],e[r++]=t[3],e},bt.unpack=function(t,e,r){return e=n.defaultValue(e,0),n.defined(r)||(r=new bt),r[0]=t[e++],r[1]=t[e++],r[2]=t[e++],r[3]=t[e++],r},bt.packArray=function(t,e){const r=t.length,i=4*r;n.defined(e)?(Array.isArray(e)||e.length===i)&&e.length!==i&&(e.length=i):e=new Array(i);for(let n=0;n<r;++n)bt.pack(t[n],e,4*n);return e},bt.unpackArray=function(t,e){const r=t.length;n.defined(e)?e.length=r/4:e=new Array(r/4);for(let n=0;n<r;n+=4){const r=n/4;e[r]=bt.unpack(t,n,e[r])}return e},bt.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):new bt(t[0],t[2],t[1],t[3])},bt.fromArray=bt.unpack,bt.fromColumnMajorArray=function(t,e){return bt.clone(t,e)},bt.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3],e):new bt(t[0],t[1],t[2],t[3])},bt.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=t.y,e):new bt(t.x,0,0,t.y)},bt.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=t,e):new bt(t,0,0,t)},bt.fromRotation=function(t,e){const r=Math.cos(t),i=Math.sin(t);return n.defined(e)?(e[0]=r,e[1]=i,e[2]=-i,e[3]=r,e):new bt(r,-i,i,r)},bt.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):[t[0],t[1],t[2],t[3]]},bt.getElementIndex=function(t,e){return 2*t+e},bt.getColumn=function(t,e,n){const r=2*e,i=t[r],a=t[r+1];return n.x=i,n.y=a,n},bt.setColumn=function(t,e,n,r){const i=2*e;return(r=bt.clone(t,r))[i]=n.x,r[i+1]=n.y,r},bt.getRow=function(t,e,n){const r=t[e],i=t[e+2];return n.x=r,n.y=i,n},bt.setRow=function(t,e,n,r){return(r=bt.clone(t,r))[e]=n.x,r[e+2]=n.y,r};const St=new wt;bt.setScale=function(t,e,n){const r=bt.getScale(t,St),i=e.x/r.x,a=e.y/r.y;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*a,n[3]=t[3]*a,n};const qt=new wt;bt.setUniformScale=function(t,e,n){const r=bt.getScale(t,qt),i=e/r.x,a=e/r.y;return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*a,n[3]=t[3]*a,n};const Rt=new wt;bt.getScale=function(t,e){return e.x=wt.magnitude(wt.fromElements(t[0],t[1],Rt)),e.y=wt.magnitude(wt.fromElements(t[2],t[3],Rt)),e};const _t=new wt;bt.getMaximumScale=function(t){return bt.getScale(t,_t),wt.maximumComponent(_t)};const Tt=new wt;bt.setRotation=function(t,e,n){const r=bt.getScale(t,Tt);return n[0]=e[0]*r.x,n[1]=e[1]*r.x,n[2]=e[2]*r.y,n[3]=e[3]*r.y,n};const Vt=new wt;bt.getRotation=function(t,e){const n=bt.getScale(t,Vt);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.y,e[3]=t[3]/n.y,e},bt.multiply=function(t,e,n){const r=t[0]*e[0]+t[2]*e[1],i=t[0]*e[2]+t[2]*e[3],a=t[1]*e[0]+t[3]*e[1],u=t[1]*e[2]+t[3]*e[3];return n[0]=r,n[1]=a,n[2]=i,n[3]=u,n},bt.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n},bt.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n},bt.multiplyByVector=function(t,e,n){const r=t[0]*e.x+t[2]*e.y,i=t[1]*e.x+t[3]*e.y;return n.x=r,n.y=i,n},bt.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},bt.multiplyByScale=function(t,e,n){return n[0]=t[0]*e.x,n[1]=t[1]*e.x,n[2]=t[2]*e.y,n[3]=t[3]*e.y,n},bt.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},bt.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},bt.transpose=function(t,e){const n=t[0],r=t[2],i=t[1],a=t[3];return e[0]=n,e[1]=r,e[2]=i,e[3]=a,e},bt.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e},bt.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},bt.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]},bt.equalsEpsilon=function(t,e,r){return r=n.defaultValue(r,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=r&&Math.abs(t[1]-e[1])<=r&&Math.abs(t[2]-e[2])<=r&&Math.abs(t[3]-e[3])<=r},bt.IDENTITY=Object.freeze(new bt(1,0,0,1)),bt.ZERO=Object.freeze(new bt(0,0,0,0)),bt.COLUMN0ROW0=0,bt.COLUMN0ROW1=1,bt.COLUMN1ROW0=2,bt.COLUMN1ROW1=3,Object.defineProperties(bt.prototype,{length:{get:function(){return bt.packedLength}}}),bt.prototype.clone=function(t){return bt.clone(this,t)},bt.prototype.equals=function(t){return bt.equals(this,t)},bt.prototype.equalsEpsilon=function(t,e){return bt.equalsEpsilon(this,t,e)},bt.prototype.toString=function(){return`(${this[0]}, ${this[2]})\n(${this[1]}, ${this[3]})`},t.Cartesian2=wt,t.Cartesian3=i,t.Cartesian4=Y,t.Cartographic=p,t.Ellipsoid=b,t.Matrix2=bt,t.Matrix3=I,t.Matrix4=et,t.Rectangle=pt}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix3-81054f0f","./defaultValue-f6d5e6da","./Math-2ce22ee9","./RuntimeError-9b4ce3fb"],(function(t,e,n,a,u){"use strict";function r(t,e,a,u){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0),this.z=n.defaultValue(a,0),this.w=n.defaultValue(u,0)}r.fromElements=function(t,e,a,u,i){return n.defined(i)?(i.x=t,i.y=e,i.z=a,i.w=u,i):new r(t,e,a,u)},r.fromColor=function(t,e){return n.defined(e)?(e.x=t.red,e.y=t.green,e.z=t.blue,e.w=t.alpha,e):new r(t.red,t.green,t.blue,t.alpha)},r.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e):new r(t.x,t.y,t.z,t.w)},r.packedLength=4,r.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t.x,e[a++]=t.y,e[a++]=t.z,e[a]=t.w,e},r.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new r),a.x=t[e++],a.y=t[e++],a.z=t[e++],a.w=t[e],a},r.packArray=function(t,e){const a=t.length,u=4*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)r.pack(t[n],e,4*n);return e},r.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/4:e=new Array(a/4);for(let n=0;n<a;n+=4){const a=n/4;e[a]=r.unpack(t,n,e[a])}return e},r.fromArray=r.unpack,r.maximumComponent=function(t){return Math.max(t.x,t.y,t.z,t.w)},r.minimumComponent=function(t){return Math.min(t.x,t.y,t.z,t.w)},r.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n.z=Math.min(t.z,e.z),n.w=Math.min(t.w,e.w),n},r.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n.z=Math.max(t.z,e.z),n.w=Math.max(t.w,e.w),n},r.clamp=function(t,e,n,u){const r=a.CesiumMath.clamp(t.x,e.x,n.x),i=a.CesiumMath.clamp(t.y,e.y,n.y),o=a.CesiumMath.clamp(t.z,e.z,n.z),s=a.CesiumMath.clamp(t.w,e.w,n.w);return u.x=r,u.y=i,u.z=o,u.w=s,u},r.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},r.magnitude=function(t){return Math.sqrt(r.magnitudeSquared(t))};const i=new r;r.distance=function(t,e){return r.subtract(t,e,i),r.magnitude(i)},r.distanceSquared=function(t,e){return r.subtract(t,e,i),r.magnitudeSquared(i)},r.normalize=function(t,e){const n=r.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},r.dot=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w},r.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n.z=t.z*e.z,n.w=t.w*e.w,n},r.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n.z=t.z/e.z,n.w=t.w/e.w,n},r.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n.w=t.w+e.w,n},r.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n.w=t.w-e.w,n},r.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n.z=t.z*e,n.w=t.w*e,n},r.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,n},r.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e.z=-t.z,e.w=-t.w,e},r.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e.z=Math.abs(t.z),e.w=Math.abs(t.w),e};const o=new r;r.lerp=function(t,e,n,a){return r.multiplyByScalar(e,n,o),a=r.multiplyByScalar(t,1-n,a),r.add(o,a,a)};const s=new r;r.mostOrthogonalAxis=function(t,e){const n=r.normalize(t,s);return r.abs(n,n),e=n.x<=n.y?n.x<=n.z?n.x<=n.w?r.clone(r.UNIT_X,e):r.clone(r.UNIT_W,e):n.z<=n.w?r.clone(r.UNIT_Z,e):r.clone(r.UNIT_W,e):n.y<=n.z?n.y<=n.w?r.clone(r.UNIT_Y,e):r.clone(r.UNIT_W,e):n.z<=n.w?r.clone(r.UNIT_Z,e):r.clone(r.UNIT_W,e)},r.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y&&t.z===e.z&&t.w===e.w},r.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]&&t.z===e[n+2]&&t.w===e[n+3]},r.equalsEpsilon=function(t,e,u,r){return t===e||n.defined(t)&&n.defined(e)&&a.CesiumMath.equalsEpsilon(t.x,e.x,u,r)&&a.CesiumMath.equalsEpsilon(t.y,e.y,u,r)&&a.CesiumMath.equalsEpsilon(t.z,e.z,u,r)&&a.CesiumMath.equalsEpsilon(t.w,e.w,u,r)},r.ZERO=Object.freeze(new r(0,0,0,0)),r.ONE=Object.freeze(new r(1,1,1,1)),r.UNIT_X=Object.freeze(new r(1,0,0,0)),r.UNIT_Y=Object.freeze(new r(0,1,0,0)),r.UNIT_Z=Object.freeze(new r(0,0,1,0)),r.UNIT_W=Object.freeze(new r(0,0,0,1)),r.prototype.clone=function(t){return r.clone(this,t)},r.prototype.equals=function(t){return r.equals(this,t)},r.prototype.equalsEpsilon=function(t,e,n){return r.equalsEpsilon(this,t,e,n)},r.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const c=new Float32Array(1),l=new Uint8Array(c.buffer),f=new Uint32Array([287454020]),h=68===new Uint8Array(f.buffer)[0];function d(t,e,a,u,r,i,o,s,c,l,f,h,d,m,y,w){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(r,0),this[2]=n.defaultValue(c,0),this[3]=n.defaultValue(d,0),this[4]=n.defaultValue(e,0),this[5]=n.defaultValue(i,0),this[6]=n.defaultValue(l,0),this[7]=n.defaultValue(m,0),this[8]=n.defaultValue(a,0),this[9]=n.defaultValue(o,0),this[10]=n.defaultValue(f,0),this[11]=n.defaultValue(y,0),this[12]=n.defaultValue(u,0),this[13]=n.defaultValue(s,0),this[14]=n.defaultValue(h,0),this[15]=n.defaultValue(w,0)}r.packFloat=function(t,e){return n.defined(e)||(e=new r),c[0]=t,h?(e.x=l[0],e.y=l[1],e.z=l[2],e.w=l[3]):(e.x=l[3],e.y=l[2],e.z=l[1],e.w=l[0]),e},r.unpackFloat=function(t){return h?(l[0]=t.x,l[1]=t.y,l[2]=t.z,l[3]=t.w):(l[0]=t.w,l[1]=t.z,l[2]=t.y,l[3]=t.x),c[0]},d.packedLength=16,d.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t[0],e[a++]=t[1],e[a++]=t[2],e[a++]=t[3],e[a++]=t[4],e[a++]=t[5],e[a++]=t[6],e[a++]=t[7],e[a++]=t[8],e[a++]=t[9],e[a++]=t[10],e[a++]=t[11],e[a++]=t[12],e[a++]=t[13],e[a++]=t[14],e[a]=t[15],e},d.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new d),a[0]=t[e++],a[1]=t[e++],a[2]=t[e++],a[3]=t[e++],a[4]=t[e++],a[5]=t[e++],a[6]=t[e++],a[7]=t[e++],a[8]=t[e++],a[9]=t[e++],a[10]=t[e++],a[11]=t[e++],a[12]=t[e++],a[13]=t[e++],a[14]=t[e++],a[15]=t[e],a},d.packArray=function(t,e){const a=t.length,u=16*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)d.pack(t[n],e,16*n);return e},d.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/16:e=new Array(a/16);for(let n=0;n<a;n+=16){const a=n/16;e[a]=d.unpack(t,n,e[a])}return e},d.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):new d(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])},d.fromArray=d.unpack,d.fromColumnMajorArray=function(t,e){return d.clone(t,e)},d.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15],e):new d(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},d.fromRotationTranslation=function(t,a,u){return a=n.defaultValue(a,e.Cartesian3.ZERO),n.defined(u)?(u[0]=t[0],u[1]=t[1],u[2]=t[2],u[3]=0,u[4]=t[3],u[5]=t[4],u[6]=t[5],u[7]=0,u[8]=t[6],u[9]=t[7],u[10]=t[8],u[11]=0,u[12]=a.x,u[13]=a.y,u[14]=a.z,u[15]=1,u):new d(t[0],t[3],t[6],a.x,t[1],t[4],t[7],a.y,t[2],t[5],t[8],a.z,0,0,0,1)},d.fromTranslationQuaternionRotationScale=function(t,e,a,u){n.defined(u)||(u=new d);const r=a.x,i=a.y,o=a.z,s=e.x*e.x,c=e.x*e.y,l=e.x*e.z,f=e.x*e.w,h=e.y*e.y,m=e.y*e.z,y=e.y*e.w,w=e.z*e.z,x=e.z*e.w,M=e.w*e.w,p=s-h-w+M,g=2*(c-x),C=2*(l+y),z=2*(c+x),b=-s+h-w+M,O=2*(m-f),V=2*(l-y),T=2*(m+f),A=-s-h+w+M;return u[0]=p*r,u[1]=z*r,u[2]=V*r,u[3]=0,u[4]=g*i,u[5]=b*i,u[6]=T*i,u[7]=0,u[8]=C*o,u[9]=O*o,u[10]=A*o,u[11]=0,u[12]=t.x,u[13]=t.y,u[14]=t.z,u[15]=1,u},d.fromTranslationRotationScale=function(t,e){return d.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,e)},d.fromTranslation=function(t,n){return d.fromRotationTranslation(e.Matrix3.IDENTITY,t,n)},d.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t.y,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t.z,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new d(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},d.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e):new d(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)},d.fromRotation=function(t,e){return n.defined(e)||(e=new d),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e};const m=new e.Cartesian3,y=new e.Cartesian3,w=new e.Cartesian3;d.fromCamera=function(t,a){const u=t.position,r=t.direction,i=t.up;e.Cartesian3.normalize(r,m),e.Cartesian3.normalize(e.Cartesian3.cross(m,i,y),y),e.Cartesian3.normalize(e.Cartesian3.cross(y,m,w),w);const o=y.x,s=y.y,c=y.z,l=m.x,f=m.y,h=m.z,x=w.x,M=w.y,p=w.z,g=u.x,C=u.y,z=u.z,b=o*-g+s*-C+c*-z,O=x*-g+M*-C+p*-z,V=l*g+f*C+h*z;return n.defined(a)?(a[0]=o,a[1]=x,a[2]=-l,a[3]=0,a[4]=s,a[5]=M,a[6]=-f,a[7]=0,a[8]=c,a[9]=p,a[10]=-h,a[11]=0,a[12]=b,a[13]=O,a[14]=V,a[15]=1,a):new d(o,s,c,b,x,M,p,O,-l,-f,-h,V,0,0,0,1)},d.computePerspectiveFieldOfView=function(t,e,n,a,u){const r=1/Math.tan(.5*t),i=r/e,o=(a+n)/(n-a),s=2*a*n/(n-a);return u[0]=i,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=r,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=o,u[11]=-1,u[12]=0,u[13]=0,u[14]=s,u[15]=0,u},d.computeOrthographicOffCenter=function(t,e,n,a,u,r,i){let o=1/(e-t),s=1/(a-n),c=1/(r-u);const l=-(e+t)*o,f=-(a+n)*s,h=-(r+u)*c;return o*=2,s*=2,c*=-2,i[0]=o,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=s,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=c,i[11]=0,i[12]=l,i[13]=f,i[14]=h,i[15]=1,i},d.computePerspectiveOffCenter=function(t,e,n,a,u,r,i){const o=2*u/(e-t),s=2*u/(a-n),c=(e+t)/(e-t),l=(a+n)/(a-n),f=-(r+u)/(r-u),h=-2*r*u/(r-u);return i[0]=o,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=s,i[6]=0,i[7]=0,i[8]=c,i[9]=l,i[10]=f,i[11]=-1,i[12]=0,i[13]=0,i[14]=h,i[15]=0,i},d.computeInfinitePerspectiveOffCenter=function(t,e,n,a,u,r){const i=2*u/(e-t),o=2*u/(a-n),s=(e+t)/(e-t),c=(a+n)/(a-n),l=-2*u;return r[0]=i,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=o,r[6]=0,r[7]=0,r[8]=s,r[9]=c,r[10]=-1,r[11]=-1,r[12]=0,r[13]=0,r[14]=l,r[15]=0,r},d.computeViewportTransformation=function(t,e,a,u){n.defined(u)||(u=new d),t=n.defaultValue(t,n.defaultValue.EMPTY_OBJECT);const r=n.defaultValue(t.x,0),i=n.defaultValue(t.y,0),o=n.defaultValue(t.width,0),s=n.defaultValue(t.height,0);e=n.defaultValue(e,0);const c=.5*o,l=.5*s,f=.5*((a=n.defaultValue(a,1))-e),h=c,m=l,y=f,w=r+c,x=i+l,M=e+f;return u[0]=h,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=m,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=y,u[11]=0,u[12]=w,u[13]=x,u[14]=M,u[15]=1,u},d.computeView=function(t,n,a,u,r){return r[0]=u.x,r[1]=a.x,r[2]=-n.x,r[3]=0,r[4]=u.y,r[5]=a.y,r[6]=-n.y,r[7]=0,r[8]=u.z,r[9]=a.z,r[10]=-n.z,r[11]=0,r[12]=-e.Cartesian3.dot(u,t),r[13]=-e.Cartesian3.dot(a,t),r[14]=e.Cartesian3.dot(n,t),r[15]=1,r},d.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},d.getElementIndex=function(t,e){return 4*t+e},d.getColumn=function(t,e,n){const a=4*e,u=t[a],r=t[a+1],i=t[a+2],o=t[a+3];return n.x=u,n.y=r,n.z=i,n.w=o,n},d.setColumn=function(t,e,n,a){const u=4*e;return(a=d.clone(t,a))[u]=n.x,a[u+1]=n.y,a[u+2]=n.z,a[u+3]=n.w,a},d.getRow=function(t,e,n){const a=t[e],u=t[e+4],r=t[e+8],i=t[e+12];return n.x=a,n.y=u,n.z=r,n.w=i,n},d.setRow=function(t,e,n,a){return(a=d.clone(t,a))[e]=n.x,a[e+4]=n.y,a[e+8]=n.z,a[e+12]=n.w,a},d.setTranslation=function(t,e,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=t[15],n};const x=new e.Cartesian3;d.setScale=function(t,e,n){const a=d.getScale(t,x),u=e.x/a.x,r=e.y/a.y,i=e.z/a.z;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*u,n[3]=t[3],n[4]=t[4]*r,n[5]=t[5]*r,n[6]=t[6]*r,n[7]=t[7],n[8]=t[8]*i,n[9]=t[9]*i,n[10]=t[10]*i,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const M=new e.Cartesian3;d.setUniformScale=function(t,e,n){const a=d.getScale(t,M),u=e/a.x,r=e/a.y,i=e/a.z;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*u,n[3]=t[3],n[4]=t[4]*r,n[5]=t[5]*r,n[6]=t[6]*r,n[7]=t[7],n[8]=t[8]*i,n[9]=t[9]*i,n[10]=t[10]*i,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const p=new e.Cartesian3;d.getScale=function(t,n){return n.x=e.Cartesian3.magnitude(e.Cartesian3.fromElements(t[0],t[1],t[2],p)),n.y=e.Cartesian3.magnitude(e.Cartesian3.fromElements(t[4],t[5],t[6],p)),n.z=e.Cartesian3.magnitude(e.Cartesian3.fromElements(t[8],t[9],t[10],p)),n};const g=new e.Cartesian3;d.getMaximumScale=function(t){return d.getScale(t,g),e.Cartesian3.maximumComponent(g)};const C=new e.Cartesian3;d.setRotation=function(t,e,n){const a=d.getScale(t,C);return n[0]=e[0]*a.x,n[1]=e[1]*a.x,n[2]=e[2]*a.x,n[3]=t[3],n[4]=e[3]*a.y,n[5]=e[4]*a.y,n[6]=e[5]*a.y,n[7]=t[7],n[8]=e[6]*a.z,n[9]=e[7]*a.z,n[10]=e[8]*a.z,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n};const z=new e.Cartesian3;d.getRotation=function(t,e){const n=d.getScale(t,z);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.x,e[3]=t[4]/n.y,e[4]=t[5]/n.y,e[5]=t[6]/n.y,e[6]=t[8]/n.z,e[7]=t[9]/n.z,e[8]=t[10]/n.z,e},d.multiply=function(t,e,n){const a=t[0],u=t[1],r=t[2],i=t[3],o=t[4],s=t[5],c=t[6],l=t[7],f=t[8],h=t[9],d=t[10],m=t[11],y=t[12],w=t[13],x=t[14],M=t[15],p=e[0],g=e[1],C=e[2],z=e[3],b=e[4],O=e[5],V=e[6],T=e[7],A=e[8],E=e[9],I=e[10],U=e[11],N=e[12],S=e[13],P=e[14],_=e[15],q=a*p+o*g+f*C+y*z,R=u*p+s*g+h*C+w*z,W=r*p+c*g+d*C+x*z,L=i*p+l*g+m*C+M*z,k=a*b+o*O+f*V+y*T,B=u*b+s*O+h*V+w*T,$=r*b+c*O+d*V+x*T,j=i*b+l*O+m*V+M*T,v=a*A+o*E+f*I+y*U,X=u*A+s*E+h*I+w*U,Y=r*A+c*E+d*I+x*U,Z=i*A+l*E+m*I+M*U,D=a*N+o*S+f*P+y*_,F=u*N+s*S+h*P+w*_,G=r*N+c*S+d*P+x*_,H=i*N+l*S+m*P+M*_;return n[0]=q,n[1]=R,n[2]=W,n[3]=L,n[4]=k,n[5]=B,n[6]=$,n[7]=j,n[8]=v,n[9]=X,n[10]=Y,n[11]=Z,n[12]=D,n[13]=F,n[14]=G,n[15]=H,n},d.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n[4]=t[4]+e[4],n[5]=t[5]+e[5],n[6]=t[6]+e[6],n[7]=t[7]+e[7],n[8]=t[8]+e[8],n[9]=t[9]+e[9],n[10]=t[10]+e[10],n[11]=t[11]+e[11],n[12]=t[12]+e[12],n[13]=t[13]+e[13],n[14]=t[14]+e[14],n[15]=t[15]+e[15],n},d.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n[4]=t[4]-e[4],n[5]=t[5]-e[5],n[6]=t[6]-e[6],n[7]=t[7]-e[7],n[8]=t[8]-e[8],n[9]=t[9]-e[9],n[10]=t[10]-e[10],n[11]=t[11]-e[11],n[12]=t[12]-e[12],n[13]=t[13]-e[13],n[14]=t[14]-e[14],n[15]=t[15]-e[15],n},d.multiplyTransformation=function(t,e,n){const a=t[0],u=t[1],r=t[2],i=t[4],o=t[5],s=t[6],c=t[8],l=t[9],f=t[10],h=t[12],d=t[13],m=t[14],y=e[0],w=e[1],x=e[2],M=e[4],p=e[5],g=e[6],C=e[8],z=e[9],b=e[10],O=e[12],V=e[13],T=e[14],A=a*y+i*w+c*x,E=u*y+o*w+l*x,I=r*y+s*w+f*x,U=a*M+i*p+c*g,N=u*M+o*p+l*g,S=r*M+s*p+f*g,P=a*C+i*z+c*b,_=u*C+o*z+l*b,q=r*C+s*z+f*b,R=a*O+i*V+c*T+h,W=u*O+o*V+l*T+d,L=r*O+s*V+f*T+m;return n[0]=A,n[1]=E,n[2]=I,n[3]=0,n[4]=U,n[5]=N,n[6]=S,n[7]=0,n[8]=P,n[9]=_,n[10]=q,n[11]=0,n[12]=R,n[13]=W,n[14]=L,n[15]=1,n},d.multiplyByMatrix3=function(t,e,n){const a=t[0],u=t[1],r=t[2],i=t[4],o=t[5],s=t[6],c=t[8],l=t[9],f=t[10],h=e[0],d=e[1],m=e[2],y=e[3],w=e[4],x=e[5],M=e[6],p=e[7],g=e[8],C=a*h+i*d+c*m,z=u*h+o*d+l*m,b=r*h+s*d+f*m,O=a*y+i*w+c*x,V=u*y+o*w+l*x,T=r*y+s*w+f*x,A=a*M+i*p+c*g,E=u*M+o*p+l*g,I=r*M+s*p+f*g;return n[0]=C,n[1]=z,n[2]=b,n[3]=0,n[4]=O,n[5]=V,n[6]=T,n[7]=0,n[8]=A,n[9]=E,n[10]=I,n[11]=0,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},d.multiplyByTranslation=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=a*t[0]+u*t[4]+r*t[8]+t[12],o=a*t[1]+u*t[5]+r*t[9]+t[13],s=a*t[2]+u*t[6]+r*t[10]+t[14];return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=i,n[13]=o,n[14]=s,n[15]=t[15],n},d.multiplyByScale=function(t,e,n){const a=e.x,u=e.y,r=e.z;return 1===a&&1===u&&1===r?d.clone(t,n):(n[0]=a*t[0],n[1]=a*t[1],n[2]=a*t[2],n[3]=t[3],n[4]=u*t[4],n[5]=u*t[5],n[6]=u*t[6],n[7]=t[7],n[8]=r*t[8],n[9]=r*t[9],n[10]=r*t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n)},d.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3],n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7],n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},d.multiplyByVector=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=e.w,o=t[0]*a+t[4]*u+t[8]*r+t[12]*i,s=t[1]*a+t[5]*u+t[9]*r+t[13]*i,c=t[2]*a+t[6]*u+t[10]*r+t[14]*i,l=t[3]*a+t[7]*u+t[11]*r+t[15]*i;return n.x=o,n.y=s,n.z=c,n.w=l,n},d.multiplyByPointAsVector=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=t[0]*a+t[4]*u+t[8]*r,o=t[1]*a+t[5]*u+t[9]*r,s=t[2]*a+t[6]*u+t[10]*r;return n.x=i,n.y=o,n.z=s,n},d.multiplyByPoint=function(t,e,n){const a=e.x,u=e.y,r=e.z,i=t[0]*a+t[4]*u+t[8]*r+t[12],o=t[1]*a+t[5]*u+t[9]*r+t[13],s=t[2]*a+t[6]*u+t[10]*r+t[14];return n.x=i,n.y=o,n.z=s,n},d.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n[4]=t[4]*e,n[5]=t[5]*e,n[6]=t[6]*e,n[7]=t[7]*e,n[8]=t[8]*e,n[9]=t[9]*e,n[10]=t[10]*e,n[11]=t[11]*e,n[12]=t[12]*e,n[13]=t[13]*e,n[14]=t[14]*e,n[15]=t[15]*e,n},d.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e[9]=-t[9],e[10]=-t[10],e[11]=-t[11],e[12]=-t[12],e[13]=-t[13],e[14]=-t[14],e[15]=-t[15],e},d.transpose=function(t,e){const n=t[1],a=t[2],u=t[3],r=t[6],i=t[7],o=t[11];return e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=a,e[9]=r,e[10]=t[10],e[11]=t[14],e[12]=u,e[13]=i,e[14]=o,e[15]=t[15],e},d.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e[9]=Math.abs(t[9]),e[10]=Math.abs(t[10]),e[11]=Math.abs(t[11]),e[12]=Math.abs(t[12]),e[13]=Math.abs(t[13]),e[14]=Math.abs(t[14]),e[15]=Math.abs(t[15]),e},d.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[3]===e[3]&&t[7]===e[7]&&t[11]===e[11]&&t[15]===e[15]},d.equalsEpsilon=function(t,e,a){return a=n.defaultValue(a,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=a&&Math.abs(t[1]-e[1])<=a&&Math.abs(t[2]-e[2])<=a&&Math.abs(t[3]-e[3])<=a&&Math.abs(t[4]-e[4])<=a&&Math.abs(t[5]-e[5])<=a&&Math.abs(t[6]-e[6])<=a&&Math.abs(t[7]-e[7])<=a&&Math.abs(t[8]-e[8])<=a&&Math.abs(t[9]-e[9])<=a&&Math.abs(t[10]-e[10])<=a&&Math.abs(t[11]-e[11])<=a&&Math.abs(t[12]-e[12])<=a&&Math.abs(t[13]-e[13])<=a&&Math.abs(t[14]-e[14])<=a&&Math.abs(t[15]-e[15])<=a},d.getTranslation=function(t,e){return e.x=t[12],e.y=t[13],e.z=t[14],e},d.getMatrix3=function(t,e){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e};const b=new e.Matrix3,O=new e.Matrix3,V=new r,T=new r(0,0,0,1);d.inverse=function(t,n){const i=t[0],o=t[4],s=t[8],c=t[12],l=t[1],f=t[5],h=t[9],m=t[13],y=t[2],w=t[6],x=t[10],M=t[14],p=t[3],g=t[7],C=t[11],z=t[15];let A=x*z,E=M*C,I=w*z,U=M*g,N=w*C,S=x*g,P=y*z,_=M*p,q=y*C,R=x*p,W=y*g,L=w*p;const k=A*f+U*h+N*m-(E*f+I*h+S*m),B=E*l+P*h+R*m-(A*l+_*h+q*m),$=I*l+_*f+W*m-(U*l+P*f+L*m),j=S*l+q*f+L*h-(N*l+R*f+W*h),v=E*o+I*s+S*c-(A*o+U*s+N*c),X=A*i+_*s+q*c-(E*i+P*s+R*c),Y=U*i+P*o+L*c-(I*i+_*o+W*c),Z=N*i+R*o+W*s-(S*i+q*o+L*s);A=s*m,E=c*h,I=o*m,U=c*f,N=o*h,S=s*f,P=i*m,_=c*l,q=i*h,R=s*l,W=i*f,L=o*l;const D=A*g+U*C+N*z-(E*g+I*C+S*z),F=E*p+P*C+R*z-(A*p+_*C+q*z),G=I*p+_*g+W*z-(U*p+P*g+L*z),H=S*p+q*g+L*C-(N*p+R*g+W*C),Q=I*x+S*M+E*w-(N*M+A*w+U*x),J=q*M+A*y+_*x-(P*x+R*M+E*y),K=P*w+L*M+U*y-(W*M+I*y+_*w),tt=W*x+N*y+R*w-(q*w+L*x+S*y);let et=i*k+o*B+s*$+c*j;if(Math.abs(et)<a.CesiumMath.EPSILON21){if(e.Matrix3.equalsEpsilon(d.getMatrix3(t,b),O,a.CesiumMath.EPSILON7)&&r.equals(d.getRow(t,3,V),T))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new u.RuntimeError("matrix is not invertible because its determinate is zero.")}return et=1/et,n[0]=k*et,n[1]=B*et,n[2]=$*et,n[3]=j*et,n[4]=v*et,n[5]=X*et,n[6]=Y*et,n[7]=Z*et,n[8]=D*et,n[9]=F*et,n[10]=G*et,n[11]=H*et,n[12]=Q*et,n[13]=J*et,n[14]=K*et,n[15]=tt*et,n},d.inverseTransformation=function(t,e){const n=t[0],a=t[1],u=t[2],r=t[4],i=t[5],o=t[6],s=t[8],c=t[9],l=t[10],f=t[12],h=t[13],d=t[14],m=-n*f-a*h-u*d,y=-r*f-i*h-o*d,w=-s*f-c*h-l*d;return e[0]=n,e[1]=r,e[2]=s,e[3]=0,e[4]=a,e[5]=i,e[6]=c,e[7]=0,e[8]=u,e[9]=o,e[10]=l,e[11]=0,e[12]=m,e[13]=y,e[14]=w,e[15]=1,e};const A=new d;function E(t,e,a,u){this.west=n.defaultValue(t,0),this.south=n.defaultValue(e,0),this.east=n.defaultValue(a,0),this.north=n.defaultValue(u,0)}d.inverseTranspose=function(t,e){return d.inverse(d.transpose(t,A),e)},d.IDENTITY=Object.freeze(new d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),d.ZERO=Object.freeze(new d(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),d.COLUMN0ROW0=0,d.COLUMN0ROW1=1,d.COLUMN0ROW2=2,d.COLUMN0ROW3=3,d.COLUMN1ROW0=4,d.COLUMN1ROW1=5,d.COLUMN1ROW2=6,d.COLUMN1ROW3=7,d.COLUMN2ROW0=8,d.COLUMN2ROW1=9,d.COLUMN2ROW2=10,d.COLUMN2ROW3=11,d.COLUMN3ROW0=12,d.COLUMN3ROW1=13,d.COLUMN3ROW2=14,d.COLUMN3ROW3=15,Object.defineProperties(d.prototype,{length:{get:function(){return d.packedLength}}}),d.prototype.clone=function(t){return d.clone(this,t)},d.prototype.equals=function(t){return d.equals(this,t)},d.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]&&t[4]===e[n+4]&&t[5]===e[n+5]&&t[6]===e[n+6]&&t[7]===e[n+7]&&t[8]===e[n+8]&&t[9]===e[n+9]&&t[10]===e[n+10]&&t[11]===e[n+11]&&t[12]===e[n+12]&&t[13]===e[n+13]&&t[14]===e[n+14]&&t[15]===e[n+15]},d.prototype.equalsEpsilon=function(t,e){return d.equalsEpsilon(this,t,e)},d.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})\n(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})\n(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})\n(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`},Object.defineProperties(E.prototype,{width:{get:function(){return E.computeWidth(this)}},height:{get:function(){return E.computeHeight(this)}}}),E.packedLength=4,E.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t.west,e[a++]=t.south,e[a++]=t.east,e[a]=t.north,e},E.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new E),a.west=t[e++],a.south=t[e++],a.east=t[e++],a.north=t[e],a},E.computeWidth=function(t){let e=t.east;const n=t.west;return e<n&&(e+=a.CesiumMath.TWO_PI),e-n},E.computeHeight=function(t){return t.north-t.south},E.fromDegrees=function(t,e,u,r,i){return t=a.CesiumMath.toRadians(n.defaultValue(t,0)),e=a.CesiumMath.toRadians(n.defaultValue(e,0)),u=a.CesiumMath.toRadians(n.defaultValue(u,0)),r=a.CesiumMath.toRadians(n.defaultValue(r,0)),n.defined(i)?(i.west=t,i.south=e,i.east=u,i.north=r,i):new E(t,e,u,r)},E.fromRadians=function(t,e,a,u,r){return n.defined(r)?(r.west=n.defaultValue(t,0),r.south=n.defaultValue(e,0),r.east=n.defaultValue(a,0),r.north=n.defaultValue(u,0),r):new E(t,e,a,u)},E.fromCartographicArray=function(t,e){let u=Number.MAX_VALUE,r=-Number.MAX_VALUE,i=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=-Number.MAX_VALUE;for(let e=0,n=t.length;e<n;e++){const n=t[e];u=Math.min(u,n.longitude),r=Math.max(r,n.longitude),s=Math.min(s,n.latitude),c=Math.max(c,n.latitude);const l=n.longitude>=0?n.longitude:n.longitude+a.CesiumMath.TWO_PI;i=Math.min(i,l),o=Math.max(o,l)}return r-u>o-i&&(u=i,r=o,r>a.CesiumMath.PI&&(r-=a.CesiumMath.TWO_PI),u>a.CesiumMath.PI&&(u-=a.CesiumMath.TWO_PI)),n.defined(e)?(e.west=u,e.south=s,e.east=r,e.north=c,e):new E(u,s,r,c)},E.fromCartesianArray=function(t,u,r){u=n.defaultValue(u,e.Ellipsoid.WGS84);let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=-Number.MAX_VALUE,l=Number.MAX_VALUE,f=-Number.MAX_VALUE;for(let e=0,n=t.length;e<n;e++){const n=u.cartesianToCartographic(t[e]);i=Math.min(i,n.longitude),o=Math.max(o,n.longitude),l=Math.min(l,n.latitude),f=Math.max(f,n.latitude);const r=n.longitude>=0?n.longitude:n.longitude+a.CesiumMath.TWO_PI;s=Math.min(s,r),c=Math.max(c,r)}return o-i>c-s&&(i=s,o=c,o>a.CesiumMath.PI&&(o-=a.CesiumMath.TWO_PI),i>a.CesiumMath.PI&&(i-=a.CesiumMath.TWO_PI)),n.defined(r)?(r.west=i,r.south=l,r.east=o,r.north=f,r):new E(i,l,o,f)},E.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new E(t.west,t.south,t.east,t.north)},E.equalsEpsilon=function(t,e,a){return a=n.defaultValue(a,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t.west-e.west)<=a&&Math.abs(t.south-e.south)<=a&&Math.abs(t.east-e.east)<=a&&Math.abs(t.north-e.north)<=a},E.prototype.clone=function(t){return E.clone(this,t)},E.prototype.equals=function(t){return E.equals(this,t)},E.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},E.prototype.equalsEpsilon=function(t,e){return E.equalsEpsilon(this,t,e)},E.validate=function(t){},E.southwest=function(t,a){return n.defined(a)?(a.longitude=t.west,a.latitude=t.south,a.height=0,a):new e.Cartographic(t.west,t.south)},E.northwest=function(t,a){return n.defined(a)?(a.longitude=t.west,a.latitude=t.north,a.height=0,a):new e.Cartographic(t.west,t.north)},E.northeast=function(t,a){return n.defined(a)?(a.longitude=t.east,a.latitude=t.north,a.height=0,a):new e.Cartographic(t.east,t.north)},E.southeast=function(t,a){return n.defined(a)?(a.longitude=t.east,a.latitude=t.south,a.height=0,a):new e.Cartographic(t.east,t.south)},E.center=function(t,u){let r=t.east;const i=t.west;r<i&&(r+=a.CesiumMath.TWO_PI);const o=a.CesiumMath.negativePiToPi(.5*(i+r)),s=.5*(t.south+t.north);return n.defined(u)?(u.longitude=o,u.latitude=s,u.height=0,u):new e.Cartographic(o,s)},E.intersection=function(t,e,u){let r=t.east,i=t.west,o=e.east,s=e.west;r<i&&o>0?r+=a.CesiumMath.TWO_PI:o<s&&r>0&&(o+=a.CesiumMath.TWO_PI),r<i&&s<0?s+=a.CesiumMath.TWO_PI:o<s&&i<0&&(i+=a.CesiumMath.TWO_PI);const c=a.CesiumMath.negativePiToPi(Math.max(i,s)),l=a.CesiumMath.negativePiToPi(Math.min(r,o));if((t.west<t.east||e.west<e.east)&&l<=c)return;const f=Math.max(t.south,e.south),h=Math.min(t.north,e.north);return f>=h?void 0:n.defined(u)?(u.west=c,u.south=f,u.east=l,u.north=h,u):new E(c,f,l,h)},E.simpleIntersection=function(t,e,a){const u=Math.max(t.west,e.west),r=Math.max(t.south,e.south),i=Math.min(t.east,e.east),o=Math.min(t.north,e.north);if(!(r>=o||u>=i))return n.defined(a)?(a.west=u,a.south=r,a.east=i,a.north=o,a):new E(u,r,i,o)},E.union=function(t,e,u){n.defined(u)||(u=new E);let r=t.east,i=t.west,o=e.east,s=e.west;r<i&&o>0?r+=a.CesiumMath.TWO_PI:o<s&&r>0&&(o+=a.CesiumMath.TWO_PI),r<i&&s<0?s+=a.CesiumMath.TWO_PI:o<s&&i<0&&(i+=a.CesiumMath.TWO_PI);const c=a.CesiumMath.negativePiToPi(Math.min(i,s)),l=a.CesiumMath.negativePiToPi(Math.max(r,o));return u.west=c,u.south=Math.min(t.south,e.south),u.east=l,u.north=Math.max(t.north,e.north),u},E.expand=function(t,e,a){return n.defined(a)||(a=new E),a.west=Math.min(t.west,e.longitude),a.south=Math.min(t.south,e.latitude),a.east=Math.max(t.east,e.longitude),a.north=Math.max(t.north,e.latitude),a},E.contains=function(t,e){let n=e.longitude;const u=e.latitude,r=t.west;let i=t.east;return i<r&&(i+=a.CesiumMath.TWO_PI,n<0&&(n+=a.CesiumMath.TWO_PI)),(n>r||a.CesiumMath.equalsEpsilon(n,r,a.CesiumMath.EPSILON14))&&(n<i||a.CesiumMath.equalsEpsilon(n,i,a.CesiumMath.EPSILON14))&&u>=t.south&&u<=t.north};const I=new e.Cartographic;function U(t,e){this.x=n.defaultValue(t,0),this.y=n.defaultValue(e,0)}E.subsample=function(t,u,r,i){u=n.defaultValue(u,e.Ellipsoid.WGS84),r=n.defaultValue(r,0),n.defined(i)||(i=[]);let o=0;const s=t.north,c=t.south,l=t.east,f=t.west,h=I;h.height=r,h.longitude=f,h.latitude=s,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.longitude=l,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.latitude=c,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.longitude=f,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.latitude=s<0?s:c>0?c:0;for(let e=1;e<8;++e)h.longitude=-Math.PI+e*a.CesiumMath.PI_OVER_TWO,E.contains(t,h)&&(i[o]=u.cartographicToCartesian(h,i[o]),o++);return 0===h.latitude&&(h.longitude=f,i[o]=u.cartographicToCartesian(h,i[o]),o++,h.longitude=l,i[o]=u.cartographicToCartesian(h,i[o]),o++),i.length=o,i},E.subsection=function(t,e,u,r,i,o){if(n.defined(o)||(o=new E),t.west<=t.east){const n=t.east-t.west;o.west=t.west+e*n,o.east=t.west+r*n}else{const n=a.CesiumMath.TWO_PI+t.east-t.west;o.west=a.CesiumMath.negativePiToPi(t.west+e*n),o.east=a.CesiumMath.negativePiToPi(t.west+r*n)}const s=t.north-t.south;return o.south=t.south+u*s,o.north=t.south+i*s,1===e&&(o.west=t.east),1===r&&(o.east=t.east),1===u&&(o.south=t.north),1===i&&(o.north=t.north),o},E.MAX_VALUE=Object.freeze(new E(-Math.PI,-a.CesiumMath.PI_OVER_TWO,Math.PI,a.CesiumMath.PI_OVER_TWO)),U.fromElements=function(t,e,a){return n.defined(a)?(a.x=t,a.y=e,a):new U(t,e)},U.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e.x=t.x,e.y=t.y,e):new U(t.x,t.y)},U.fromCartesian3=U.clone,U.fromCartesian4=U.clone,U.packedLength=2,U.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t.x,e[a]=t.y,e},U.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new U),a.x=t[e++],a.y=t[e],a},U.packArray=function(t,e){const a=t.length,u=2*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)U.pack(t[n],e,2*n);return e},U.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/2:e=new Array(a/2);for(let n=0;n<a;n+=2){const a=n/2;e[a]=U.unpack(t,n,e[a])}return e},U.fromArray=U.unpack,U.maximumComponent=function(t){return Math.max(t.x,t.y)},U.minimumComponent=function(t){return Math.min(t.x,t.y)},U.minimumByComponent=function(t,e,n){return n.x=Math.min(t.x,e.x),n.y=Math.min(t.y,e.y),n},U.maximumByComponent=function(t,e,n){return n.x=Math.max(t.x,e.x),n.y=Math.max(t.y,e.y),n},U.clamp=function(t,e,n,u){const r=a.CesiumMath.clamp(t.x,e.x,n.x),i=a.CesiumMath.clamp(t.y,e.y,n.y);return u.x=r,u.y=i,u},U.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},U.magnitude=function(t){return Math.sqrt(U.magnitudeSquared(t))};const N=new U;U.distance=function(t,e){return U.subtract(t,e,N),U.magnitude(N)},U.distanceSquared=function(t,e){return U.subtract(t,e,N),U.magnitudeSquared(N)},U.normalize=function(t,e){const n=U.magnitude(t);return e.x=t.x/n,e.y=t.y/n,e},U.dot=function(t,e){return t.x*e.x+t.y*e.y},U.cross=function(t,e){return t.x*e.y-t.y*e.x},U.multiplyComponents=function(t,e,n){return n.x=t.x*e.x,n.y=t.y*e.y,n},U.divideComponents=function(t,e,n){return n.x=t.x/e.x,n.y=t.y/e.y,n},U.add=function(t,e,n){return n.x=t.x+e.x,n.y=t.y+e.y,n},U.subtract=function(t,e,n){return n.x=t.x-e.x,n.y=t.y-e.y,n},U.multiplyByScalar=function(t,e,n){return n.x=t.x*e,n.y=t.y*e,n},U.divideByScalar=function(t,e,n){return n.x=t.x/e,n.y=t.y/e,n},U.negate=function(t,e){return e.x=-t.x,e.y=-t.y,e},U.abs=function(t,e){return e.x=Math.abs(t.x),e.y=Math.abs(t.y),e};const S=new U;U.lerp=function(t,e,n,a){return U.multiplyByScalar(e,n,S),a=U.multiplyByScalar(t,1-n,a),U.add(S,a,a)};const P=new U,_=new U;U.angleBetween=function(t,e){return U.normalize(t,P),U.normalize(e,_),a.CesiumMath.acosClamped(U.dot(P,_))};const q=new U;function R(t,e,a,u){this[0]=n.defaultValue(t,0),this[1]=n.defaultValue(a,0),this[2]=n.defaultValue(e,0),this[3]=n.defaultValue(u,0)}U.mostOrthogonalAxis=function(t,e){const n=U.normalize(t,q);return U.abs(n,n),e=n.x<=n.y?U.clone(U.UNIT_X,e):U.clone(U.UNIT_Y,e)},U.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t.x===e.x&&t.y===e.y},U.equalsArray=function(t,e,n){return t.x===e[n]&&t.y===e[n+1]},U.equalsEpsilon=function(t,e,u,r){return t===e||n.defined(t)&&n.defined(e)&&a.CesiumMath.equalsEpsilon(t.x,e.x,u,r)&&a.CesiumMath.equalsEpsilon(t.y,e.y,u,r)},U.ZERO=Object.freeze(new U(0,0)),U.ONE=Object.freeze(new U(1,1)),U.UNIT_X=Object.freeze(new U(1,0)),U.UNIT_Y=Object.freeze(new U(0,1)),U.prototype.clone=function(t){return U.clone(this,t)},U.prototype.equals=function(t){return U.equals(this,t)},U.prototype.equalsEpsilon=function(t,e,n){return U.equalsEpsilon(this,t,e,n)},U.prototype.toString=function(){return`(${this.x}, ${this.y})`},R.packedLength=4,R.pack=function(t,e,a){return a=n.defaultValue(a,0),e[a++]=t[0],e[a++]=t[1],e[a++]=t[2],e[a++]=t[3],e},R.unpack=function(t,e,a){return e=n.defaultValue(e,0),n.defined(a)||(a=new R),a[0]=t[e++],a[1]=t[e++],a[2]=t[e++],a[3]=t[e++],a},R.packArray=function(t,e){const a=t.length,u=4*a;n.defined(e)?(Array.isArray(e)||e.length===u)&&e.length!==u&&(e.length=u):e=new Array(u);for(let n=0;n<a;++n)R.pack(t[n],e,4*n);return e},R.unpackArray=function(t,e){const a=t.length;n.defined(e)?e.length=a/4:e=new Array(a/4);for(let n=0;n<a;n+=4){const a=n/4;e[a]=R.unpack(t,n,e[a])}return e},R.clone=function(t,e){if(n.defined(t))return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):new R(t[0],t[2],t[1],t[3])},R.fromArray=R.unpack,R.fromColumnMajorArray=function(t,e){return R.clone(t,e)},R.fromRowMajorArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[2],e[2]=t[1],e[3]=t[3],e):new R(t[0],t[1],t[2],t[3])},R.fromScale=function(t,e){return n.defined(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=t.y,e):new R(t.x,0,0,t.y)},R.fromUniformScale=function(t,e){return n.defined(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=t,e):new R(t,0,0,t)},R.fromRotation=function(t,e){const a=Math.cos(t),u=Math.sin(t);return n.defined(e)?(e[0]=a,e[1]=u,e[2]=-u,e[3]=a,e):new R(a,-u,u,a)},R.toArray=function(t,e){return n.defined(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):[t[0],t[1],t[2],t[3]]},R.getElementIndex=function(t,e){return 2*t+e},R.getColumn=function(t,e,n){const a=2*e,u=t[a],r=t[a+1];return n.x=u,n.y=r,n},R.setColumn=function(t,e,n,a){const u=2*e;return(a=R.clone(t,a))[u]=n.x,a[u+1]=n.y,a},R.getRow=function(t,e,n){const a=t[e],u=t[e+2];return n.x=a,n.y=u,n},R.setRow=function(t,e,n,a){return(a=R.clone(t,a))[e]=n.x,a[e+2]=n.y,a};const W=new U;R.setScale=function(t,e,n){const a=R.getScale(t,W),u=e.x/a.x,r=e.y/a.y;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*r,n[3]=t[3]*r,n};const L=new U;R.setUniformScale=function(t,e,n){const a=R.getScale(t,L),u=e/a.x,r=e/a.y;return n[0]=t[0]*u,n[1]=t[1]*u,n[2]=t[2]*r,n[3]=t[3]*r,n};const k=new U;R.getScale=function(t,e){return e.x=U.magnitude(U.fromElements(t[0],t[1],k)),e.y=U.magnitude(U.fromElements(t[2],t[3],k)),e};const B=new U;R.getMaximumScale=function(t){return R.getScale(t,B),U.maximumComponent(B)};const $=new U;R.setRotation=function(t,e,n){const a=R.getScale(t,$);return n[0]=e[0]*a.x,n[1]=e[1]*a.x,n[2]=e[2]*a.y,n[3]=e[3]*a.y,n};const j=new U;R.getRotation=function(t,e){const n=R.getScale(t,j);return e[0]=t[0]/n.x,e[1]=t[1]/n.x,e[2]=t[2]/n.y,e[3]=t[3]/n.y,e},R.multiply=function(t,e,n){const a=t[0]*e[0]+t[2]*e[1],u=t[0]*e[2]+t[2]*e[3],r=t[1]*e[0]+t[3]*e[1],i=t[1]*e[2]+t[3]*e[3];return n[0]=a,n[1]=r,n[2]=u,n[3]=i,n},R.add=function(t,e,n){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n[3]=t[3]+e[3],n},R.subtract=function(t,e,n){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n[3]=t[3]-e[3],n},R.multiplyByVector=function(t,e,n){const a=t[0]*e.x+t[2]*e.y,u=t[1]*e.x+t[3]*e.y;return n.x=a,n.y=u,n},R.multiplyByScalar=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},R.multiplyByScale=function(t,e,n){return n[0]=t[0]*e.x,n[1]=t[1]*e.x,n[2]=t[2]*e.y,n[3]=t[3]*e.y,n},R.multiplyByUniformScale=function(t,e,n){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n[3]=t[3]*e,n},R.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},R.transpose=function(t,e){const n=t[0],a=t[2],u=t[1],r=t[3];return e[0]=n,e[1]=a,e[2]=u,e[3]=r,e},R.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e},R.equals=function(t,e){return t===e||n.defined(t)&&n.defined(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]},R.equalsArray=function(t,e,n){return t[0]===e[n]&&t[1]===e[n+1]&&t[2]===e[n+2]&&t[3]===e[n+3]},R.equalsEpsilon=function(t,e,a){return a=n.defaultValue(a,0),t===e||n.defined(t)&&n.defined(e)&&Math.abs(t[0]-e[0])<=a&&Math.abs(t[1]-e[1])<=a&&Math.abs(t[2]-e[2])<=a&&Math.abs(t[3]-e[3])<=a},R.IDENTITY=Object.freeze(new R(1,0,0,1)),R.ZERO=Object.freeze(new R(0,0,0,0)),R.COLUMN0ROW0=0,R.COLUMN0ROW1=1,R.COLUMN1ROW0=2,R.COLUMN1ROW1=3,Object.defineProperties(R.prototype,{length:{get:function(){return R.packedLength}}}),R.prototype.clone=function(t){return R.clone(this,t)},R.prototype.equals=function(t){return R.equals(this,t)},R.prototype.equalsEpsilon=function(t,e){return R.equalsEpsilon(this,t,e)},R.prototype.toString=function(){return`(${this[0]}, ${this[2]})\n(${this[1]}, ${this[3]})`},t.Cartesian2=U,t.Cartesian4=r,t.Matrix2=R,t.Matrix4=d,t.Rectangle=E}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./defaultValue-f6d5e6da","./Math-2ce22ee9"],(function(e,t,n){"use strict";function i(e,n,i){this.x=t.defaultValue(e,0),this.y=t.defaultValue(n,0),this.z=t.defaultValue(i,0)}i.fromSpherical=function(e,n){t.defined(n)||(n=new i);const r=e.clock,a=e.cone,o=t.defaultValue(e.magnitude,1),u=o*Math.sin(a);return n.x=u*Math.cos(r),n.y=u*Math.sin(r),n.z=o*Math.cos(a),n},i.fromElements=function(e,n,r,a){return t.defined(a)?(a.x=e,a.y=n,a.z=r,a):new i(e,n,r)},i.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.x=e.x,n.y=e.y,n.z=e.z,n):new i(e.x,e.y,e.z)},i.fromCartesian4=i.clone,i.packedLength=3,i.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e.x,n[i++]=e.y,n[i]=e.z,n},i.unpack=function(e,n,r){return n=t.defaultValue(n,0),t.defined(r)||(r=new i),r.x=e[n++],r.y=e[n++],r.z=e[n],r},i.packArray=function(e,n){const r=e.length,a=3*r;t.defined(n)?(Array.isArray(n)||n.length===a)&&n.length!==a&&(n.length=a):n=new Array(a);for(let t=0;t<r;++t)i.pack(e[t],n,3*t);return n},i.unpackArray=function(e,n){const r=e.length;t.defined(n)?n.length=r/3:n=new Array(r/3);for(let t=0;t<r;t+=3){const r=t/3;n[r]=i.unpack(e,t,n[r])}return n},i.fromArray=i.unpack,i.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},i.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},i.minimumByComponent=function(e,t,n){return n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n},i.maximumByComponent=function(e,t,n){return n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n},i.clamp=function(e,t,i,r){const a=n.CesiumMath.clamp(e.x,t.x,i.x),o=n.CesiumMath.clamp(e.y,t.y,i.y),u=n.CesiumMath.clamp(e.z,t.z,i.z);return r.x=a,r.y=o,r.z=u,r},i.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},i.magnitude=function(e){return Math.sqrt(i.magnitudeSquared(e))};const r=new i;i.distance=function(e,t){return i.subtract(e,t,r),i.magnitude(r)},i.distanceSquared=function(e,t){return i.subtract(e,t,r),i.magnitudeSquared(r)},i.normalize=function(e,t){const n=i.magnitude(e);return t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t},i.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},i.multiplyComponents=function(e,t,n){return n.x=e.x*t.x,n.y=e.y*t.y,n.z=e.z*t.z,n},i.divideComponents=function(e,t,n){return n.x=e.x/t.x,n.y=e.y/t.y,n.z=e.z/t.z,n},i.add=function(e,t,n){return n.x=e.x+t.x,n.y=e.y+t.y,n.z=e.z+t.z,n},i.subtract=function(e,t,n){return n.x=e.x-t.x,n.y=e.y-t.y,n.z=e.z-t.z,n},i.multiplyByScalar=function(e,t,n){return n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n},i.divideByScalar=function(e,t,n){return n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n},i.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},i.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};const a=new i;i.lerp=function(e,t,n,r){return i.multiplyByScalar(t,n,a),r=i.multiplyByScalar(e,1-n,r),i.add(a,r,r)};const o=new i,u=new i;i.angleBetween=function(e,t){i.normalize(e,o),i.normalize(t,u);const n=i.dot(o,u),r=i.magnitude(i.cross(o,u,o));return Math.atan2(r,n)};const c=new i;i.mostOrthogonalAxis=function(e,t){const n=i.normalize(e,c);return i.abs(n,n),t=n.x<=n.y?n.x<=n.z?i.clone(i.UNIT_X,t):i.clone(i.UNIT_Z,t):n.y<=n.z?i.clone(i.UNIT_Y,t):i.clone(i.UNIT_Z,t)},i.projectVector=function(e,t,n){const r=i.dot(e,t)/i.dot(t,t);return i.multiplyByScalar(t,r,n)},i.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.x===n.x&&e.y===n.y&&e.z===n.z},i.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]},i.equalsEpsilon=function(e,i,r,a){return e===i||t.defined(e)&&t.defined(i)&&n.CesiumMath.equalsEpsilon(e.x,i.x,r,a)&&n.CesiumMath.equalsEpsilon(e.y,i.y,r,a)&&n.CesiumMath.equalsEpsilon(e.z,i.z,r,a)},i.cross=function(e,t,n){const i=e.x,r=e.y,a=e.z,o=t.x,u=t.y,c=t.z,s=r*c-a*u,d=a*o-i*c,l=i*u-r*o;return n.x=s,n.y=d,n.z=l,n},i.midpoint=function(e,t,n){return n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y),n.z=.5*(e.z+t.z),n},i.fromDegrees=function(e,t,r,a,o){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),i.fromRadians(e,t,r,a,o)};let s=new i,d=new i;const l=new i(40680631590769,40680631590769,40408299984661.445);i.fromRadians=function(e,n,r,a,o){r=t.defaultValue(r,0);const u=t.defined(a)?a.radiiSquared:l,c=Math.cos(n);s.x=c*Math.cos(e),s.y=c*Math.sin(e),s.z=Math.sin(n),s=i.normalize(s,s),i.multiplyComponents(u,s,d);const f=Math.sqrt(i.dot(s,d));return d=i.divideByScalar(d,f,d),s=i.multiplyByScalar(s,r,s),t.defined(o)||(o=new i),i.add(d,s,o)},i.fromDegreesArray=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/2:r=new Array(a/2);for(let t=0;t<a;t+=2){const a=e[t],o=e[t+1],u=t/2;r[u]=i.fromDegrees(a,o,0,n,r[u])}return r},i.fromRadiansArray=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/2:r=new Array(a/2);for(let t=0;t<a;t+=2){const a=e[t],o=e[t+1],u=t/2;r[u]=i.fromRadians(a,o,0,n,r[u])}return r},i.fromDegreesArrayHeights=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/3:r=new Array(a/3);for(let t=0;t<a;t+=3){const a=e[t],o=e[t+1],u=e[t+2],c=t/3;r[c]=i.fromDegrees(a,o,u,n,r[c])}return r},i.fromRadiansArrayHeights=function(e,n,r){const a=e.length;t.defined(r)?r.length=a/3:r=new Array(a/3);for(let t=0;t<a;t+=3){const a=e[t],o=e[t+1],u=e[t+2],c=t/3;r[c]=i.fromRadians(a,o,u,n,r[c])}return r},i.ZERO=Object.freeze(new i(0,0,0)),i.ONE=Object.freeze(new i(1,1,1)),i.UNIT_X=Object.freeze(new i(1,0,0)),i.UNIT_Y=Object.freeze(new i(0,1,0)),i.UNIT_Z=Object.freeze(new i(0,0,1)),i.prototype.clone=function(e){return i.clone(this,e)},i.prototype.equals=function(e){return i.equals(this,e)},i.prototype.equalsEpsilon=function(e,t,n){return i.equalsEpsilon(this,e,t,n)},i.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};const f=new i,h=new i;function m(e,r,a,o,u){const c=e.x,s=e.y,d=e.z,l=r.x,m=r.y,y=r.z,p=c*c*l*l,g=s*s*m*m,x=d*d*y*y,z=p+g+x,M=Math.sqrt(1/z),w=i.multiplyByScalar(e,M,f);if(z<o)return isFinite(M)?i.clone(w,u):void 0;const S=a.x,q=a.y,R=a.z,_=h;_.x=w.x*S*2,_.y=w.y*q*2,_.z=w.z*R*2;let O,C,b,E,T,A,v,N,I,V,U,k=(1-M)*i.magnitude(e)/(.5*i.magnitude(_)),L=0;do{k-=L,b=1/(1+k*S),E=1/(1+k*q),T=1/(1+k*R),A=b*b,v=E*E,N=T*T,I=A*b,V=v*E,U=N*T,O=p*A+g*v+x*N-1,C=p*I*S+g*V*q+x*U*R;L=O/(-2*C)}while(Math.abs(O)>n.CesiumMath.EPSILON12);return t.defined(u)?(u.x=c*b,u.y=s*E,u.z=d*T,u):new i(c*b,s*E,d*T)}function y(e,n,i){this.longitude=t.defaultValue(e,0),this.latitude=t.defaultValue(n,0),this.height=t.defaultValue(i,0)}y.fromRadians=function(e,n,i,r){return i=t.defaultValue(i,0),t.defined(r)?(r.longitude=e,r.latitude=n,r.height=i,r):new y(e,n,i)},y.fromDegrees=function(e,t,i,r){return e=n.CesiumMath.toRadians(e),t=n.CesiumMath.toRadians(t),y.fromRadians(e,t,i,r)};const p=new i,g=new i,x=new i,z=new i(1/6378137,1/6378137,1/6356752.314245179),M=new i(1/40680631590769,1/40680631590769,1/40408299984661.445),w=n.CesiumMath.EPSILON1;function S(e,r,a,o){r=t.defaultValue(r,0),a=t.defaultValue(a,0),o=t.defaultValue(o,0),e._radii=new i(r,a,o),e._radiiSquared=new i(r*r,a*a,o*o),e._radiiToTheFourth=new i(r*r*r*r,a*a*a*a,o*o*o*o),e._oneOverRadii=new i(0===r?0:1/r,0===a?0:1/a,0===o?0:1/o),e._oneOverRadiiSquared=new i(0===r?0:1/(r*r),0===a?0:1/(a*a),0===o?0:1/(o*o)),e._minimumRadius=Math.min(r,a,o),e._maximumRadius=Math.max(r,a,o),e._centerToleranceSquared=n.CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function q(e,t,n){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,S(this,e,t,n)}y.fromCartesian=function(e,r,a){const o=t.defined(r)?r.oneOverRadii:z,u=t.defined(r)?r.oneOverRadiiSquared:M,c=m(e,o,u,t.defined(r)?r._centerToleranceSquared:w,g);if(!t.defined(c))return;let s=i.multiplyComponents(c,u,p);s=i.normalize(s,s);const d=i.subtract(e,c,x),l=Math.atan2(s.y,s.x),f=Math.asin(s.z),h=n.CesiumMath.sign(i.dot(d,e))*i.magnitude(d);return t.defined(a)?(a.longitude=l,a.latitude=f,a.height=h,a):new y(l,f,h)},y.toCartesian=function(e,t,n){return i.fromRadians(e.longitude,e.latitude,e.height,t,n)},y.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n.longitude=e.longitude,n.latitude=e.latitude,n.height=e.height,n):new y(e.longitude,e.latitude,e.height)},y.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e.longitude===n.longitude&&e.latitude===n.latitude&&e.height===n.height},y.equalsEpsilon=function(e,n,i){return i=t.defaultValue(i,0),e===n||t.defined(e)&&t.defined(n)&&Math.abs(e.longitude-n.longitude)<=i&&Math.abs(e.latitude-n.latitude)<=i&&Math.abs(e.height-n.height)<=i},y.ZERO=Object.freeze(new y(0,0,0)),y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.equals=function(e){return y.equals(this,e)},y.prototype.equalsEpsilon=function(e,t){return y.equalsEpsilon(this,e,t)},y.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`},Object.defineProperties(q.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),q.clone=function(e,n){if(!t.defined(e))return;const r=e._radii;return t.defined(n)?(i.clone(r,n._radii),i.clone(e._radiiSquared,n._radiiSquared),i.clone(e._radiiToTheFourth,n._radiiToTheFourth),i.clone(e._oneOverRadii,n._oneOverRadii),i.clone(e._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=e._minimumRadius,n._maximumRadius=e._maximumRadius,n._centerToleranceSquared=e._centerToleranceSquared,n):new q(r.x,r.y,r.z)},q.fromCartesian3=function(e,n){return t.defined(n)||(n=new q),t.defined(e)?(S(n,e.x,e.y,e.z),n):n},q.WGS84=Object.freeze(new q(6378137,6378137,6356752.314245179)),q.UNIT_SPHERE=Object.freeze(new q(1,1,1)),q.MOON=Object.freeze(new q(n.CesiumMath.LUNAR_RADIUS,n.CesiumMath.LUNAR_RADIUS,n.CesiumMath.LUNAR_RADIUS)),q.prototype.clone=function(e){return q.clone(this,e)},q.packedLength=i.packedLength,q.pack=function(e,n,r){return r=t.defaultValue(r,0),i.pack(e._radii,n,r),n},q.unpack=function(e,n,r){n=t.defaultValue(n,0);const a=i.unpack(e,n);return q.fromCartesian3(a,r)},q.prototype.geocentricSurfaceNormal=i.normalize,q.prototype.geodeticSurfaceNormalCartographic=function(e,n){const r=e.longitude,a=e.latitude,o=Math.cos(a),u=o*Math.cos(r),c=o*Math.sin(r),s=Math.sin(a);return t.defined(n)||(n=new i),n.x=u,n.y=c,n.z=s,i.normalize(n,n)},q.prototype.geodeticSurfaceNormal=function(e,r){if(!i.equalsEpsilon(e,i.ZERO,n.CesiumMath.EPSILON14))return t.defined(r)||(r=new i),r=i.multiplyComponents(e,this._oneOverRadiiSquared,r),i.normalize(r,r)};const R=new i,_=new i;q.prototype.cartographicToCartesian=function(e,n){const r=R,a=_;this.geodeticSurfaceNormalCartographic(e,r),i.multiplyComponents(this._radiiSquared,r,a);const o=Math.sqrt(i.dot(r,a));return i.divideByScalar(a,o,a),i.multiplyByScalar(r,e.height,r),t.defined(n)||(n=new i),i.add(a,r,n)},q.prototype.cartographicArrayToCartesianArray=function(e,n){const i=e.length;t.defined(n)?n.length=i:n=new Array(i);for(let t=0;t<i;t++)n[t]=this.cartographicToCartesian(e[t],n[t]);return n};const O=new i,C=new i,b=new i;q.prototype.cartesianToCartographic=function(e,r){const a=this.scaleToGeodeticSurface(e,C);if(!t.defined(a))return;const o=this.geodeticSurfaceNormal(a,O),u=i.subtract(e,a,b),c=Math.atan2(o.y,o.x),s=Math.asin(o.z),d=n.CesiumMath.sign(i.dot(u,e))*i.magnitude(u);return t.defined(r)?(r.longitude=c,r.latitude=s,r.height=d,r):new y(c,s,d)},q.prototype.cartesianArrayToCartographicArray=function(e,n){const i=e.length;t.defined(n)?n.length=i:n=new Array(i);for(let t=0;t<i;++t)n[t]=this.cartesianToCartographic(e[t],n[t]);return n},q.prototype.scaleToGeodeticSurface=function(e,t){return m(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},q.prototype.scaleToGeocentricSurface=function(e,n){t.defined(n)||(n=new i);const r=e.x,a=e.y,o=e.z,u=this._oneOverRadiiSquared,c=1/Math.sqrt(r*r*u.x+a*a*u.y+o*o*u.z);return i.multiplyByScalar(e,c,n)},q.prototype.transformPositionToScaledSpace=function(e,n){return t.defined(n)||(n=new i),i.multiplyComponents(e,this._oneOverRadii,n)},q.prototype.transformPositionFromScaledSpace=function(e,n){return t.defined(n)||(n=new i),i.multiplyComponents(e,this._radii,n)},q.prototype.equals=function(e){return this===e||t.defined(e)&&i.equals(this._radii,e._radii)},q.prototype.toString=function(){return this._radii.toString()},q.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,n,r){n=t.defaultValue(n,0);const a=this._squaredXOverSquaredZ;if(t.defined(r)||(r=new i),r.x=0,r.y=0,r.z=e.z*(1-a),!(Math.abs(r.z)>=this._radii.z-n))return r};const E=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],T=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function A(e,t,n){const i=.5*(t+e),r=.5*(t-e);let a=0;for(let e=0;e<5;e++){const t=r*E[e];a+=T[e]*(n(i+t)+n(i-t))}return a*=r,a}function v(e,n,i,r,a,o,u,c,s){this[0]=t.defaultValue(e,0),this[1]=t.defaultValue(r,0),this[2]=t.defaultValue(u,0),this[3]=t.defaultValue(n,0),this[4]=t.defaultValue(a,0),this[5]=t.defaultValue(c,0),this[6]=t.defaultValue(i,0),this[7]=t.defaultValue(o,0),this[8]=t.defaultValue(s,0)}q.prototype.surfaceArea=function(e){const t=e.west;let i=e.east;const r=e.south,a=e.north;for(;i<t;)i+=n.CesiumMath.TWO_PI;const o=this._radiiSquared,u=o.x,c=o.y,s=o.z,d=u*c;return A(r,a,(function(e){const n=Math.cos(e),r=Math.sin(e);return Math.cos(e)*A(t,i,(function(e){const t=Math.cos(e),i=Math.sin(e);return Math.sqrt(d*r*r+s*(c*t*t+u*i*i)*n*n)}))}))},v.packedLength=9,v.pack=function(e,n,i){return i=t.defaultValue(i,0),n[i++]=e[0],n[i++]=e[1],n[i++]=e[2],n[i++]=e[3],n[i++]=e[4],n[i++]=e[5],n[i++]=e[6],n[i++]=e[7],n[i++]=e[8],n},v.unpack=function(e,n,i){return n=t.defaultValue(n,0),t.defined(i)||(i=new v),i[0]=e[n++],i[1]=e[n++],i[2]=e[n++],i[3]=e[n++],i[4]=e[n++],i[5]=e[n++],i[6]=e[n++],i[7]=e[n++],i[8]=e[n++],i},v.packArray=function(e,n){const i=e.length,r=9*i;t.defined(n)?(Array.isArray(n)||n.length===r)&&n.length!==r&&(n.length=r):n=new Array(r);for(let t=0;t<i;++t)v.pack(e[t],n,9*t);return n},v.unpackArray=function(e,n){const i=e.length;t.defined(n)?n.length=i/9:n=new Array(i/9);for(let t=0;t<i;t+=9){const i=t/9;n[i]=v.unpack(e,t,n[i])}return n},v.clone=function(e,n){if(t.defined(e))return t.defined(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n):new v(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8])},v.fromArray=v.unpack,v.fromColumnMajorArray=function(e,t){return v.clone(e,t)},v.fromRowMajorArray=function(e,n){return t.defined(n)?(n[0]=e[0],n[1]=e[3],n[2]=e[6],n[3]=e[1],n[4]=e[4],n[5]=e[7],n[6]=e[2],n[7]=e[5],n[8]=e[8],n):new v(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},v.fromQuaternion=function(e,n){const i=e.x*e.x,r=e.x*e.y,a=e.x*e.z,o=e.x*e.w,u=e.y*e.y,c=e.y*e.z,s=e.y*e.w,d=e.z*e.z,l=e.z*e.w,f=e.w*e.w,h=i-u-d+f,m=2*(r-l),y=2*(a+s),p=2*(r+l),g=-i+u-d+f,x=2*(c-o),z=2*(a-s),M=2*(c+o),w=-i-u+d+f;return t.defined(n)?(n[0]=h,n[1]=p,n[2]=z,n[3]=m,n[4]=g,n[5]=M,n[6]=y,n[7]=x,n[8]=w,n):new v(h,m,y,p,g,x,z,M,w)},v.fromHeadingPitchRoll=function(e,n){const i=Math.cos(-e.pitch),r=Math.cos(-e.heading),a=Math.cos(e.roll),o=Math.sin(-e.pitch),u=Math.sin(-e.heading),c=Math.sin(e.roll),s=i*r,d=-a*u+c*o*r,l=c*u+a*o*r,f=i*u,h=a*r+c*o*u,m=-c*r+a*o*u,y=-o,p=c*i,g=a*i;return t.defined(n)?(n[0]=s,n[1]=f,n[2]=y,n[3]=d,n[4]=h,n[5]=p,n[6]=l,n[7]=m,n[8]=g,n):new v(s,d,l,f,h,m,y,p,g)},v.fromScale=function(e,n){return t.defined(n)?(n[0]=e.x,n[1]=0,n[2]=0,n[3]=0,n[4]=e.y,n[5]=0,n[6]=0,n[7]=0,n[8]=e.z,n):new v(e.x,0,0,0,e.y,0,0,0,e.z)},v.fromUniformScale=function(e,n){return t.defined(n)?(n[0]=e,n[1]=0,n[2]=0,n[3]=0,n[4]=e,n[5]=0,n[6]=0,n[7]=0,n[8]=e,n):new v(e,0,0,0,e,0,0,0,e)},v.fromCrossProduct=function(e,n){return t.defined(n)?(n[0]=0,n[1]=e.z,n[2]=-e.y,n[3]=-e.z,n[4]=0,n[5]=e.x,n[6]=e.y,n[7]=-e.x,n[8]=0,n):new v(0,-e.z,e.y,e.z,0,-e.x,-e.y,e.x,0)},v.fromRotationX=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=i,n[5]=r,n[6]=0,n[7]=-r,n[8]=i,n):new v(1,0,0,0,i,-r,0,r,i)},v.fromRotationY=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=i,n[1]=0,n[2]=-r,n[3]=0,n[4]=1,n[5]=0,n[6]=r,n[7]=0,n[8]=i,n):new v(i,0,r,0,1,0,-r,0,i)},v.fromRotationZ=function(e,n){const i=Math.cos(e),r=Math.sin(e);return t.defined(n)?(n[0]=i,n[1]=r,n[2]=0,n[3]=-r,n[4]=i,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new v(i,-r,0,r,i,0,0,0,1)},v.toArray=function(e,n){return t.defined(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},v.getElementIndex=function(e,t){return 3*e+t},v.getColumn=function(e,t,n){const i=3*t,r=e[i],a=e[i+1],o=e[i+2];return n.x=r,n.y=a,n.z=o,n},v.setColumn=function(e,t,n,i){const r=3*t;return(i=v.clone(e,i))[r]=n.x,i[r+1]=n.y,i[r+2]=n.z,i},v.getRow=function(e,t,n){const i=e[t],r=e[t+3],a=e[t+6];return n.x=i,n.y=r,n.z=a,n},v.setRow=function(e,t,n,i){return(i=v.clone(e,i))[t]=n.x,i[t+3]=n.y,i[t+6]=n.z,i};const N=new i;v.setScale=function(e,t,n){const i=v.getScale(e,N),r=t.x/i.x,a=t.y/i.y,o=t.z/i.z;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};const I=new i;v.setUniformScale=function(e,t,n){const i=v.getScale(e,I),r=t/i.x,a=t/i.y,o=t/i.z;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*a,n[4]=e[4]*a,n[5]=e[5]*a,n[6]=e[6]*o,n[7]=e[7]*o,n[8]=e[8]*o,n};const V=new i;v.getScale=function(e,t){return t.x=i.magnitude(i.fromElements(e[0],e[1],e[2],V)),t.y=i.magnitude(i.fromElements(e[3],e[4],e[5],V)),t.z=i.magnitude(i.fromElements(e[6],e[7],e[8],V)),t};const U=new i;v.getMaximumScale=function(e){return v.getScale(e,U),i.maximumComponent(U)};const k=new i;v.setRotation=function(e,t,n){const i=v.getScale(e,k);return n[0]=t[0]*i.x,n[1]=t[1]*i.x,n[2]=t[2]*i.x,n[3]=t[3]*i.y,n[4]=t[4]*i.y,n[5]=t[5]*i.y,n[6]=t[6]*i.z,n[7]=t[7]*i.z,n[8]=t[8]*i.z,n};const L=new i;v.getRotation=function(e,t){const n=v.getScale(e,L);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[3]/n.y,t[4]=e[4]/n.y,t[5]=e[5]/n.y,t[6]=e[6]/n.z,t[7]=e[7]/n.z,t[8]=e[8]/n.z,t},v.multiply=function(e,t,n){const i=e[0]*t[0]+e[3]*t[1]+e[6]*t[2],r=e[1]*t[0]+e[4]*t[1]+e[7]*t[2],a=e[2]*t[0]+e[5]*t[1]+e[8]*t[2],o=e[0]*t[3]+e[3]*t[4]+e[6]*t[5],u=e[1]*t[3]+e[4]*t[4]+e[7]*t[5],c=e[2]*t[3]+e[5]*t[4]+e[8]*t[5],s=e[0]*t[6]+e[3]*t[7]+e[6]*t[8],d=e[1]*t[6]+e[4]*t[7]+e[7]*t[8],l=e[2]*t[6]+e[5]*t[7]+e[8]*t[8];return n[0]=i,n[1]=r,n[2]=a,n[3]=o,n[4]=u,n[5]=c,n[6]=s,n[7]=d,n[8]=l,n},v.add=function(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n},v.subtract=function(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n},v.multiplyByVector=function(e,t,n){const i=t.x,r=t.y,a=t.z,o=e[0]*i+e[3]*r+e[6]*a,u=e[1]*i+e[4]*r+e[7]*a,c=e[2]*i+e[5]*r+e[8]*a;return n.x=o,n.y=u,n.z=c,n},v.multiplyByScalar=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},v.multiplyByScale=function(e,t,n){return n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.x,n[3]=e[3]*t.y,n[4]=e[4]*t.y,n[5]=e[5]*t.y,n[6]=e[6]*t.z,n[7]=e[7]*t.z,n[8]=e[8]*t.z,n},v.multiplyByUniformScale=function(e,t,n){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n},v.negate=function(e,t){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t},v.transpose=function(e,t){const n=e[0],i=e[3],r=e[6],a=e[1],o=e[4],u=e[7],c=e[2],s=e[5],d=e[8];return t[0]=n,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=u,t[6]=c,t[7]=s,t[8]=d,t};const B=[1,0,0],j=[2,2,1];function $(e){let t=0;for(let n=0;n<3;++n){const i=e[v.getElementIndex(j[n],B[n])];t+=2*i*i}return Math.sqrt(t)}function P(e,t){const i=n.CesiumMath.EPSILON15;let r=0,a=1;for(let t=0;t<3;++t){const n=Math.abs(e[v.getElementIndex(j[t],B[t])]);n>r&&(a=t,r=n)}let o=1,u=0;const c=B[a],s=j[a];if(Math.abs(e[v.getElementIndex(s,c)])>i){const t=(e[v.getElementIndex(s,s)]-e[v.getElementIndex(c,c)])/2/e[v.getElementIndex(s,c)];let n;n=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),o=1/Math.sqrt(1+n*n),u=n*o}return(t=v.clone(v.IDENTITY,t))[v.getElementIndex(c,c)]=t[v.getElementIndex(s,s)]=o,t[v.getElementIndex(s,c)]=u,t[v.getElementIndex(c,s)]=-u,t}const D=new v,W=new v;v.computeEigenDecomposition=function(e,i){const r=n.CesiumMath.EPSILON20;let a=0,o=0;t.defined(i)||(i={});const u=i.unitary=v.clone(v.IDENTITY,i.unitary),c=i.diagonal=v.clone(e,i.diagonal),s=r*function(e){let t=0;for(let n=0;n<9;++n){const i=e[n];t+=i*i}return Math.sqrt(t)}(c);for(;o<10&&$(c)>s;)P(c,D),v.transpose(D,W),v.multiply(c,D,c),v.multiply(W,c,c),v.multiply(u,D,u),++a>2&&(++o,a=0);return i},v.abs=function(e,t){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},v.determinant=function(e){const t=e[0],n=e[3],i=e[6],r=e[1],a=e[4],o=e[7],u=e[2],c=e[5],s=e[8];return t*(a*s-c*o)+r*(c*i-n*s)+u*(n*o-a*i)},v.inverse=function(e,t){const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],u=e[5],c=e[6],s=e[7],d=e[8],l=v.determinant(e);t[0]=o*d-s*u,t[1]=s*r-i*d,t[2]=i*u-o*r,t[3]=c*u-a*d,t[4]=n*d-c*r,t[5]=a*r-n*u,t[6]=a*s-c*o,t[7]=c*i-n*s,t[8]=n*o-a*i;const f=1/l;return v.multiplyByScalar(t,f,t)};const Z=new v;v.inverseTranspose=function(e,t){return v.inverse(v.transpose(e,Z),t)},v.equals=function(e,n){return e===n||t.defined(e)&&t.defined(n)&&e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]&&e[3]===n[3]&&e[4]===n[4]&&e[5]===n[5]&&e[6]===n[6]&&e[7]===n[7]&&e[8]===n[8]},v.equalsEpsilon=function(e,n,i){return i=t.defaultValue(i,0),e===n||t.defined(e)&&t.defined(n)&&Math.abs(e[0]-n[0])<=i&&Math.abs(e[1]-n[1])<=i&&Math.abs(e[2]-n[2])<=i&&Math.abs(e[3]-n[3])<=i&&Math.abs(e[4]-n[4])<=i&&Math.abs(e[5]-n[5])<=i&&Math.abs(e[6]-n[6])<=i&&Math.abs(e[7]-n[7])<=i&&Math.abs(e[8]-n[8])<=i},v.IDENTITY=Object.freeze(new v(1,0,0,0,1,0,0,0,1)),v.ZERO=Object.freeze(new v(0,0,0,0,0,0,0,0,0)),v.COLUMN0ROW0=0,v.COLUMN0ROW1=1,v.COLUMN0ROW2=2,v.COLUMN1ROW0=3,v.COLUMN1ROW1=4,v.COLUMN1ROW2=5,v.COLUMN2ROW0=6,v.COLUMN2ROW1=7,v.COLUMN2ROW2=8,Object.defineProperties(v.prototype,{length:{get:function(){return v.packedLength}}}),v.prototype.clone=function(e){return v.clone(this,e)},v.prototype.equals=function(e){return v.equals(this,e)},v.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]},v.prototype.equalsEpsilon=function(e,t){return v.equalsEpsilon(this,e,t)},v.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})\n(${this[1]}, ${this[4]}, ${this[7]})\n(${this[2]}, ${this[5]}, ${this[8]})`},e.Cartesian3=i,e.Cartographic=y,e.Ellipsoid=q,e.Matrix3=v}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Transforms-c65aae74","./Matrix2-413c4048","./Matrix3-81054f0f","./defaultValue-f6d5e6da","./EllipsoidTangentPlane-4cf30b6c","./Math-2ce22ee9","./Plane-6add0ae1"],(function(a,t,e,n,r,i,s,o){"use strict";function C(a,t){this.center=n.Cartesian3.clone(r.defaultValue(a,n.Cartesian3.ZERO)),this.halfAxes=n.Matrix3.clone(r.defaultValue(t,n.Matrix3.ZERO))}C.packedLength=n.Cartesian3.packedLength+n.Matrix3.packedLength,C.pack=function(a,t,e){return e=r.defaultValue(e,0),n.Cartesian3.pack(a.center,t,e),n.Matrix3.pack(a.halfAxes,t,e+n.Cartesian3.packedLength),t},C.unpack=function(a,t,e){return t=r.defaultValue(t,0),r.defined(e)||(e=new C),n.Cartesian3.unpack(a,t,e.center),n.Matrix3.unpack(a,t+n.Cartesian3.packedLength,e.halfAxes),e};const c=new n.Cartesian3,u=new n.Cartesian3,l=new n.Cartesian3,d=new n.Cartesian3,h=new n.Cartesian3,x=new n.Cartesian3,m=new n.Matrix3,M={unitary:new n.Matrix3,diagonal:new n.Matrix3};C.fromPoints=function(a,t){if(r.defined(t)||(t=new C),!r.defined(a)||0===a.length)return t.halfAxes=n.Matrix3.ZERO,t.center=n.Cartesian3.ZERO,t;let e;const i=a.length,s=n.Cartesian3.clone(a[0],c);for(e=1;e<i;e++)n.Cartesian3.add(s,a[e],s);const o=1/i;n.Cartesian3.multiplyByScalar(s,o,s);let f,p=0,w=0,g=0,y=0,b=0,N=0;for(e=0;e<i;e++)f=n.Cartesian3.subtract(a[e],s,u),p+=f.x*f.x,w+=f.x*f.y,g+=f.x*f.z,y+=f.y*f.y,b+=f.y*f.z,N+=f.z*f.z;p*=o,w*=o,g*=o,y*=o,b*=o,N*=o;const T=m;T[0]=p,T[1]=w,T[2]=g,T[3]=w,T[4]=y,T[5]=b,T[6]=g,T[7]=b,T[8]=N;const O=n.Matrix3.computeEigenDecomposition(T,M),A=n.Matrix3.clone(O.unitary,t.halfAxes);let P=n.Matrix3.getColumn(A,0,d),I=n.Matrix3.getColumn(A,1,h),R=n.Matrix3.getColumn(A,2,x),E=-Number.MAX_VALUE,S=-Number.MAX_VALUE,U=-Number.MAX_VALUE,L=Number.MAX_VALUE,z=Number.MAX_VALUE,B=Number.MAX_VALUE;for(e=0;e<i;e++)f=a[e],E=Math.max(n.Cartesian3.dot(P,f),E),S=Math.max(n.Cartesian3.dot(I,f),S),U=Math.max(n.Cartesian3.dot(R,f),U),L=Math.min(n.Cartesian3.dot(P,f),L),z=Math.min(n.Cartesian3.dot(I,f),z),B=Math.min(n.Cartesian3.dot(R,f),B);P=n.Cartesian3.multiplyByScalar(P,.5*(L+E),P),I=n.Cartesian3.multiplyByScalar(I,.5*(z+S),I),R=n.Cartesian3.multiplyByScalar(R,.5*(B+U),R);const V=n.Cartesian3.add(P,I,t.center);n.Cartesian3.add(V,R,V);const _=l;return _.x=E-L,_.y=S-z,_.z=U-B,n.Cartesian3.multiplyByScalar(_,.5,_),n.Matrix3.multiplyByScale(t.halfAxes,_,t.halfAxes),t};const f=new n.Cartesian3,p=new n.Cartesian3;function w(a,t,e,i,s,o,c,u,l,d,h){r.defined(h)||(h=new C);const x=h.halfAxes;n.Matrix3.setColumn(x,0,t,x),n.Matrix3.setColumn(x,1,e,x),n.Matrix3.setColumn(x,2,i,x);let m=f;m.x=(s+o)/2,m.y=(c+u)/2,m.z=(l+d)/2;const M=p;M.x=(o-s)/2,M.y=(u-c)/2,M.z=(d-l)/2;const w=h.center;return m=n.Matrix3.multiplyByVector(x,m,m),n.Cartesian3.add(a,m,w),n.Matrix3.multiplyByScale(x,M,x),h}const g=new n.Cartographic,y=new n.Cartesian3,b=new n.Cartographic,N=new n.Cartographic,T=new n.Cartographic,O=new n.Cartographic,A=new n.Cartographic,P=new n.Cartesian3,I=new n.Cartesian3,R=new n.Cartesian3,E=new n.Cartesian3,S=new n.Cartesian3,U=new e.Cartesian2,L=new e.Cartesian2,z=new e.Cartesian2,B=new e.Cartesian2,V=new e.Cartesian2,_=new n.Cartesian3,k=new n.Cartesian3,W=new n.Cartesian3,X=new n.Cartesian3,q=new e.Cartesian2,D=new n.Cartesian3,j=new n.Cartesian3,Z=new n.Cartesian3,v=new o.Plane(n.Cartesian3.UNIT_X,0);C.fromRectangle=function(a,t,C,c,u){let l,d,h,x,m,M,f;if(t=r.defaultValue(t,0),C=r.defaultValue(C,0),c=r.defaultValue(c,n.Ellipsoid.WGS84),a.width<=s.CesiumMath.PI){const r=e.Rectangle.center(a,g),s=c.cartographicToCartesian(r,y),p=new i.EllipsoidTangentPlane(s,c);f=p.plane;const _=r.longitude,k=a.south<0&&a.north>0?0:r.latitude,W=n.Cartographic.fromRadians(_,a.north,C,b),X=n.Cartographic.fromRadians(a.west,a.north,C,N),q=n.Cartographic.fromRadians(a.west,k,C,T),D=n.Cartographic.fromRadians(a.west,a.south,C,O),j=n.Cartographic.fromRadians(_,a.south,C,A),Z=c.cartographicToCartesian(W,P);let v=c.cartographicToCartesian(X,I);const Y=c.cartographicToCartesian(q,R);let G=c.cartographicToCartesian(D,E);const F=c.cartographicToCartesian(j,S),H=p.projectPointToNearestOnPlane(Z,U),J=p.projectPointToNearestOnPlane(v,L),K=p.projectPointToNearestOnPlane(Y,z),Q=p.projectPointToNearestOnPlane(G,B),$=p.projectPointToNearestOnPlane(F,V);return l=Math.min(J.x,K.x,Q.x),d=-l,x=Math.max(J.y,H.y),h=Math.min(Q.y,$.y),X.height=D.height=t,v=c.cartographicToCartesian(X,I),G=c.cartographicToCartesian(D,E),m=Math.min(o.Plane.getPointDistance(f,v),o.Plane.getPointDistance(f,G)),M=C,w(p.origin,p.xAxis,p.yAxis,p.zAxis,l,d,h,x,m,M,u)}const p=a.south>0,Y=a.north<0,G=p?a.south:Y?a.north:0,F=e.Rectangle.center(a,g).longitude,H=n.Cartesian3.fromRadians(F,G,C,c,_);H.z=0;const J=Math.abs(H.x)<s.CesiumMath.EPSILON10&&Math.abs(H.y)<s.CesiumMath.EPSILON10?n.Cartesian3.UNIT_X:n.Cartesian3.normalize(H,k),K=n.Cartesian3.UNIT_Z,Q=n.Cartesian3.cross(J,K,W);f=o.Plane.fromPointNormal(H,J,v);const $=n.Cartesian3.fromRadians(F+s.CesiumMath.PI_OVER_TWO,G,C,c,X);d=n.Cartesian3.dot(o.Plane.projectPointOntoPlane(f,$,q),Q),l=-d,x=n.Cartesian3.fromRadians(0,a.north,Y?t:C,c,D).z,h=n.Cartesian3.fromRadians(0,a.south,p?t:C,c,j).z;const aa=n.Cartesian3.fromRadians(a.east,G,C,c,Z);return m=o.Plane.getPointDistance(f,aa),M=0,w(H,Q,K,J,l,d,h,x,m,M,u)},C.fromTransformation=function(a,t){return r.defined(t)||(t=new C),t.center=e.Matrix4.getTranslation(a,t.center),t.halfAxes=e.Matrix4.getMatrix3(a,t.halfAxes),t.halfAxes=n.Matrix3.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t},C.clone=function(a,t){if(r.defined(a))return r.defined(t)?(n.Cartesian3.clone(a.center,t.center),n.Matrix3.clone(a.halfAxes,t.halfAxes),t):new C(a.center,a.halfAxes)},C.intersectPlane=function(a,e){const r=a.center,i=e.normal,s=a.halfAxes,o=i.x,C=i.y,c=i.z,u=Math.abs(o*s[n.Matrix3.COLUMN0ROW0]+C*s[n.Matrix3.COLUMN0ROW1]+c*s[n.Matrix3.COLUMN0ROW2])+Math.abs(o*s[n.Matrix3.COLUMN1ROW0]+C*s[n.Matrix3.COLUMN1ROW1]+c*s[n.Matrix3.COLUMN1ROW2])+Math.abs(o*s[n.Matrix3.COLUMN2ROW0]+C*s[n.Matrix3.COLUMN2ROW1]+c*s[n.Matrix3.COLUMN2ROW2]),l=n.Cartesian3.dot(i,r)+e.distance;return l<=-u?t.Intersect.OUTSIDE:l>=u?t.Intersect.INSIDE:t.Intersect.INTERSECTING};const Y=new n.Cartesian3,G=new n.Cartesian3,F=new n.Cartesian3,H=new n.Cartesian3,J=new n.Cartesian3,K=new n.Cartesian3;C.distanceSquaredTo=function(a,t){const e=n.Cartesian3.subtract(t,a.center,f),r=a.halfAxes;let i=n.Matrix3.getColumn(r,0,Y),o=n.Matrix3.getColumn(r,1,G),C=n.Matrix3.getColumn(r,2,F);const c=n.Cartesian3.magnitude(i),u=n.Cartesian3.magnitude(o),l=n.Cartesian3.magnitude(C);let d=!0,h=!0,x=!0;c>0?n.Cartesian3.divideByScalar(i,c,i):d=!1,u>0?n.Cartesian3.divideByScalar(o,u,o):h=!1,l>0?n.Cartesian3.divideByScalar(C,l,C):x=!1;const m=!d+!h+!x;let M,p,w;if(1===m){let a=i;M=o,p=C,h?x||(a=C,p=i):(a=o,M=i),w=n.Cartesian3.cross(M,p,J),a===i?i=w:a===o?o=w:a===C&&(C=w)}else if(2===m){M=i,h?M=o:x&&(M=C);let a=n.Cartesian3.UNIT_Y;a.equalsEpsilon(M,s.CesiumMath.EPSILON3)&&(a=n.Cartesian3.UNIT_X),p=n.Cartesian3.cross(M,a,H),n.Cartesian3.normalize(p,p),w=n.Cartesian3.cross(M,p,J),n.Cartesian3.normalize(w,w),M===i?(o=p,C=w):M===o?(C=p,i=w):M===C&&(i=p,o=w)}else 3===m&&(i=n.Cartesian3.UNIT_X,o=n.Cartesian3.UNIT_Y,C=n.Cartesian3.UNIT_Z);const g=K;g.x=n.Cartesian3.dot(e,i),g.y=n.Cartesian3.dot(e,o),g.z=n.Cartesian3.dot(e,C);let y,b=0;return g.x<-c?(y=g.x+c,b+=y*y):g.x>c&&(y=g.x-c,b+=y*y),g.y<-u?(y=g.y+u,b+=y*y):g.y>u&&(y=g.y-u,b+=y*y),g.z<-l?(y=g.z+l,b+=y*y):g.z>l&&(y=g.z-l,b+=y*y),b};const Q=new n.Cartesian3,$=new n.Cartesian3;C.computePlaneDistances=function(a,e,i,s){r.defined(s)||(s=new t.Interval);let o=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY;const c=a.center,u=a.halfAxes,l=n.Matrix3.getColumn(u,0,Y),d=n.Matrix3.getColumn(u,1,G),h=n.Matrix3.getColumn(u,2,F),x=n.Cartesian3.add(l,d,Q);n.Cartesian3.add(x,h,x),n.Cartesian3.add(x,c,x);const m=n.Cartesian3.subtract(x,e,$);let M=n.Cartesian3.dot(i,m);return o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.add(c,l,x),n.Cartesian3.add(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.add(c,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.add(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.add(c,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.subtract(c,l,x),n.Cartesian3.add(x,d,x),n.Cartesian3.add(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.subtract(c,l,x),n.Cartesian3.add(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.subtract(c,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.add(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),n.Cartesian3.subtract(c,l,x),n.Cartesian3.subtract(x,d,x),n.Cartesian3.subtract(x,h,x),n.Cartesian3.subtract(x,e,m),M=n.Cartesian3.dot(i,m),o=Math.min(M,o),C=Math.max(M,C),s.start=o,s.stop=C,s};const aa=new n.Cartesian3,ta=new n.Cartesian3,ea=new n.Cartesian3;C.computeCorners=function(a,t){r.defined(t)||(t=[new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3,new n.Cartesian3]);const e=a.center,i=a.halfAxes,s=n.Matrix3.getColumn(i,0,aa),o=n.Matrix3.getColumn(i,1,ta),C=n.Matrix3.getColumn(i,2,ea);return n.Cartesian3.clone(e,t[0]),n.Cartesian3.subtract(t[0],s,t[0]),n.Cartesian3.subtract(t[0],o,t[0]),n.Cartesian3.subtract(t[0],C,t[0]),n.Cartesian3.clone(e,t[1]),n.Cartesian3.subtract(t[1],s,t[1]),n.Cartesian3.subtract(t[1],o,t[1]),n.Cartesian3.add(t[1],C,t[1]),n.Cartesian3.clone(e,t[2]),n.Cartesian3.subtract(t[2],s,t[2]),n.Cartesian3.add(t[2],o,t[2]),n.Cartesian3.subtract(t[2],C,t[2]),n.Cartesian3.clone(e,t[3]),n.Cartesian3.subtract(t[3],s,t[3]),n.Cartesian3.add(t[3],o,t[3]),n.Cartesian3.add(t[3],C,t[3]),n.Cartesian3.clone(e,t[4]),n.Cartesian3.add(t[4],s,t[4]),n.Cartesian3.subtract(t[4],o,t[4]),n.Cartesian3.subtract(t[4],C,t[4]),n.Cartesian3.clone(e,t[5]),n.Cartesian3.add(t[5],s,t[5]),n.Cartesian3.subtract(t[5],o,t[5]),n.Cartesian3.add(t[5],C,t[5]),n.Cartesian3.clone(e,t[6]),n.Cartesian3.add(t[6],s,t[6]),n.Cartesian3.add(t[6],o,t[6]),n.Cartesian3.subtract(t[6],C,t[6]),n.Cartesian3.clone(e,t[7]),n.Cartesian3.add(t[7],s,t[7]),n.Cartesian3.add(t[7],o,t[7]),n.Cartesian3.add(t[7],C,t[7]),t};const na=new n.Matrix3;C.computeTransformation=function(a,t){r.defined(t)||(t=new e.Matrix4);const i=a.center,s=n.Matrix3.multiplyByUniformScale(a.halfAxes,2,na);return e.Matrix4.fromRotationTranslation(s,i,t)};const ra=new t.BoundingSphere;C.isOccluded=function(a,e){const n=t.BoundingSphere.fromOrientedBoundingBox(a,ra);return!e.isBoundingSphereVisible(n)},C.prototype.intersectPlane=function(a){return C.intersectPlane(this,a)},C.prototype.distanceSquaredTo=function(a){return C.distanceSquaredTo(this,a)},C.prototype.computePlaneDistances=function(a,t,e){return C.computePlaneDistances(this,a,t,e)},C.prototype.computeCorners=function(a){return C.computeCorners(this,a)},C.prototype.computeTransformation=function(a){return C.computeTransformation(this,a)},C.prototype.isOccluded=function(a){return C.isOccluded(this,a)},C.equals=function(a,t){return a===t||r.defined(a)&&r.defined(t)&&n.Cartesian3.equals(a.center,t.center)&&n.Matrix3.equals(a.halfAxes,t.halfAxes)},C.prototype.clone=function(a){return C.clone(this,a)},C.prototype.equals=function(a){return C.equals(this,a)},a.OrientedBoundingBox=C}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Transforms-bf323bcf","./Matrix2-1509208a","./RuntimeError-ac440aa5","./defaultValue-69ee94f4","./EllipsoidTangentPlane-330be9cc","./ComponentDatatype-a9820060","./Plane-e3daa19b"],(function(a,t,e,n,r,i,s,o){"use strict";function c(a,t){this.center=e.Cartesian3.clone(r.defaultValue(a,e.Cartesian3.ZERO)),this.halfAxes=e.Matrix3.clone(r.defaultValue(t,e.Matrix3.ZERO))}c.packedLength=e.Cartesian3.packedLength+e.Matrix3.packedLength,c.pack=function(a,t,n){return n=r.defaultValue(n,0),e.Cartesian3.pack(a.center,t,n),e.Matrix3.pack(a.halfAxes,t,n+e.Cartesian3.packedLength),t},c.unpack=function(a,t,n){return t=r.defaultValue(t,0),r.defined(n)||(n=new c),e.Cartesian3.unpack(a,t,n.center),e.Matrix3.unpack(a,t+e.Cartesian3.packedLength,n.halfAxes),n};const C=new e.Cartesian3,u=new e.Cartesian3,l=new e.Cartesian3,d=new e.Cartesian3,h=new e.Cartesian3,x=new e.Cartesian3,m=new e.Matrix3,f={unitary:new e.Matrix3,diagonal:new e.Matrix3};c.fromPoints=function(a,t){if(r.defined(t)||(t=new c),!r.defined(a)||0===a.length)return t.halfAxes=e.Matrix3.ZERO,t.center=e.Cartesian3.ZERO,t;let n;const i=a.length,s=e.Cartesian3.clone(a[0],C);for(n=1;n<i;n++)e.Cartesian3.add(s,a[n],s);const o=1/i;e.Cartesian3.multiplyByScalar(s,o,s);let M,p=0,w=0,g=0,y=0,b=0,N=0;for(n=0;n<i;n++)M=e.Cartesian3.subtract(a[n],s,u),p+=M.x*M.x,w+=M.x*M.y,g+=M.x*M.z,y+=M.y*M.y,b+=M.y*M.z,N+=M.z*M.z;p*=o,w*=o,g*=o,y*=o,b*=o,N*=o;const T=m;T[0]=p,T[1]=w,T[2]=g,T[3]=w,T[4]=y,T[5]=b,T[6]=g,T[7]=b,T[8]=N;const O=e.Matrix3.computeEigenDecomposition(T,f),A=e.Matrix3.clone(O.unitary,t.halfAxes);let P=e.Matrix3.getColumn(A,0,d),I=e.Matrix3.getColumn(A,1,h),R=e.Matrix3.getColumn(A,2,x),E=-Number.MAX_VALUE,S=-Number.MAX_VALUE,U=-Number.MAX_VALUE,L=Number.MAX_VALUE,z=Number.MAX_VALUE,B=Number.MAX_VALUE;for(n=0;n<i;n++)M=a[n],E=Math.max(e.Cartesian3.dot(P,M),E),S=Math.max(e.Cartesian3.dot(I,M),S),U=Math.max(e.Cartesian3.dot(R,M),U),L=Math.min(e.Cartesian3.dot(P,M),L),z=Math.min(e.Cartesian3.dot(I,M),z),B=Math.min(e.Cartesian3.dot(R,M),B);P=e.Cartesian3.multiplyByScalar(P,.5*(L+E),P),I=e.Cartesian3.multiplyByScalar(I,.5*(z+S),I),R=e.Cartesian3.multiplyByScalar(R,.5*(B+U),R);const V=e.Cartesian3.add(P,I,t.center);e.Cartesian3.add(V,R,V);const _=l;return _.x=E-L,_.y=S-z,_.z=U-B,e.Cartesian3.multiplyByScalar(_,.5,_),e.Matrix3.multiplyByScale(t.halfAxes,_,t.halfAxes),t};const M=new e.Cartesian3,p=new e.Cartesian3;function w(a,t,n,i,s,o,C,u,l,d,h){r.defined(h)||(h=new c);const x=h.halfAxes;e.Matrix3.setColumn(x,0,t,x),e.Matrix3.setColumn(x,1,n,x),e.Matrix3.setColumn(x,2,i,x);let m=M;m.x=(s+o)/2,m.y=(C+u)/2,m.z=(l+d)/2;const f=p;f.x=(o-s)/2,f.y=(u-C)/2,f.z=(d-l)/2;const w=h.center;return m=e.Matrix3.multiplyByVector(x,m,m),e.Cartesian3.add(a,m,w),e.Matrix3.multiplyByScale(x,f,x),h}const g=new e.Cartographic,y=new e.Cartesian3,b=new e.Cartographic,N=new e.Cartographic,T=new e.Cartographic,O=new e.Cartographic,A=new e.Cartographic,P=new e.Cartesian3,I=new e.Cartesian3,R=new e.Cartesian3,E=new e.Cartesian3,S=new e.Cartesian3,U=new e.Cartesian2,L=new e.Cartesian2,z=new e.Cartesian2,B=new e.Cartesian2,V=new e.Cartesian2,_=new e.Cartesian3,k=new e.Cartesian3,W=new e.Cartesian3,D=new e.Cartesian3,X=new e.Cartesian2,q=new e.Cartesian3,j=new e.Cartesian3,Z=new e.Cartesian3,v=new o.Plane(e.Cartesian3.UNIT_X,0);c.fromRectangle=function(a,t,n,c,C){let u,l,d,h,x,m,f;if(t=r.defaultValue(t,0),n=r.defaultValue(n,0),c=r.defaultValue(c,e.Ellipsoid.WGS84),a.width<=s.CesiumMath.PI){const r=e.Rectangle.center(a,g),s=c.cartographicToCartesian(r,y),M=new i.EllipsoidTangentPlane(s,c);f=M.plane;const p=r.longitude,_=a.south<0&&a.north>0?0:r.latitude,k=e.Cartographic.fromRadians(p,a.north,n,b),W=e.Cartographic.fromRadians(a.west,a.north,n,N),D=e.Cartographic.fromRadians(a.west,_,n,T),X=e.Cartographic.fromRadians(a.west,a.south,n,O),q=e.Cartographic.fromRadians(p,a.south,n,A),j=c.cartographicToCartesian(k,P);let Z=c.cartographicToCartesian(W,I);const v=c.cartographicToCartesian(D,R);let Y=c.cartographicToCartesian(X,E);const G=c.cartographicToCartesian(q,S),F=M.projectPointToNearestOnPlane(j,U),H=M.projectPointToNearestOnPlane(Z,L),J=M.projectPointToNearestOnPlane(v,z),K=M.projectPointToNearestOnPlane(Y,B),Q=M.projectPointToNearestOnPlane(G,V);return u=Math.min(H.x,J.x,K.x),l=-u,h=Math.max(H.y,F.y),d=Math.min(K.y,Q.y),W.height=X.height=t,Z=c.cartographicToCartesian(W,I),Y=c.cartographicToCartesian(X,E),x=Math.min(o.Plane.getPointDistance(f,Z),o.Plane.getPointDistance(f,Y)),m=n,w(M.origin,M.xAxis,M.yAxis,M.zAxis,u,l,d,h,x,m,C)}const M=a.south>0,p=a.north<0,Y=M?a.south:p?a.north:0,G=e.Rectangle.center(a,g).longitude,F=e.Cartesian3.fromRadians(G,Y,n,c,_);F.z=0;const H=Math.abs(F.x)<s.CesiumMath.EPSILON10&&Math.abs(F.y)<s.CesiumMath.EPSILON10?e.Cartesian3.UNIT_X:e.Cartesian3.normalize(F,k),J=e.Cartesian3.UNIT_Z,K=e.Cartesian3.cross(H,J,W);f=o.Plane.fromPointNormal(F,H,v);const Q=e.Cartesian3.fromRadians(G+s.CesiumMath.PI_OVER_TWO,Y,n,c,D);l=e.Cartesian3.dot(o.Plane.projectPointOntoPlane(f,Q,X),K),u=-l,h=e.Cartesian3.fromRadians(0,a.north,p?t:n,c,q).z,d=e.Cartesian3.fromRadians(0,a.south,M?t:n,c,j).z;const $=e.Cartesian3.fromRadians(a.east,Y,n,c,Z);return x=o.Plane.getPointDistance(f,$),m=0,w(F,K,J,H,u,l,d,h,x,m,C)},c.fromTransformation=function(a,t){return r.defined(t)||(t=new c),t.center=e.Matrix4.getTranslation(a,t.center),t.halfAxes=e.Matrix4.getMatrix3(a,t.halfAxes),t.halfAxes=e.Matrix3.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t},c.clone=function(a,t){if(r.defined(a))return r.defined(t)?(e.Cartesian3.clone(a.center,t.center),e.Matrix3.clone(a.halfAxes,t.halfAxes),t):new c(a.center,a.halfAxes)},c.intersectPlane=function(a,n){const r=a.center,i=n.normal,s=a.halfAxes,o=i.x,c=i.y,C=i.z,u=Math.abs(o*s[e.Matrix3.COLUMN0ROW0]+c*s[e.Matrix3.COLUMN0ROW1]+C*s[e.Matrix3.COLUMN0ROW2])+Math.abs(o*s[e.Matrix3.COLUMN1ROW0]+c*s[e.Matrix3.COLUMN1ROW1]+C*s[e.Matrix3.COLUMN1ROW2])+Math.abs(o*s[e.Matrix3.COLUMN2ROW0]+c*s[e.Matrix3.COLUMN2ROW1]+C*s[e.Matrix3.COLUMN2ROW2]),l=e.Cartesian3.dot(i,r)+n.distance;return l<=-u?t.Intersect.OUTSIDE:l>=u?t.Intersect.INSIDE:t.Intersect.INTERSECTING};const Y=new e.Cartesian3,G=new e.Cartesian3,F=new e.Cartesian3,H=new e.Cartesian3,J=new e.Cartesian3,K=new e.Cartesian3;c.distanceSquaredTo=function(a,t){const n=e.Cartesian3.subtract(t,a.center,M),r=a.halfAxes;let i=e.Matrix3.getColumn(r,0,Y),o=e.Matrix3.getColumn(r,1,G),c=e.Matrix3.getColumn(r,2,F);const C=e.Cartesian3.magnitude(i),u=e.Cartesian3.magnitude(o),l=e.Cartesian3.magnitude(c);let d=!0,h=!0,x=!0;C>0?e.Cartesian3.divideByScalar(i,C,i):d=!1,u>0?e.Cartesian3.divideByScalar(o,u,o):h=!1,l>0?e.Cartesian3.divideByScalar(c,l,c):x=!1;const m=!d+!h+!x;let f,p,w;if(1===m){let a=i;f=o,p=c,h?x||(a=c,p=i):(a=o,f=i),w=e.Cartesian3.cross(f,p,J),a===i?i=w:a===o?o=w:a===c&&(c=w)}else if(2===m){f=i,h?f=o:x&&(f=c);let a=e.Cartesian3.UNIT_Y;a.equalsEpsilon(f,s.CesiumMath.EPSILON3)&&(a=e.Cartesian3.UNIT_X),p=e.Cartesian3.cross(f,a,H),e.Cartesian3.normalize(p,p),w=e.Cartesian3.cross(f,p,J),e.Cartesian3.normalize(w,w),f===i?(o=p,c=w):f===o?(c=p,i=w):f===c&&(i=p,o=w)}else 3===m&&(i=e.Cartesian3.UNIT_X,o=e.Cartesian3.UNIT_Y,c=e.Cartesian3.UNIT_Z);const g=K;g.x=e.Cartesian3.dot(n,i),g.y=e.Cartesian3.dot(n,o),g.z=e.Cartesian3.dot(n,c);let y,b=0;return g.x<-C?(y=g.x+C,b+=y*y):g.x>C&&(y=g.x-C,b+=y*y),g.y<-u?(y=g.y+u,b+=y*y):g.y>u&&(y=g.y-u,b+=y*y),g.z<-l?(y=g.z+l,b+=y*y):g.z>l&&(y=g.z-l,b+=y*y),b};const Q=new e.Cartesian3,$=new e.Cartesian3;c.computePlaneDistances=function(a,n,i,s){r.defined(s)||(s=new t.Interval);let o=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;const C=a.center,u=a.halfAxes,l=e.Matrix3.getColumn(u,0,Y),d=e.Matrix3.getColumn(u,1,G),h=e.Matrix3.getColumn(u,2,F),x=e.Cartesian3.add(l,d,Q);e.Cartesian3.add(x,h,x),e.Cartesian3.add(x,C,x);const m=e.Cartesian3.subtract(x,n,$);let f=e.Cartesian3.dot(i,m);return o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.add(C,l,x),e.Cartesian3.add(x,d,x),e.Cartesian3.subtract(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.add(C,l,x),e.Cartesian3.subtract(x,d,x),e.Cartesian3.add(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.add(C,l,x),e.Cartesian3.subtract(x,d,x),e.Cartesian3.subtract(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.subtract(C,l,x),e.Cartesian3.add(x,d,x),e.Cartesian3.add(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.subtract(C,l,x),e.Cartesian3.add(x,d,x),e.Cartesian3.subtract(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.subtract(C,l,x),e.Cartesian3.subtract(x,d,x),e.Cartesian3.add(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),e.Cartesian3.subtract(C,l,x),e.Cartesian3.subtract(x,d,x),e.Cartesian3.subtract(x,h,x),e.Cartesian3.subtract(x,n,m),f=e.Cartesian3.dot(i,m),o=Math.min(f,o),c=Math.max(f,c),s.start=o,s.stop=c,s};const aa=new e.Cartesian3,ta=new e.Cartesian3,ea=new e.Cartesian3;c.computeCorners=function(a,t){r.defined(t)||(t=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3]);const n=a.center,i=a.halfAxes,s=e.Matrix3.getColumn(i,0,aa),o=e.Matrix3.getColumn(i,1,ta),c=e.Matrix3.getColumn(i,2,ea);return e.Cartesian3.clone(n,t[0]),e.Cartesian3.subtract(t[0],s,t[0]),e.Cartesian3.subtract(t[0],o,t[0]),e.Cartesian3.subtract(t[0],c,t[0]),e.Cartesian3.clone(n,t[1]),e.Cartesian3.subtract(t[1],s,t[1]),e.Cartesian3.subtract(t[1],o,t[1]),e.Cartesian3.add(t[1],c,t[1]),e.Cartesian3.clone(n,t[2]),e.Cartesian3.subtract(t[2],s,t[2]),e.Cartesian3.add(t[2],o,t[2]),e.Cartesian3.subtract(t[2],c,t[2]),e.Cartesian3.clone(n,t[3]),e.Cartesian3.subtract(t[3],s,t[3]),e.Cartesian3.add(t[3],o,t[3]),e.Cartesian3.add(t[3],c,t[3]),e.Cartesian3.clone(n,t[4]),e.Cartesian3.add(t[4],s,t[4]),e.Cartesian3.subtract(t[4],o,t[4]),e.Cartesian3.subtract(t[4],c,t[4]),e.Cartesian3.clone(n,t[5]),e.Cartesian3.add(t[5],s,t[5]),e.Cartesian3.subtract(t[5],o,t[5]),e.Cartesian3.add(t[5],c,t[5]),e.Cartesian3.clone(n,t[6]),e.Cartesian3.add(t[6],s,t[6]),e.Cartesian3.add(t[6],o,t[6]),e.Cartesian3.subtract(t[6],c,t[6]),e.Cartesian3.clone(n,t[7]),e.Cartesian3.add(t[7],s,t[7]),e.Cartesian3.add(t[7],o,t[7]),e.Cartesian3.add(t[7],c,t[7]),t};const na=new e.Matrix3;c.computeTransformation=function(a,t){r.defined(t)||(t=new e.Matrix4);const n=a.center,i=e.Matrix3.multiplyByUniformScale(a.halfAxes,2,na);return e.Matrix4.fromRotationTranslation(i,n,t)};const ra=new t.BoundingSphere;c.isOccluded=function(a,e){const n=t.BoundingSphere.fromOrientedBoundingBox(a,ra);return!e.isBoundingSphereVisible(n)},c.prototype.intersectPlane=function(a){return c.intersectPlane(this,a)},c.prototype.distanceSquaredTo=function(a){return c.distanceSquaredTo(this,a)},c.prototype.computePlaneDistances=function(a,t,e){return c.computePlaneDistances(this,a,t,e)},c.prototype.computeCorners=function(a){return c.computeCorners(this,a)},c.prototype.computeTransformation=function(a){return c.computeTransformation(this,a)},c.prototype.isOccluded=function(a){return c.isOccluded(this,a)},c.equals=function(a,t){return a===t||r.defined(a)&&r.defined(t)&&e.Cartesian3.equals(a.center,t.center)&&e.Matrix3.equals(a.halfAxes,t.halfAxes)},c.prototype.clone=function(a){return c.clone(this,a)},c.prototype.equals=function(a){return c.equals(this,a)},a.OrientedBoundingBox=c}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix3-81054f0f","./Matrix2-413c4048","./defaultValue-f6d5e6da"],(function(n,e,a,t){"use strict";function r(n,a){this.normal=e.Cartesian3.clone(n),this.distance=a}r.fromPointNormal=function(n,a,i){const s=-e.Cartesian3.dot(a,n);return t.defined(i)?(e.Cartesian3.clone(a,i.normal),i.distance=s,i):new r(a,s)};const i=new e.Cartesian3;r.fromCartesian4=function(n,a){const s=e.Cartesian3.fromCartesian4(n,i),o=n.w;return t.defined(a)?(e.Cartesian3.clone(s,a.normal),a.distance=o,a):new r(s,o)},r.getPointDistance=function(n,a){return e.Cartesian3.dot(n.normal,a)+n.distance};const s=new e.Cartesian3;r.projectPointOntoPlane=function(n,a,i){t.defined(i)||(i=new e.Cartesian3);const o=r.getPointDistance(n,a),c=e.Cartesian3.multiplyByScalar(n.normal,o,s);return e.Cartesian3.subtract(a,c,i)};const o=new a.Matrix4,c=new a.Cartesian4,l=new e.Cartesian3;r.transform=function(n,t,i){const s=n.normal,C=n.distance,d=a.Matrix4.inverseTranspose(t,o);let f=a.Cartesian4.fromElements(s.x,s.y,s.z,C,c);f=a.Matrix4.multiplyByVector(d,f,f);const u=e.Cartesian3.fromCartesian4(f,l);return f=a.Cartesian4.divideByScalar(f,e.Cartesian3.magnitude(u),f),r.fromCartesian4(f,i)},r.clone=function(n,a){return t.defined(a)?(e.Cartesian3.clone(n.normal,a.normal),a.distance=n.distance,a):new r(n.normal,n.distance)},r.equals=function(n,a){return n.distance===a.distance&&e.Cartesian3.equals(n.normal,a.normal)},r.ORIGIN_XY_PLANE=Object.freeze(new r(e.Cartesian3.UNIT_Z,0)),r.ORIGIN_YZ_PLANE=Object.freeze(new r(e.Cartesian3.UNIT_X,0)),r.ORIGIN_ZX_PLANE=Object.freeze(new r(e.Cartesian3.UNIT_Y,0)),n.Plane=r}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-1509208a","./RuntimeError-ac440aa5","./defaultValue-69ee94f4","./ComponentDatatype-a9820060"],(function(n,e,a,t,r){"use strict";function i(n,a){this.normal=e.Cartesian3.clone(n),this.distance=a}i.fromPointNormal=function(n,a,r){const s=-e.Cartesian3.dot(a,n);return t.defined(r)?(e.Cartesian3.clone(a,r.normal),r.distance=s,r):new i(a,s)};const s=new e.Cartesian3;i.fromCartesian4=function(n,a){const r=e.Cartesian3.fromCartesian4(n,s),o=n.w;return t.defined(a)?(e.Cartesian3.clone(r,a.normal),a.distance=o,a):new i(r,o)},i.getPointDistance=function(n,a){return e.Cartesian3.dot(n.normal,a)+n.distance};const o=new e.Cartesian3;i.projectPointOntoPlane=function(n,a,r){t.defined(r)||(r=new e.Cartesian3);const s=i.getPointDistance(n,a),c=e.Cartesian3.multiplyByScalar(n.normal,s,o);return e.Cartesian3.subtract(a,c,r)};const c=new e.Matrix4,l=new e.Cartesian4,C=new e.Cartesian3;i.transform=function(n,a,t){const r=n.normal,s=n.distance,o=e.Matrix4.inverseTranspose(a,c);let f=e.Cartesian4.fromElements(r.x,r.y,r.z,s,l);f=e.Matrix4.multiplyByVector(o,f,f);const u=e.Cartesian3.fromCartesian4(f,C);return f=e.Cartesian4.divideByScalar(f,e.Cartesian3.magnitude(u),f),i.fromCartesian4(f,t)},i.clone=function(n,a){return t.defined(a)?(e.Cartesian3.clone(n.normal,a.normal),a.distance=n.distance,a):new i(n.normal,n.distance)},i.equals=function(n,a){return n.distance===a.distance&&e.Cartesian3.equals(n.normal,a.normal)},i.ORIGIN_XY_PLANE=Object.freeze(new i(e.Cartesian3.UNIT_Z,0)),i.ORIGIN_YZ_PLANE=Object.freeze(new i(e.Cartesian3.UNIT_X,0)),i.ORIGIN_ZX_PLANE=Object.freeze(new i(e.Cartesian3.UNIT_Y,0)),n.Plane=i}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./ArcType-e1641d8d","./arrayRemoveDuplicates-fe254feb","./Matrix2-1509208a","./ComponentDatatype-a9820060","./defaultValue-69ee94f4","./EllipsoidRhumbLine-7b6199fa","./GeometryAttribute-71155085","./GeometryAttributes-1b4134a9","./GeometryPipeline-b15e7fd0","./IndexDatatype-1cbc8622","./PolygonPipeline-32699305","./Transforms-bf323bcf"],(function(e,t,n,i,o,r,a,s,c,l,u,h,f){"use strict";function p(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(p.prototype,{length:{get:function(){return this._length}}}),p.prototype.enqueue=function(e){this._array.push(e),this._length++},p.prototype.dequeue=function(){if(0===this._length)return;const e=this._array;let t=this._offset;const n=e[t];return e[t]=void 0,t++,t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n},p.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},p.prototype.contains=function(e){return-1!==this._array.indexOf(e)},p.prototype.clear=function(){this._array.length=this._offset=this._length=0},p.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};const d={computeHierarchyPackedLength:function(e){let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(!r.defined(e))continue;t+=2;const o=e.positions,a=e.holes;if(r.defined(o)&&(t+=o.length*i.Cartesian3.packedLength),r.defined(a)){const e=a.length;for(let t=0;t<e;++t)n.push(a[t])}}return t},packPolygonHierarchy:function(e,t,n){const o=[e];for(;o.length>0;){const e=o.pop();if(!r.defined(e))continue;const a=e.positions,s=e.holes;if(t[n++]=r.defined(a)?a.length:0,t[n++]=r.defined(s)?s.length:0,r.defined(a)){const e=a.length;for(let o=0;o<e;++o,n+=3)i.Cartesian3.pack(a[o],t,n)}if(r.defined(s)){const e=s.length;for(let t=0;t<e;++t)o.push(s[t])}}return n},unpackPolygonHierarchy:function(e,t){const n=e[t++],o=e[t++],r=new Array(n),a=o>0?new Array(o):void 0;for(let o=0;o<n;++o,t+=i.Cartesian3.packedLength)r[o]=i.Cartesian3.unpack(e,t);for(let n=0;n<o;++n)a[n]=d.unpackPolygonHierarchy(e,t),t=a[n].startingIndex,delete a[n].startingIndex;return{positions:r,holes:a,startingIndex:t}}},y=new i.Cartesian3;function g(e,t,n,o){return i.Cartesian3.subtract(t,e,y),i.Cartesian3.multiplyByScalar(y,n/o,y),i.Cartesian3.add(e,y,y),[y.x,y.y,y.z]}d.subdivideLineCount=function(e,t,n){const r=i.Cartesian3.distance(e,t)/n,a=Math.max(0,Math.ceil(o.CesiumMath.log2(r)));return Math.pow(2,a)};const m=new i.Cartographic,C=new i.Cartographic,b=new i.Cartographic,T=new i.Cartesian3;d.subdivideRhumbLineCount=function(e,t,n,i){const r=e.cartesianToCartographic(t,m),s=e.cartesianToCartographic(n,C),c=new a.EllipsoidRhumbLine(r,s,e).surfaceDistance/i,l=Math.max(0,Math.ceil(o.CesiumMath.log2(c)));return Math.pow(2,l)},d.subdivideLine=function(e,t,n,o){const a=d.subdivideLineCount(e,t,n),s=i.Cartesian3.distance(e,t),c=s/a;r.defined(o)||(o=[]);const l=o;l.length=3*a;let u=0;for(let n=0;n<a;n++){const i=g(e,t,n*c,s);l[u++]=i[0],l[u++]=i[1],l[u++]=i[2]}return l},d.subdivideRhumbLine=function(e,t,n,i,s){const c=e.cartesianToCartographic(t,m),l=e.cartesianToCartographic(n,C),u=new a.EllipsoidRhumbLine(c,l,e),h=u.surfaceDistance/i,f=Math.max(0,Math.ceil(o.CesiumMath.log2(h))),p=Math.pow(2,f),d=u.surfaceDistance/p;r.defined(s)||(s=[]);const y=s;y.length=3*p;let g=0;for(let t=0;t<p;t++){const n=u.interpolateUsingSurfaceDistance(t*d,b),i=e.cartographicToCartesian(n,T);y[g++]=i.x,y[g++]=i.y,y[g++]=i.z}return y};const w=new i.Cartesian3,I=new i.Cartesian3,x=new i.Cartesian3,v=new i.Cartesian3;d.scaleToGeodeticHeightExtruded=function(e,t,n,o,a){o=r.defaultValue(o,i.Ellipsoid.WGS84);const s=w;let c=I;const l=x;let u=v;if(r.defined(e)&&r.defined(e.attributes)&&r.defined(e.attributes.position)){const r=e.attributes.position.values,h=r.length/2;for(let e=0;e<h;e+=3)i.Cartesian3.fromArray(r,e,l),o.geodeticSurfaceNormal(l,s),u=o.scaleToGeodeticSurface(l,u),c=i.Cartesian3.multiplyByScalar(s,n,c),c=i.Cartesian3.add(u,c,c),r[e+h]=c.x,r[e+1+h]=c.y,r[e+2+h]=c.z,a&&(u=i.Cartesian3.clone(l,u)),c=i.Cartesian3.multiplyByScalar(s,t,c),c=i.Cartesian3.add(u,c,c),r[e]=c.x,r[e+1]=c.y,r[e+2]=c.z}return e},d.polygonOutlinesFromHierarchy=function(e,t,o){const a=[],s=new p;let c,l,u;for(s.enqueue(e);0!==s.length;){const e=s.dequeue();let h=e.positions;if(t)for(u=h.length,c=0;c<u;c++)o.scaleToGeodeticSurface(h[c],h[c]);if(h=n.arrayRemoveDuplicates(h,i.Cartesian3.equalsEpsilon,!0),h.length<3)continue;const f=e.holes?e.holes.length:0;for(c=0;c<f;c++){const h=e.holes[c];let f=h.positions;if(t)for(u=f.length,l=0;l<u;++l)o.scaleToGeodeticSurface(f[l],f[l]);if(f=n.arrayRemoveDuplicates(f,i.Cartesian3.equalsEpsilon,!0),f.length<3)continue;a.push(f);let p=0;for(r.defined(h.holes)&&(p=h.holes.length),l=0;l<p;l++)s.enqueue(h.holes[l])}a.push(h)}return a},d.polygonsFromHierarchy=function(e,t,o,a){const s=[],c=[],l=new p;for(l.enqueue(e);0!==l.length;){const e=l.dequeue();let u=e.positions;const f=e.holes;let p,d;if(o)for(d=u.length,p=0;p<d;p++)a.scaleToGeodeticSurface(u[p],u[p]);if(u=n.arrayRemoveDuplicates(u,i.Cartesian3.equalsEpsilon,!0),u.length<3)continue;let y=t(u);if(!r.defined(y))continue;const g=[];let m=h.PolygonPipeline.computeWindingOrder2D(y);m===h.WindingOrder.CLOCKWISE&&(y.reverse(),u=u.slice().reverse());let C=u.slice();const b=r.defined(f)?f.length:0,T=[];let w;for(p=0;p<b;p++){const e=f[p];let s=e.positions;if(o)for(d=s.length,w=0;w<d;++w)a.scaleToGeodeticSurface(s[w],s[w]);if(s=n.arrayRemoveDuplicates(s,i.Cartesian3.equalsEpsilon,!0),s.length<3)continue;const c=t(s);if(!r.defined(c))continue;m=h.PolygonPipeline.computeWindingOrder2D(c),m===h.WindingOrder.CLOCKWISE&&(c.reverse(),s=s.slice().reverse()),T.push(s),g.push(C.length),C=C.concat(s),y=y.concat(c);let u=0;for(r.defined(e.holes)&&(u=e.holes.length),w=0;w<u;w++)l.enqueue(e.holes[w])}s.push({outerRing:u,holes:T}),c.push({positions:C,positions2D:y,holes:g})}return{hierarchy:s,polygons:c}};const E=new i.Cartesian2,A=new i.Cartesian3,P=new f.Quaternion,_=new i.Matrix3;d.computeBoundingRectangle=function(e,t,n,o,a){const s=f.Quaternion.fromAxisAngle(e,o,P),c=i.Matrix3.fromQuaternion(s,_);let l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY;const d=n.length;for(let e=0;e<d;++e){const o=i.Cartesian3.clone(n[e],A);i.Matrix3.multiplyByVector(c,o,o);const a=t(o,E);r.defined(a)&&(l=Math.min(l,a.x),u=Math.max(u,a.x),h=Math.min(h,a.y),p=Math.max(p,a.y))}return a.x=l,a.y=h,a.width=u-l,a.height=p-h,a},d.createGeometryFromPositions=function(e,n,i,r,a,c){let u=h.PolygonPipeline.triangulate(n.positions2D,n.holes);u.length<3&&(u=[0,1,2]);const f=n.positions;if(r){const e=f.length,t=new Array(3*e);let n=0;for(let i=0;i<e;i++){const e=f[i];t[n++]=e.x,t[n++]=e.y,t[n++]=e.z}const i=new s.Geometry({attributes:{position:new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t})},indices:u,primitiveType:s.PrimitiveType.TRIANGLES});return a.normal?l.GeometryPipeline.computeNormal(i):i}return c===t.ArcType.GEODESIC?h.PolygonPipeline.computeSubdivision(e,f,u,i):c===t.ArcType.RHUMB?h.PolygonPipeline.computeRhumbLineSubdivision(e,f,u,i):void 0};const G=[],L=new i.Cartesian3,M=new i.Cartesian3;d.computeWallGeometry=function(e,n,r,a,l){let h,f,p,y,g,m=e.length,C=0;if(a)for(f=3*m*2,h=new Array(2*f),p=0;p<m;p++)y=e[p],g=e[(p+1)%m],h[C]=h[C+f]=y.x,++C,h[C]=h[C+f]=y.y,++C,h[C]=h[C+f]=y.z,++C,h[C]=h[C+f]=g.x,++C,h[C]=h[C+f]=g.y,++C,h[C]=h[C+f]=g.z,++C;else{const i=o.CesiumMath.chordLength(r,n.maximumRadius);let a=0;if(l===t.ArcType.GEODESIC)for(p=0;p<m;p++)a+=d.subdivideLineCount(e[p],e[(p+1)%m],i);else if(l===t.ArcType.RHUMB)for(p=0;p<m;p++)a+=d.subdivideRhumbLineCount(n,e[p],e[(p+1)%m],i);for(f=3*(a+m),h=new Array(2*f),p=0;p<m;p++){let o;y=e[p],g=e[(p+1)%m],l===t.ArcType.GEODESIC?o=d.subdivideLine(y,g,i,G):l===t.ArcType.RHUMB&&(o=d.subdivideRhumbLine(n,y,g,i,G));const r=o.length;for(let e=0;e<r;++e,++C)h[C]=o[e],h[C+f]=o[e];h[C]=g.x,h[C+f]=g.x,++C,h[C]=g.y,h[C+f]=g.y,++C,h[C]=g.z,h[C+f]=g.z,++C}}m=h.length;const b=u.IndexDatatype.createTypedArray(m/3,m-6*e.length);let T=0;for(m/=6,p=0;p<m;p++){const e=p,t=e+1,n=e+m,r=n+1;y=i.Cartesian3.fromArray(h,3*e,L),g=i.Cartesian3.fromArray(h,3*t,M),i.Cartesian3.equalsEpsilon(y,g,o.CesiumMath.EPSILON10,o.CesiumMath.EPSILON10)||(b[T++]=e,b[T++]=n,b[T++]=t,b[T++]=t,b[T++]=n,b[T++]=r)}return new s.Geometry({attributes:new c.GeometryAttributes({position:new s.GeometryAttribute({componentDatatype:o.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h})}),indices:b,primitiveType:s.PrimitiveType.TRIANGLES})},e.PolygonGeometryLibrary=d}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./ArcType-26a3f38d","./arrayRemoveDuplicates-9b636830","./Matrix2-413c4048","./Matrix3-81054f0f","./ComponentDatatype-ab629b88","./defaultValue-f6d5e6da","./EllipsoidRhumbLine-77eff028","./GeometryAttribute-b10c5c29","./GeometryAttributes-1e4ddcd2","./GeometryPipeline-5926bf6a","./IndexDatatype-d3db4e7d","./Math-2ce22ee9","./PolygonPipeline-e8d27f39","./Transforms-c65aae74"],(function(e,t,n,i,o,r,a,s,c,l,u,h,p,d,f){"use strict";function y(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(y.prototype,{length:{get:function(){return this._length}}}),y.prototype.enqueue=function(e){this._array.push(e),this._length++},y.prototype.dequeue=function(){if(0===this._length)return;const e=this._array;let t=this._offset;const n=e[t];return e[t]=void 0,t++,t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,n},y.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},y.prototype.contains=function(e){return-1!==this._array.indexOf(e)},y.prototype.clear=function(){this._array.length=this._offset=this._length=0},y.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};const g={computeHierarchyPackedLength:function(e,t){let n=0;const i=[e];for(;i.length>0;){const e=i.pop();if(!a.defined(e))continue;n+=2;const o=e.positions,r=e.holes;if(a.defined(o)&&o.length>0&&(n+=o.length*t.packedLength),a.defined(r)){const e=r.length;for(let t=0;t<e;++t)i.push(r[t])}}return n},packPolygonHierarchy:function(e,t,n,i){const o=[e];for(;o.length>0;){const e=o.pop();if(!a.defined(e))continue;const r=e.positions,s=e.holes;if(t[n++]=a.defined(r)?r.length:0,t[n++]=a.defined(s)?s.length:0,a.defined(r)){const e=r.length;for(let o=0;o<e;++o,n+=i.packedLength)i.pack(r[o],t,n)}if(a.defined(s)){const e=s.length;for(let t=0;t<e;++t)o.push(s[t])}}return n},unpackPolygonHierarchy:function(e,t,n){const i=e[t++],o=e[t++],r=new Array(i),a=o>0?new Array(o):void 0;for(let o=0;o<i;++o,t+=n.packedLength)r[o]=n.unpack(e,t);for(let i=0;i<o;++i)a[i]=g.unpackPolygonHierarchy(e,t,n),t=a[i].startingIndex,delete a[i].startingIndex;return{positions:r,holes:a,startingIndex:t}}},m=new i.Cartesian2;function C(e,t,n,o){return i.Cartesian2.subtract(t,e,m),i.Cartesian2.multiplyByScalar(m,n/o,m),i.Cartesian2.add(e,m,m),[m.x,m.y]}const b=new o.Cartesian3;function x(e,t,n,i){return o.Cartesian3.subtract(t,e,b),o.Cartesian3.multiplyByScalar(b,n/i,b),o.Cartesian3.add(e,b,b),[b.x,b.y,b.z]}g.subdivideLineCount=function(e,t,n){const i=o.Cartesian3.distance(e,t)/n,r=Math.max(0,Math.ceil(p.CesiumMath.log2(i)));return Math.pow(2,r)};const T=new o.Cartographic,v=new o.Cartographic,w=new o.Cartographic,A=new o.Cartesian3,L=new s.EllipsoidRhumbLine;g.subdivideRhumbLineCount=function(e,t,n,i){const o=e.cartesianToCartographic(t,T),r=e.cartesianToCartographic(n,v),a=new s.EllipsoidRhumbLine(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(p.CesiumMath.log2(a)));return Math.pow(2,c)},g.subdivideTexcoordLine=function(e,t,n,o,r,a){const s=g.subdivideLineCount(n,o,r),c=i.Cartesian2.distance(e,t),l=c/s,u=a;u.length=2*s;let h=0;for(let n=0;n<s;n++){const i=C(e,t,n*l,c);u[h++]=i[0],u[h++]=i[1]}return u},g.subdivideLine=function(e,t,n,i){const r=g.subdivideLineCount(e,t,n),s=o.Cartesian3.distance(e,t),c=s/r;a.defined(i)||(i=[]);const l=i;l.length=3*r;let u=0;for(let n=0;n<r;n++){const i=x(e,t,n*c,s);l[u++]=i[0],l[u++]=i[1],l[u++]=i[2]}return l},g.subdivideTexcoordRhumbLine=function(e,t,n,o,r,a,s){const c=n.cartesianToCartographic(o,T),l=n.cartesianToCartographic(r,v);L.setEndPoints(c,l);const u=L.surfaceDistance/a,h=Math.max(0,Math.ceil(p.CesiumMath.log2(u))),d=Math.pow(2,h),f=i.Cartesian2.distance(e,t),y=f/d,g=s;g.length=2*d;let m=0;for(let n=0;n<d;n++){const i=C(e,t,n*y,f);g[m++]=i[0],g[m++]=i[1]}return g},g.subdivideRhumbLine=function(e,t,n,i,o){const r=e.cartesianToCartographic(t,T),c=e.cartesianToCartographic(n,v),l=new s.EllipsoidRhumbLine(r,c,e),u=l.surfaceDistance/i,h=Math.max(0,Math.ceil(p.CesiumMath.log2(u))),d=Math.pow(2,h),f=l.surfaceDistance/d;a.defined(o)||(o=[]);const y=o;y.length=3*d;let g=0;for(let t=0;t<d;t++){const n=l.interpolateUsingSurfaceDistance(t*f,w),i=e.cartographicToCartesian(n,A);y[g++]=i.x,y[g++]=i.y,y[g++]=i.z}return y};const E=new o.Cartesian3,I=new o.Cartesian3,M=new o.Cartesian3,P=new o.Cartesian3;g.scaleToGeodeticHeightExtruded=function(e,t,n,i,r){i=a.defaultValue(i,o.Ellipsoid.WGS84);const s=E;let c=I;const l=M;let u=P;if(a.defined(e)&&a.defined(e.attributes)&&a.defined(e.attributes.position)){const a=e.attributes.position.values,h=a.length/2;for(let e=0;e<h;e+=3)o.Cartesian3.fromArray(a,e,l),i.geodeticSurfaceNormal(l,s),u=i.scaleToGeodeticSurface(l,u),c=o.Cartesian3.multiplyByScalar(s,n,c),c=o.Cartesian3.add(u,c,c),a[e+h]=c.x,a[e+1+h]=c.y,a[e+2+h]=c.z,r&&(u=o.Cartesian3.clone(l,u)),c=o.Cartesian3.multiplyByScalar(s,t,c),c=o.Cartesian3.add(u,c,c),a[e]=c.x,a[e+1]=c.y,a[e+2]=c.z}return e},g.polygonOutlinesFromHierarchy=function(e,t,i){const r=[],s=new y;let c,l,u;for(s.enqueue(e);0!==s.length;){const e=s.dequeue();let h=e.positions;if(t)for(u=h.length,c=0;c<u;c++)i.scaleToGeodeticSurface(h[c],h[c]);if(h=n.arrayRemoveDuplicates(h,o.Cartesian3.equalsEpsilon,!0),h.length<3)continue;const p=e.holes?e.holes.length:0;for(c=0;c<p;c++){const h=e.holes[c];let p=h.positions;if(t)for(u=p.length,l=0;l<u;++l)i.scaleToGeodeticSurface(p[l],p[l]);if(p=n.arrayRemoveDuplicates(p,o.Cartesian3.equalsEpsilon,!0),p.length<3)continue;r.push(p);let d=0;for(a.defined(h.holes)&&(d=h.holes.length),l=0;l<d;l++)s.enqueue(h.holes[l])}r.push(h)}return r},g.polygonsFromHierarchy=function(e,t,i,r,s){const c=[],l=[],u=new y;for(u.enqueue(e);0!==u.length;){const e=u.dequeue();let h=e.positions;const p=e.holes;let f,y;if(r)for(y=h.length,f=0;f<y;f++)s.scaleToGeodeticSurface(h[f],h[f]);if(t||(h=n.arrayRemoveDuplicates(h,o.Cartesian3.equalsEpsilon,!0)),h.length<3)continue;let g=i(h);if(!a.defined(g))continue;const m=[];let C=d.PolygonPipeline.computeWindingOrder2D(g);C===d.WindingOrder.CLOCKWISE&&(g.reverse(),h=h.slice().reverse());let b=h.slice();const x=a.defined(p)?p.length:0,T=[];let v;for(f=0;f<x;f++){const e=p[f];let c=e.positions;if(r)for(y=c.length,v=0;v<y;++v)s.scaleToGeodeticSurface(c[v],c[v]);if(t||(c=n.arrayRemoveDuplicates(c,o.Cartesian3.equalsEpsilon,!0)),c.length<3)continue;const l=i(c);if(!a.defined(l))continue;C=d.PolygonPipeline.computeWindingOrder2D(l),C===d.WindingOrder.CLOCKWISE&&(l.reverse(),c=c.slice().reverse()),T.push(c),m.push(b.length),b=b.concat(c),g=g.concat(l);let h=0;for(a.defined(e.holes)&&(h=e.holes.length),v=0;v<h;v++)u.enqueue(e.holes[v])}c.push({outerRing:h,holes:T}),l.push({positions:b,positions2D:g,holes:m})}return{hierarchy:c,polygons:l}};const D=new i.Cartesian2,_=new o.Cartesian3,G=new f.Quaternion,S=new o.Matrix3;g.computeBoundingRectangle=function(e,t,n,i,r){const s=f.Quaternion.fromAxisAngle(e,i,G),c=o.Matrix3.fromQuaternion(s,S);let l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY;const d=n.length;for(let e=0;e<d;++e){const i=o.Cartesian3.clone(n[e],_);o.Matrix3.multiplyByVector(c,i,i);const r=t(i,D);a.defined(r)&&(l=Math.min(l,r.x),u=Math.max(u,r.x),h=Math.min(h,r.y),p=Math.max(p,r.y))}return r.x=l,r.y=h,r.width=u-l,r.height=p-h,r},g.createGeometryFromPositions=function(e,n,o,s,l,h,p){let f=d.PolygonPipeline.triangulate(n.positions2D,n.holes);f.length<3&&(f=[0,1,2]);const y=n.positions,g=a.defined(o),m=g?o.positions:void 0;if(l){const e=y.length,t=new Array(3*e);let n=0;for(let i=0;i<e;i++){const e=y[i];t[n++]=e.x,t[n++]=e.y,t[n++]=e.z}const o={attributes:{position:new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:t})},indices:f,primitiveType:c.PrimitiveType.TRIANGLES};g&&(o.attributes.st=new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:i.Cartesian2.packArray(m)}));const a=new c.Geometry(o);return h.normal?u.GeometryPipeline.computeNormal(a):a}return p===t.ArcType.GEODESIC?d.PolygonPipeline.computeSubdivision(e,y,f,m,s):p===t.ArcType.RHUMB?d.PolygonPipeline.computeRhumbLineSubdivision(e,y,f,m,s):void 0};const R=[],N=[],O=new o.Cartesian3,q=new o.Cartesian3;g.computeWallGeometry=function(e,n,i,s,u,d){let f,y,m,C,b,x,T,v,w,A=e.length,L=0,E=0;const I=a.defined(n),M=I?n.positions:void 0;if(u)for(y=3*A*2,f=new Array(2*y),I&&(w=2*A*2,v=new Array(2*w)),m=0;m<A;m++)C=e[m],b=e[(m+1)%A],f[L]=f[L+y]=C.x,++L,f[L]=f[L+y]=C.y,++L,f[L]=f[L+y]=C.z,++L,f[L]=f[L+y]=b.x,++L,f[L]=f[L+y]=b.y,++L,f[L]=f[L+y]=b.z,++L,I&&(x=M[m],T=M[(m+1)%A],v[E]=v[E+w]=x.x,++E,v[E]=v[E+w]=x.y,++E,v[E]=v[E+w]=T.x,++E,v[E]=v[E+w]=T.y,++E);else{const n=p.CesiumMath.chordLength(s,i.maximumRadius);let o=0;if(d===t.ArcType.GEODESIC)for(m=0;m<A;m++)o+=g.subdivideLineCount(e[m],e[(m+1)%A],n);else if(d===t.ArcType.RHUMB)for(m=0;m<A;m++)o+=g.subdivideRhumbLineCount(i,e[m],e[(m+1)%A],n);for(y=3*(o+A),f=new Array(2*y),I&&(w=2*(o+A),v=new Array(2*w)),m=0;m<A;m++){let o,r;C=e[m],b=e[(m+1)%A],I&&(x=M[m],T=M[(m+1)%A]),d===t.ArcType.GEODESIC?(o=g.subdivideLine(C,b,n,N),I&&(r=g.subdivideTexcoordLine(x,T,C,b,n,R))):d===t.ArcType.RHUMB&&(o=g.subdivideRhumbLine(i,C,b,n,N),I&&(r=g.subdivideTexcoordRhumbLine(x,T,i,C,b,n,R)));const a=o.length;for(let e=0;e<a;++e,++L)f[L]=o[e],f[L+y]=o[e];if(f[L]=b.x,f[L+y]=b.x,++L,f[L]=b.y,f[L+y]=b.y,++L,f[L]=b.z,f[L+y]=b.z,++L,I){const e=r.length;for(let t=0;t<e;++t,++E)v[E]=r[t],v[E+w]=r[t];v[E]=T.x,v[E+w]=T.x,++E,v[E]=T.y,v[E+w]=T.y,++E}}}A=f.length;const P=h.IndexDatatype.createTypedArray(A/3,A-6*e.length);let D=0;for(A/=6,m=0;m<A;m++){const e=m,t=e+1,n=e+A,i=n+1;C=o.Cartesian3.fromArray(f,3*e,O),b=o.Cartesian3.fromArray(f,3*t,q),o.Cartesian3.equalsEpsilon(C,b,p.CesiumMath.EPSILON10,p.CesiumMath.EPSILON10)||(P[D++]=e,P[D++]=n,P[D++]=t,P[D++]=t,P[D++]=n,P[D++]=i)}const _={attributes:new l.GeometryAttributes({position:new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})}),indices:P,primitiveType:c.PrimitiveType.TRIANGLES};I&&(_.attributes.st=new c.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v}));return new c.Geometry(_)};var k=g;e.PolygonGeometryLibrary=k}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-1509208a","./RuntimeError-ac440aa5","./ComponentDatatype-a9820060","./defaultValue-69ee94f4","./EllipsoidRhumbLine-7b6199fa","./GeometryAttribute-71155085","./WebGLConstants-f63312fc"],(function(e,t,n,r,i,a,u,x){"use strict";var o=p,s=p;function p(e,t,n){n=n||2;var r,i,a,u,x,o,s,p=t&&t.length,y=p?t[0]*n:e.length,c=l(e,0,y,n,!0),v=[];if(!c||c.next===c.prev)return v;if(p&&(c=function(e,t,n,r){var i,a,u,x=[];for(i=0,a=t.length;i<a;i++)(u=l(e,t[i]*r,i<a-1?t[i+1]*r:e.length,r,!1))===u.next&&(u.steiner=!0),x.push(E(u));for(x.sort(m),i=0;i<x.length;i++)n=h(n=C(x[i],n),n.next);return n}(e,t,c,n)),e.length>80*n){r=a=e[0],i=u=e[1];for(var d=n;d<y;d+=n)(x=e[d])<r&&(r=x),(o=e[d+1])<i&&(i=o),x>a&&(a=x),o>u&&(u=o);s=0!==(s=Math.max(a-r,u-i))?1/s:0}return f(c,v,n,r,i,s),v}function l(e,t,n,r,i){var a,u;if(i===W(e,t,n,r)>0)for(a=t;a<n;a+=r)u=G(a,e[a],e[a+1],u);else for(a=n-r;a>=t;a-=r)u=G(a,e[a],e[a+1],u);return u&&S(u,u.next)&&(O(u),u=u.next),u}function h(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!S(r,r.next)&&0!==Z(r.prev,r,r.next))r=r.next;else{if(O(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function f(e,t,n,r,i,a,u){if(e){!u&&a&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=w(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,u,x,o,s=1;do{for(n=e,e=null,a=null,u=0;n;){for(u++,r=n,x=0,t=0;t<s&&(x++,r=r.nextZ);t++);for(o=s;x>0||o>0&&r;)0!==x&&(0===o||!r||n.z<=r.z)?(i=n,n=n.nextZ,x--):(i=r,r=r.nextZ,o--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,s*=2}while(u>1)}(i)}(e,r,i,a);for(var x,o,s=e;e.prev!==e.next;)if(x=e.prev,o=e.next,a?c(e,r,i,a):y(e))t.push(x.i/n),t.push(e.i/n),t.push(o.i/n),O(e),e=o.next,s=o.next;else if((e=o)===s){u?1===u?f(e=v(h(e),t,n),t,n,r,i,a,2):2===u&&d(e,t,n,r,i,a):f(h(e),t,n,r,i,a,1);break}}}function y(e){var t=e.prev,n=e,r=e.next;if(Z(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(b(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Z(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function c(e,t,n,r){var i=e.prev,a=e,u=e.next;if(Z(i,a,u)>=0)return!1;for(var x=i.x<a.x?i.x<u.x?i.x:u.x:a.x<u.x?a.x:u.x,o=i.y<a.y?i.y<u.y?i.y:u.y:a.y<u.y?a.y:u.y,s=i.x>a.x?i.x>u.x?i.x:u.x:a.x>u.x?a.x:u.x,p=i.y>a.y?i.y>u.y?i.y:u.y:a.y>u.y?a.y:u.y,l=w(x,o,t,n,r),h=w(s,p,t,n,r),f=e.prevZ,y=e.nextZ;f&&f.z>=l&&y&&y.z<=h;){if(f!==e.prev&&f!==e.next&&b(i.x,i.y,a.x,a.y,u.x,u.y,f.x,f.y)&&Z(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,y!==e.prev&&y!==e.next&&b(i.x,i.y,a.x,a.y,u.x,u.y,y.x,y.y)&&Z(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;f&&f.z>=l;){if(f!==e.prev&&f!==e.next&&b(i.x,i.y,a.x,a.y,u.x,u.y,f.x,f.y)&&Z(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;y&&y.z<=h;){if(y!==e.prev&&y!==e.next&&b(i.x,i.y,a.x,a.y,u.x,u.y,y.x,y.y)&&Z(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function v(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!S(i,a)&&A(i,r,r.next,a)&&L(i,a)&&L(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),O(r),O(r.next),r=e=a),r=r.next}while(r!==e);return h(r)}function d(e,t,n,r,i,a){var u=e;do{for(var x=u.next.next;x!==u.prev;){if(u.i!==x.i&&M(u,x)){var o=D(u,x);return u=h(u,u.next),o=h(o,o.next),f(u,t,n,r,i,a),void f(o,t,n,r,i,a)}x=x.next}u=u.next}while(u!==e)}function m(e,t){return e.x-t.x}function C(e,t){var n=function(e,t){var n,r=t,i=e.x,a=e.y,u=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var x=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(x<=i&&x>u){if(u=x,x===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===u)return n;var o,s=n,p=n.x,l=n.y,h=1/0;r=n;do{i>=r.x&&r.x>=p&&i!==r.x&&b(a<l?i:u,a,p,l,a<l?u:i,a,r.x,r.y)&&(o=Math.abs(a-r.y)/(i-r.x),L(r,e)&&(o<h||o===h&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,h=o)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=D(n,e),i=h(n,n.next);return h(r,r.next),t===n?i:t}function g(e,t){return Z(e.prev,e,t.prev)<0&&Z(t.next,e,e.next)<0}function w(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function E(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function b(e,t,n,r,i,a,u,x){return(i-u)*(t-x)-(e-u)*(a-x)>=0&&(e-u)*(r-x)-(n-u)*(t-x)>=0&&(n-u)*(a-x)-(i-u)*(r-x)>=0}function M(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(L(e,t)&&L(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Z(e.prev,e,t.prev)||Z(e,t.prev,t))||S(e,t)&&Z(e.prev,e,e.next)>0&&Z(t.prev,t,t.next)>0)}function Z(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function S(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var i=R(Z(e,t,n)),a=R(Z(e,t,r)),u=R(Z(n,r,e)),x=R(Z(n,r,t));return i!==a&&u!==x||(!(0!==i||!z(e,n,t))||(!(0!==a||!z(e,r,t))||(!(0!==u||!z(n,e,r))||!(0!==x||!z(n,t,r)))))}function z(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function R(e){return e>0?1:e<0?-1:0}function L(e,t){return Z(e.prev,e,e.next)<0?Z(e,t,e.next)>=0&&Z(e,e.prev,t)>=0:Z(e,t,e.prev)<0||Z(e,e.next,t)<0}function D(e,t){var n=new T(e.i,e.x,e.y),r=new T(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function G(e,t,n,r){var i=new T(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function O(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function T(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function W(e,t,n,r){for(var i=0,a=t,u=n-r;a<n;a+=r)i+=(e[u]-e[a])*(e[a+1]+e[u+1]),u=a;return i}p.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,u=Math.abs(W(e,0,a,n));if(i)for(var x=0,o=t.length;x<o;x++){var s=t[x]*n,p=x<o-1?t[x+1]*n:e.length;u-=Math.abs(W(e,s,p,n))}var l=0;for(x=0;x<r.length;x+=3){var h=r[x]*n,f=r[x+1]*n,y=r[x+2]*n;l+=Math.abs((e[h]-e[y])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[y+1]-e[h+1]))}return 0===u&&0===l?0:Math.abs((l-u)/u)},p.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var u=0;u<t;u++)n.vertices.push(e[i][a][u]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n},o.default=s;const $={CLOCKWISE:x.WebGLConstants.CW,COUNTER_CLOCKWISE:x.WebGLConstants.CCW,validate:function(e){return e===$.CLOCKWISE||e===$.COUNTER_CLOCKWISE}};var P=Object.freeze($);const I=new t.Cartesian3,B=new t.Cartesian3,N={computeArea2D:function(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++){const t=e[r],a=e[i];n+=t.x*a.y-a.x*t.y}return.5*n},computeWindingOrder2D:function(e){return N.computeArea2D(e)>0?P.COUNTER_CLOCKWISE:P.CLOCKWISE},triangulate:function(e,n){const r=t.Cartesian2.packArray(e);return o(r,n,2)}},U=new t.Cartesian3,_=new t.Cartesian3,K=new t.Cartesian3,V=new t.Cartesian3,k=new t.Cartesian3,q=new t.Cartesian3,F=new t.Cartesian3;N.computeSubdivision=function(e,n,a,x){x=i.defaultValue(x,r.CesiumMath.RADIANS_PER_DEGREE);const o=a.slice(0);let s;const p=n.length,l=new Array(3*p);let h=0;for(s=0;s<p;s++){const e=n[s];l[h++]=e.x,l[h++]=e.y,l[h++]=e.z}const f=[],y={},c=e.maximumRadius,v=r.CesiumMath.chordLength(x,c),d=v*v;for(;o.length>0;){const e=o.pop(),n=o.pop(),r=o.pop(),a=t.Cartesian3.fromArray(l,3*r,U),u=t.Cartesian3.fromArray(l,3*n,_),x=t.Cartesian3.fromArray(l,3*e,K),p=t.Cartesian3.multiplyByScalar(t.Cartesian3.normalize(a,V),c,V),h=t.Cartesian3.multiplyByScalar(t.Cartesian3.normalize(u,k),c,k),v=t.Cartesian3.multiplyByScalar(t.Cartesian3.normalize(x,q),c,q),m=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(p,h,F)),C=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(h,v,F)),g=t.Cartesian3.magnitudeSquared(t.Cartesian3.subtract(v,p,F)),w=Math.max(m,C,g);let E,b;w>d?m===w?(E=`${Math.min(r,n)} ${Math.max(r,n)}`,s=y[E],i.defined(s)||(b=t.Cartesian3.add(a,u,F),t.Cartesian3.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),s=l.length/3-1,y[E]=s),o.push(r,s,e),o.push(s,n,e)):C===w?(E=`${Math.min(n,e)} ${Math.max(n,e)}`,s=y[E],i.defined(s)||(b=t.Cartesian3.add(u,x,F),t.Cartesian3.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),s=l.length/3-1,y[E]=s),o.push(n,s,r),o.push(s,e,r)):g===w&&(E=`${Math.min(e,r)} ${Math.max(e,r)}`,s=y[E],i.defined(s)||(b=t.Cartesian3.add(x,a,F),t.Cartesian3.multiplyByScalar(b,.5,b),l.push(b.x,b.y,b.z),s=l.length/3-1,y[E]=s),o.push(e,s,n),o.push(s,r,n)):(f.push(r),f.push(n),f.push(e))}return new u.Geometry({attributes:{position:new u.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})},indices:f,primitiveType:u.PrimitiveType.TRIANGLES})};const j=new t.Cartographic,H=new t.Cartographic,J=new t.Cartographic,Q=new t.Cartographic;N.computeRhumbLineSubdivision=function(e,n,x,o){o=i.defaultValue(o,r.CesiumMath.RADIANS_PER_DEGREE);const s=x.slice(0);let p;const l=n.length,h=new Array(3*l);let f=0;for(p=0;p<l;p++){const e=n[p];h[f++]=e.x,h[f++]=e.y,h[f++]=e.z}const y=[],c={},v=e.maximumRadius,d=r.CesiumMath.chordLength(o,v),m=new a.EllipsoidRhumbLine(void 0,void 0,e),C=new a.EllipsoidRhumbLine(void 0,void 0,e),g=new a.EllipsoidRhumbLine(void 0,void 0,e);for(;s.length>0;){const n=s.pop(),r=s.pop(),a=s.pop(),u=t.Cartesian3.fromArray(h,3*a,U),x=t.Cartesian3.fromArray(h,3*r,_),o=t.Cartesian3.fromArray(h,3*n,K),l=e.cartesianToCartographic(u,j),f=e.cartesianToCartographic(x,H),v=e.cartesianToCartographic(o,J);m.setEndPoints(l,f);const w=m.surfaceDistance;C.setEndPoints(f,v);const E=C.surfaceDistance;g.setEndPoints(v,l);const b=g.surfaceDistance,M=Math.max(w,E,b);let Z,S,A,z;M>d?w===M?(Z=`${Math.min(a,r)} ${Math.max(a,r)}`,p=c[Z],i.defined(p)||(S=m.interpolateUsingFraction(.5,Q),A=.5*(l.height+f.height),z=t.Cartesian3.fromRadians(S.longitude,S.latitude,A,e,F),h.push(z.x,z.y,z.z),p=h.length/3-1,c[Z]=p),s.push(a,p,n),s.push(p,r,n)):E===M?(Z=`${Math.min(r,n)} ${Math.max(r,n)}`,p=c[Z],i.defined(p)||(S=C.interpolateUsingFraction(.5,Q),A=.5*(f.height+v.height),z=t.Cartesian3.fromRadians(S.longitude,S.latitude,A,e,F),h.push(z.x,z.y,z.z),p=h.length/3-1,c[Z]=p),s.push(r,p,a),s.push(p,n,a)):b===M&&(Z=`${Math.min(n,a)} ${Math.max(n,a)}`,p=c[Z],i.defined(p)||(S=g.interpolateUsingFraction(.5,Q),A=.5*(v.height+l.height),z=t.Cartesian3.fromRadians(S.longitude,S.latitude,A,e,F),h.push(z.x,z.y,z.z),p=h.length/3-1,c[Z]=p),s.push(n,p,r),s.push(p,a,r)):(y.push(a),y.push(r),y.push(n))}return new u.Geometry({attributes:{position:new u.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:h})},indices:y,primitiveType:u.PrimitiveType.TRIANGLES})},N.scaleToGeodeticHeight=function(e,n,r,a){r=i.defaultValue(r,t.Ellipsoid.WGS84);let u=I,x=B;if(n=i.defaultValue(n,0),a=i.defaultValue(a,!0),i.defined(e)){const i=e.length;for(let o=0;o<i;o+=3)t.Cartesian3.fromArray(e,o,x),a&&(x=r.scaleToGeodeticSurface(x,x)),0!==n&&(u=r.geodeticSurfaceNormal(x,u),t.Cartesian3.multiplyByScalar(u,n,u),t.Cartesian3.add(x,u,x)),e[o]=x.x,e[o+1]=x.y,e[o+2]=x.z}return e},e.PolygonPipeline=N,e.WindingOrder=P}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-413c4048","./Matrix3-81054f0f","./ComponentDatatype-ab629b88","./defaultValue-f6d5e6da","./EllipsoidRhumbLine-77eff028","./GeometryAttribute-b10c5c29","./Math-2ce22ee9","./WebGLConstants-7f557f93"],(function(e,t,n,r,a,i,o,s,u){"use strict";var x={};function p(e,t,n){n=n||2;var r,a,i,o,s,u,x,p=t&&t.length,h=p?t[0]*n:e.length,c=l(e,0,h,n,!0),f=[];if(!c||c.next===c.prev)return f;if(p&&(c=function(e,t,n,r){var a,i,o,s=[];for(a=0,i=t.length;a<i;a++)(o=l(e,t[a]*r,a<i-1?t[a+1]*r:e.length,r,!1))===o.next&&(o.steiner=!0),s.push(A(o));for(s.sort(m),a=0;a<s.length;a++)n=C(s[a],n);return n}(e,t,c,n)),e.length>80*n){r=i=e[0],a=o=e[1];for(var v=n;v<h;v+=n)(s=e[v])<r&&(r=s),(u=e[v+1])<a&&(a=u),s>i&&(i=s),u>o&&(o=u);x=0!==(x=Math.max(i-r,o-a))?32767/x:0}return y(c,f,n,r,a,x,0),f}function l(e,t,n,r,a){var i,o;if(a===B(e,t,n,r)>0)for(i=t;i<n;i+=r)o=G(i,e[i],e[i+1],o);else for(i=n-r;i>=t;i-=r)o=G(i,e[i],e[i+1],o);return o&&E(o,o.next)&&(O(o),o=o.next),o}function h(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!E(r,r.next)&&0!==S(r.prev,r,r.next))r=r.next;else{if(O(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function y(e,t,n,r,a,i,o){if(e){!o&&i&&function(e,t,n,r){var a=e;do{0===a.z&&(a.z=w(a.x,a.y,t,n,r)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,n,r,a,i,o,s,u,x=1;do{for(n=e,e=null,i=null,o=0;n;){for(o++,r=n,s=0,t=0;t<x&&(s++,r=r.nextZ);t++);for(u=x;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(a=n,n=n.nextZ,s--):(a=r,r=r.nextZ,u--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;n=r}i.nextZ=null,x*=2}while(o>1)}(a)}(e,r,a,i);for(var s,u,x=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?f(e,r,a,i):c(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(u.i/n|0),O(e),e=u.next,x=u.next;else if((e=u)===x){o?1===o?y(e=v(h(e),t,n),t,n,r,a,i,2):2===o&&d(e,t,n,r,a,i):y(h(e),t,n,r,a,i,1);break}}}function c(e){var t=e.prev,n=e,r=e.next;if(S(t,n,r)>=0)return!1;for(var a=t.x,i=n.x,o=r.x,s=t.y,u=n.y,x=r.y,p=a<i?a<o?a:o:i<o?i:o,l=s<u?s<x?s:x:u<x?u:x,h=a>i?a>o?a:o:i>o?i:o,y=s>u?s>x?s:x:u>x?u:x,c=r.next;c!==t;){if(c.x>=p&&c.x<=h&&c.y>=l&&c.y<=y&&b(a,s,i,u,o,x,c.x,c.y)&&S(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function f(e,t,n,r){var a=e.prev,i=e,o=e.next;if(S(a,i,o)>=0)return!1;for(var s=a.x,u=i.x,x=o.x,p=a.y,l=i.y,h=o.y,y=s<u?s<x?s:x:u<x?u:x,c=p<l?p<h?p:h:l<h?l:h,f=s>u?s>x?s:x:u>x?u:x,v=p>l?p>h?p:h:l>h?l:h,d=w(y,c,t,n,r),m=w(f,v,t,n,r),C=e.prevZ,g=e.nextZ;C&&C.z>=d&&g&&g.z<=m;){if(C.x>=y&&C.x<=f&&C.y>=c&&C.y<=v&&C!==a&&C!==o&&b(s,p,u,l,x,h,C.x,C.y)&&S(C.prev,C,C.next)>=0)return!1;if(C=C.prevZ,g.x>=y&&g.x<=f&&g.y>=c&&g.y<=v&&g!==a&&g!==o&&b(s,p,u,l,x,h,g.x,g.y)&&S(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;C&&C.z>=d;){if(C.x>=y&&C.x<=f&&C.y>=c&&C.y<=v&&C!==a&&C!==o&&b(s,p,u,l,x,h,C.x,C.y)&&S(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;g&&g.z<=m;){if(g.x>=y&&g.x<=f&&g.y>=c&&g.y<=v&&g!==a&&g!==o&&b(s,p,u,l,x,h,g.x,g.y)&&S(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function v(e,t,n){var r=e;do{var a=r.prev,i=r.next.next;!E(a,i)&&Z(a,r,r.next,i)&&D(a,i)&&D(i,a)&&(t.push(a.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),O(r),O(r.next),r=e=i),r=r.next}while(r!==e);return h(r)}function d(e,t,n,r,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&M(o,s)){var u=R(o,s);return o=h(o,o.next),u=h(u,u.next),y(o,t,n,r,a,i,0),void y(u,t,n,r,a,i,0)}s=s.next}o=o.next}while(o!==e)}function m(e,t){return e.x-t.x}function C(e,t){var n=function(e,t){var n,r=t,a=e.x,i=e.y,o=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=a&&s>o&&(o=s,n=r.x<r.next.x?r:r.next,s===a))return n}r=r.next}while(r!==t);if(!n)return null;var u,x=n,p=n.x,l=n.y,h=1/0;r=n;do{a>=r.x&&r.x>=p&&a!==r.x&&b(i<l?a:o,i,p,l,i<l?o:a,i,r.x,r.y)&&(u=Math.abs(i-r.y)/(a-r.x),D(r,e)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,h=u)),r=r.next}while(r!==x);return n}(e,t);if(!n)return t;var r=R(n,e);return h(r,r.next),h(n,n.next)}function g(e,t){return S(e.prev,e,t.prev)<0&&S(t.next,e,e.next)<0}function w(e,t,n,r,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*a|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*a|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function A(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function b(e,t,n,r,a,i,o,s){return(a-o)*(t-s)>=(e-o)*(i-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(i-s)>=(a-o)*(r-s)}function M(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Z(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(D(e,t)&&D(t,e)&&function(e,t){var n=e,r=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&a<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(S(e.prev,e,t.prev)||S(e,t.prev,t))||E(e,t)&&S(e.prev,e,e.next)>0&&S(t.prev,t,t.next)>0)}function S(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function E(e,t){return e.x===t.x&&e.y===t.y}function Z(e,t,n,r){var a=L(S(e,t,n)),i=L(S(e,t,r)),o=L(S(n,r,e)),s=L(S(n,r,t));return a!==i&&o!==s||(!(0!==a||!z(e,n,t))||(!(0!==i||!z(e,r,t))||(!(0!==o||!z(n,e,r))||!(0!==s||!z(n,t,r)))))}function z(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function L(e){return e>0?1:e<0?-1:0}function D(e,t){return S(e.prev,e,e.next)<0?S(e,t,e.next)>=0&&S(e,e.prev,t)>=0:S(e,t,e.prev)<0||S(e,e.next,t)<0}function R(e,t){var n=new T(e.i,e.x,e.y),r=new T(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=a,a.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function G(e,t,n,r){var a=new T(e,t,n);return r?(a.next=r.next,a.prev=r,r.next.prev=a,r.next=a):(a.prev=a,a.next=a),a}function O(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function T(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(e,t,n,r){for(var a=0,i=t,o=n-r;i<n;i+=r)a+=(e[o]-e[i])*(e[i+1]+e[o+1]),o=i;return a}({get exports(){return x},set exports(e){x=e}}).exports=p,x.default=p,p.deviation=function(e,t,n,r){var a=t&&t.length,i=a?t[0]*n:e.length,o=Math.abs(B(e,0,i,n));if(a)for(var s=0,u=t.length;s<u;s++){var x=t[s]*n,p=s<u-1?t[s+1]*n:e.length;o-=Math.abs(B(e,x,p,n))}var l=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,y=r[s+1]*n,c=r[s+2]*n;l+=Math.abs((e[h]-e[c])*(e[y+1]-e[h+1])-(e[h]-e[y])*(e[c+1]-e[h+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},p.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,a=0;a<e.length;a++){for(var i=0;i<e[a].length;i++)for(var o=0;o<t;o++)n.vertices.push(e[a][i][o]);a>0&&(r+=e[a-1].length,n.holes.push(r))}return n};const W={CLOCKWISE:u.WebGLConstants.CW,COUNTER_CLOCKWISE:u.WebGLConstants.CCW,validate:function(e){return e===W.CLOCKWISE||e===W.COUNTER_CLOCKWISE}};var P=Object.freeze(W);const $=new n.Cartesian3,I=new n.Cartesian3,N={computeArea2D:function(e){const t=e.length;let n=0;for(let r=t-1,a=0;a<t;r=a++){const t=e[r],i=e[a];n+=t.x*i.y-i.x*t.y}return.5*n},computeWindingOrder2D:function(e){return N.computeArea2D(e)>0?P.COUNTER_CLOCKWISE:P.CLOCKWISE},triangulate:function(e,n){const r=t.Cartesian2.packArray(e);return x(r,n,2)}},U=new n.Cartesian3,_=new n.Cartesian3,K=new n.Cartesian3,V=new n.Cartesian3,F=new n.Cartesian3,k=new n.Cartesian3,q=new n.Cartesian3,j=new t.Cartesian2,H=new t.Cartesian2,J=new t.Cartesian2,Q=new t.Cartesian2;N.computeSubdivision=function(e,i,u,x,p){p=a.defaultValue(p,s.CesiumMath.RADIANS_PER_DEGREE);const l=a.defined(x),h=u.slice(0);let y;const c=i.length,f=new Array(3*c),v=new Array(2*c);let d=0,m=0;for(y=0;y<c;y++){const e=i[y];if(f[d++]=e.x,f[d++]=e.y,f[d++]=e.z,l){const e=x[y];v[m++]=e.x,v[m++]=e.y}}const C=[],g={},w=e.maximumRadius,A=s.CesiumMath.chordLength(p,w),b=A*A;for(;h.length>0;){const e=h.pop(),r=h.pop(),i=h.pop(),o=n.Cartesian3.fromArray(f,3*i,U),s=n.Cartesian3.fromArray(f,3*r,_),u=n.Cartesian3.fromArray(f,3*e,K);let x,p,c;l&&(x=t.Cartesian2.fromArray(v,2*i,j),p=t.Cartesian2.fromArray(v,2*r,H),c=t.Cartesian2.fromArray(v,2*e,J));const d=n.Cartesian3.multiplyByScalar(n.Cartesian3.normalize(o,V),w,V),m=n.Cartesian3.multiplyByScalar(n.Cartesian3.normalize(s,F),w,F),A=n.Cartesian3.multiplyByScalar(n.Cartesian3.normalize(u,k),w,k),M=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(d,m,q)),S=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(m,A,q)),E=n.Cartesian3.magnitudeSquared(n.Cartesian3.subtract(A,d,q)),Z=Math.max(M,S,E);let z,L,D;Z>b?M===Z?(z=`${Math.min(i,r)} ${Math.max(i,r)}`,y=g[z],a.defined(y)||(L=n.Cartesian3.add(o,s,q),n.Cartesian3.multiplyByScalar(L,.5,L),f.push(L.x,L.y,L.z),y=f.length/3-1,g[z]=y,l&&(D=t.Cartesian2.add(x,p,Q),t.Cartesian2.multiplyByScalar(D,.5,D),v.push(D.x,D.y))),h.push(i,y,e),h.push(y,r,e)):S===Z?(z=`${Math.min(r,e)} ${Math.max(r,e)}`,y=g[z],a.defined(y)||(L=n.Cartesian3.add(s,u,q),n.Cartesian3.multiplyByScalar(L,.5,L),f.push(L.x,L.y,L.z),y=f.length/3-1,g[z]=y,l&&(D=t.Cartesian2.add(p,c,Q),t.Cartesian2.multiplyByScalar(D,.5,D),v.push(D.x,D.y))),h.push(r,y,i),h.push(y,e,i)):E===Z&&(z=`${Math.min(e,i)} ${Math.max(e,i)}`,y=g[z],a.defined(y)||(L=n.Cartesian3.add(u,o,q),n.Cartesian3.multiplyByScalar(L,.5,L),f.push(L.x,L.y,L.z),y=f.length/3-1,g[z]=y,l&&(D=t.Cartesian2.add(c,x,Q),t.Cartesian2.multiplyByScalar(D,.5,D),v.push(D.x,D.y))),h.push(e,y,r),h.push(y,i,r)):(C.push(i),C.push(r),C.push(e))}const M={attributes:{position:new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})},indices:C,primitiveType:o.PrimitiveType.TRIANGLES};return l&&(M.attributes.st=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:v})),new o.Geometry(M)};const X=new n.Cartographic,Y=new n.Cartographic,ee=new n.Cartographic,te=new n.Cartographic;N.computeRhumbLineSubdivision=function(e,u,x,p,l){l=a.defaultValue(l,s.CesiumMath.RADIANS_PER_DEGREE);const h=a.defined(p),y=x.slice(0);let c;const f=u.length,v=new Array(3*f),d=new Array(2*f);let m=0,C=0;for(c=0;c<f;c++){const e=u[c];if(v[m++]=e.x,v[m++]=e.y,v[m++]=e.z,h){const e=p[c];d[C++]=e.x,d[C++]=e.y}}const g=[],w={},A=e.maximumRadius,b=s.CesiumMath.chordLength(l,A),M=new i.EllipsoidRhumbLine(void 0,void 0,e),S=new i.EllipsoidRhumbLine(void 0,void 0,e),E=new i.EllipsoidRhumbLine(void 0,void 0,e);for(;y.length>0;){const r=y.pop(),i=y.pop(),o=y.pop(),s=n.Cartesian3.fromArray(v,3*o,U),u=n.Cartesian3.fromArray(v,3*i,_),x=n.Cartesian3.fromArray(v,3*r,K);let p,l,f;h&&(p=t.Cartesian2.fromArray(d,2*o,j),l=t.Cartesian2.fromArray(d,2*i,H),f=t.Cartesian2.fromArray(d,2*r,J));const m=e.cartesianToCartographic(s,X),C=e.cartesianToCartographic(u,Y),A=e.cartesianToCartographic(x,ee);M.setEndPoints(m,C);const Z=M.surfaceDistance;S.setEndPoints(C,A);const z=S.surfaceDistance;E.setEndPoints(A,m);const L=E.surfaceDistance,D=Math.max(Z,z,L);let R,G,O,T,B;D>b?Z===D?(R=`${Math.min(o,i)} ${Math.max(o,i)}`,c=w[R],a.defined(c)||(G=M.interpolateUsingFraction(.5,te),O=.5*(m.height+C.height),T=n.Cartesian3.fromRadians(G.longitude,G.latitude,O,e,q),v.push(T.x,T.y,T.z),c=v.length/3-1,w[R]=c,h&&(B=t.Cartesian2.add(p,l,Q),t.Cartesian2.multiplyByScalar(B,.5,B),d.push(B.x,B.y))),y.push(o,c,r),y.push(c,i,r)):z===D?(R=`${Math.min(i,r)} ${Math.max(i,r)}`,c=w[R],a.defined(c)||(G=S.interpolateUsingFraction(.5,te),O=.5*(C.height+A.height),T=n.Cartesian3.fromRadians(G.longitude,G.latitude,O,e,q),v.push(T.x,T.y,T.z),c=v.length/3-1,w[R]=c,h&&(B=t.Cartesian2.add(l,f,Q),t.Cartesian2.multiplyByScalar(B,.5,B),d.push(B.x,B.y))),y.push(i,c,o),y.push(c,r,o)):L===D&&(R=`${Math.min(r,o)} ${Math.max(r,o)}`,c=w[R],a.defined(c)||(G=E.interpolateUsingFraction(.5,te),O=.5*(A.height+m.height),T=n.Cartesian3.fromRadians(G.longitude,G.latitude,O,e,q),v.push(T.x,T.y,T.z),c=v.length/3-1,w[R]=c,h&&(B=t.Cartesian2.add(f,p,Q),t.Cartesian2.multiplyByScalar(B,.5,B),d.push(B.x,B.y))),y.push(r,c,i),y.push(c,o,i)):(g.push(o),g.push(i),g.push(r))}const Z={attributes:{position:new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})},indices:g,primitiveType:o.PrimitiveType.TRIANGLES};return h&&(Z.attributes.st=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),new o.Geometry(Z)},N.scaleToGeodeticHeight=function(e,t,r,i){r=a.defaultValue(r,n.Ellipsoid.WGS84);let o=$,s=I;if(t=a.defaultValue(t,0),i=a.defaultValue(i,!0),a.defined(e)){const a=e.length;for(let u=0;u<a;u+=3)n.Cartesian3.fromArray(e,u,s),i&&(s=r.scaleToGeodeticSurface(s,s)),0!==t&&(o=r.geodeticSurfaceNormal(s,o),n.Cartesian3.multiplyByScalar(o,t,o),n.Cartesian3.add(s,o,s)),e[u]=s.x,e[u+1]=s.y,e[u+2]=s.z}return e};var ne=N;e.PolygonPipeline=ne,e.WindingOrder=P}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix3-81054f0f","./defaultValue-f6d5e6da","./EllipsoidGeodesic-2723ab86","./EllipsoidRhumbLine-77eff028","./IntersectionTests-832aa5c7","./Math-2ce22ee9","./Matrix2-413c4048","./Plane-6add0ae1"],(function(e,t,a,n,i,r,o,s,c){"use strict";const l={numberOfPoints:function(e,a,n){const i=t.Cartesian3.distance(e,a);return Math.ceil(i/n)},numberOfPointsRhumbLine:function(e,t,a){const n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(n/(a*a))))}},u=new t.Cartographic;l.extractHeights=function(e,t){const a=e.length,n=new Array(a);for(let i=0;i<a;i++){const a=e[i];n[i]=t.cartesianToCartographic(a,u).height}return n};const h=new s.Matrix4,f=new t.Cartesian3,g=new t.Cartesian3,C=new c.Plane(t.Cartesian3.UNIT_X,0),p=new t.Cartesian3,d=new c.Plane(t.Cartesian3.UNIT_X,0),m=new t.Cartesian3,w=new t.Cartesian3,P=[];function T(e,t,a){const n=P;let i;if(n.length=e,t===a){for(i=0;i<e;i++)n[i]=t;return n}const r=(a-t)/e;for(i=0;i<e;i++){const e=t+i*r;n[i]=e}return n}const y=new t.Cartographic,A=new t.Cartographic,E=new t.Cartesian3,M=new t.Cartesian3,R=new t.Cartesian3,S=new n.EllipsoidGeodesic;let b=new i.EllipsoidRhumbLine;function x(e,a,n,i,r,o,s,c){const u=i.scaleToGeodeticSurface(e,M),h=i.scaleToGeodeticSurface(a,R),f=l.numberOfPoints(e,a,n),g=i.cartesianToCartographic(u,y),C=i.cartesianToCartographic(h,A),p=T(f,r,o);S.setEndPoints(g,C);const d=S.surfaceDistance/f;let m=c;g.height=r;let w=i.cartographicToCartesian(g,E);t.Cartesian3.pack(w,s,m),m+=3;for(let e=1;e<f;e++){const a=S.interpolateUsingSurfaceDistance(e*d,A);a.height=p[e],w=i.cartographicToCartesian(a,E),t.Cartesian3.pack(w,s,m),m+=3}return m}function D(e,a,n,r,o,s,c,u){const h=r.cartesianToCartographic(e,y),f=r.cartesianToCartographic(a,A),g=l.numberOfPointsRhumbLine(h,f,n);h.height=0,f.height=0;const C=T(g,o,s);b.ellipsoid.equals(r)||(b=new i.EllipsoidRhumbLine(void 0,void 0,r)),b.setEndPoints(h,f);const p=b.surfaceDistance/g;let d=u;h.height=o;let m=r.cartographicToCartesian(h,E);t.Cartesian3.pack(m,c,d),d+=3;for(let e=1;e<g;e++){const a=b.interpolateUsingSurfaceDistance(e*p,A);a.height=C[e],m=r.cartographicToCartesian(a,E),t.Cartesian3.pack(m,c,d),d+=3}return d}l.wrapLongitude=function(e,n){const i=[],o=[];if(a.defined(e)&&e.length>0){n=a.defaultValue(n,s.Matrix4.IDENTITY);const l=s.Matrix4.inverseTransformation(n,h),u=s.Matrix4.multiplyByPoint(l,t.Cartesian3.ZERO,f),P=t.Cartesian3.normalize(s.Matrix4.multiplyByPointAsVector(l,t.Cartesian3.UNIT_Y,g),g),T=c.Plane.fromPointNormal(u,P,C),y=t.Cartesian3.normalize(s.Matrix4.multiplyByPointAsVector(l,t.Cartesian3.UNIT_X,p),p),A=c.Plane.fromPointNormal(u,y,d);let E=1;i.push(t.Cartesian3.clone(e[0]));let M=i[0];const R=e.length;for(let n=1;n<R;++n){const s=e[n];if(c.Plane.getPointDistance(A,M)<0||c.Plane.getPointDistance(A,s)<0){const e=r.IntersectionTests.lineSegmentPlane(M,s,T,m);if(a.defined(e)){const a=t.Cartesian3.multiplyByScalar(P,5e-9,w);c.Plane.getPointDistance(T,M)<0&&t.Cartesian3.negate(a,a),i.push(t.Cartesian3.add(e,a,new t.Cartesian3)),o.push(E+1),t.Cartesian3.negate(a,a),i.push(t.Cartesian3.add(e,a,new t.Cartesian3)),E=1}}i.push(t.Cartesian3.clone(e[n])),E++,M=s}o.push(E)}return{positions:i,lengths:o}},l.generateArc=function(e){a.defined(e)||(e={});const n=e.positions,i=n.length,r=a.defaultValue(e.ellipsoid,t.Ellipsoid.WGS84);let s=a.defaultValue(e.height,0);const c=Array.isArray(s);if(i<1)return[];if(1===i){const e=r.scaleToGeodeticSurface(n[0],M);if(s=c?s[0]:s,0!==s){const a=r.geodeticSurfaceNormal(e,E);t.Cartesian3.multiplyByScalar(a,s,a),t.Cartesian3.add(e,a,e)}return[e.x,e.y,e.z]}let u=e.minDistance;if(!a.defined(u)){const t=a.defaultValue(e.granularity,o.CesiumMath.RADIANS_PER_DEGREE);u=o.CesiumMath.chordLength(t,r.maximumRadius)}let h,f=0;for(h=0;h<i-1;h++)f+=l.numberOfPoints(n[h],n[h+1],u);const g=3*(f+1),C=new Array(g);let p=0;for(h=0;h<i-1;h++){p=x(n[h],n[h+1],u,r,c?s[h]:s,c?s[h+1]:s,C,p)}P.length=0;const d=n[i-1],m=r.cartesianToCartographic(d,y);m.height=c?s[i-1]:s;const w=r.cartographicToCartesian(m,E);return t.Cartesian3.pack(w,C,g-3),C};const N=new t.Cartographic,G=new t.Cartographic;l.generateRhumbArc=function(e){a.defined(e)||(e={});const n=e.positions,i=n.length,r=a.defaultValue(e.ellipsoid,t.Ellipsoid.WGS84);let s=a.defaultValue(e.height,0);const c=Array.isArray(s);if(i<1)return[];if(1===i){const e=r.scaleToGeodeticSurface(n[0],M);if(s=c?s[0]:s,0!==s){const a=r.geodeticSurfaceNormal(e,E);t.Cartesian3.multiplyByScalar(a,s,a),t.Cartesian3.add(e,a,e)}return[e.x,e.y,e.z]}const u=a.defaultValue(e.granularity,o.CesiumMath.RADIANS_PER_DEGREE);let h,f,g=0,C=r.cartesianToCartographic(n[0],N);for(h=0;h<i-1;h++)f=r.cartesianToCartographic(n[h+1],G),g+=l.numberOfPointsRhumbLine(C,f,u),C=t.Cartographic.clone(f,N);const p=3*(g+1),d=new Array(p);let m=0;for(h=0;h<i-1;h++){m=D(n[h],n[h+1],u,r,c?s[h]:s,c?s[h+1]:s,d,m)}P.length=0;const w=n[i-1],T=r.cartesianToCartographic(w,y);T.height=c?s[i-1]:s;const A=r.cartographicToCartesian(T,E);return t.Cartesian3.pack(A,d,p-3),d},l.generateCartesianArc=function(e){const a=l.generateArc(e),n=a.length/3,i=new Array(n);for(let e=0;e<n;e++)i[e]=t.Cartesian3.unpack(a,3*e);return i},l.generateCartesianRhumbArc=function(e){const a=l.generateRhumbArc(e),n=a.length/3,i=new Array(n);for(let e=0;e<n;e++)i[e]=t.Cartesian3.unpack(a,3*e);return i};var I=l;e.PolylinePipeline=I}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-1509208a","./defaultValue-69ee94f4","./RuntimeError-ac440aa5","./EllipsoidGeodesic-7d405754","./EllipsoidRhumbLine-7b6199fa","./IntersectionTests-f15438d8","./ComponentDatatype-a9820060","./Plane-e3daa19b"],(function(e,t,a,n,i,r,o,s,c){"use strict";const l={numberOfPoints:function(e,a,n){const i=t.Cartesian3.distance(e,a);return Math.ceil(i/n)},numberOfPointsRhumbLine:function(e,t,a){const n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(n/(a*a))))}},u=new t.Cartographic;l.extractHeights=function(e,t){const a=e.length,n=new Array(a);for(let i=0;i<a;i++){const a=e[i];n[i]=t.cartesianToCartographic(a,u).height}return n};const h=new t.Matrix4,f=new t.Cartesian3,g=new t.Cartesian3,C=new c.Plane(t.Cartesian3.UNIT_X,0),p=new t.Cartesian3,d=new c.Plane(t.Cartesian3.UNIT_X,0),m=new t.Cartesian3,w=new t.Cartesian3,P=[];function T(e,t,a){const n=P;let i;if(n.length=e,t===a){for(i=0;i<e;i++)n[i]=t;return n}const r=(a-t)/e;for(i=0;i<e;i++){const e=t+i*r;n[i]=e}return n}const y=new t.Cartographic,A=new t.Cartographic,E=new t.Cartesian3,R=new t.Cartesian3,b=new t.Cartesian3,M=new i.EllipsoidGeodesic;let S=new r.EllipsoidRhumbLine;function D(e,a,n,i,r,o,s,c){const u=i.scaleToGeodeticSurface(e,R),h=i.scaleToGeodeticSurface(a,b),f=l.numberOfPoints(e,a,n),g=i.cartesianToCartographic(u,y),C=i.cartesianToCartographic(h,A),p=T(f,r,o);M.setEndPoints(g,C);const d=M.surfaceDistance/f;let m=c;g.height=r;let w=i.cartographicToCartesian(g,E);t.Cartesian3.pack(w,s,m),m+=3;for(let e=1;e<f;e++){const a=M.interpolateUsingSurfaceDistance(e*d,A);a.height=p[e],w=i.cartographicToCartesian(a,E),t.Cartesian3.pack(w,s,m),m+=3}return m}function x(e,a,n,i,o,s,c,u){const h=i.cartesianToCartographic(e,y),f=i.cartesianToCartographic(a,A),g=l.numberOfPointsRhumbLine(h,f,n);h.height=0,f.height=0;const C=T(g,o,s);S.ellipsoid.equals(i)||(S=new r.EllipsoidRhumbLine(void 0,void 0,i)),S.setEndPoints(h,f);const p=S.surfaceDistance/g;let d=u;h.height=o;let m=i.cartographicToCartesian(h,E);t.Cartesian3.pack(m,c,d),d+=3;for(let e=1;e<g;e++){const a=S.interpolateUsingSurfaceDistance(e*p,A);a.height=C[e],m=i.cartographicToCartesian(a,E),t.Cartesian3.pack(m,c,d),d+=3}return d}l.wrapLongitude=function(e,n){const i=[],r=[];if(a.defined(e)&&e.length>0){n=a.defaultValue(n,t.Matrix4.IDENTITY);const s=t.Matrix4.inverseTransformation(n,h),l=t.Matrix4.multiplyByPoint(s,t.Cartesian3.ZERO,f),u=t.Cartesian3.normalize(t.Matrix4.multiplyByPointAsVector(s,t.Cartesian3.UNIT_Y,g),g),P=c.Plane.fromPointNormal(l,u,C),T=t.Cartesian3.normalize(t.Matrix4.multiplyByPointAsVector(s,t.Cartesian3.UNIT_X,p),p),y=c.Plane.fromPointNormal(l,T,d);let A=1;i.push(t.Cartesian3.clone(e[0]));let E=i[0];const R=e.length;for(let n=1;n<R;++n){const s=e[n];if(c.Plane.getPointDistance(y,E)<0||c.Plane.getPointDistance(y,s)<0){const e=o.IntersectionTests.lineSegmentPlane(E,s,P,m);if(a.defined(e)){const a=t.Cartesian3.multiplyByScalar(u,5e-9,w);c.Plane.getPointDistance(P,E)<0&&t.Cartesian3.negate(a,a),i.push(t.Cartesian3.add(e,a,new t.Cartesian3)),r.push(A+1),t.Cartesian3.negate(a,a),i.push(t.Cartesian3.add(e,a,new t.Cartesian3)),A=1}}i.push(t.Cartesian3.clone(e[n])),A++,E=s}r.push(A)}return{positions:i,lengths:r}},l.generateArc=function(e){a.defined(e)||(e={});const n=e.positions,i=n.length,r=a.defaultValue(e.ellipsoid,t.Ellipsoid.WGS84);let o=a.defaultValue(e.height,0);const c=Array.isArray(o);if(i<1)return[];if(1===i){const e=r.scaleToGeodeticSurface(n[0],R);if(o=c?o[0]:o,0!==o){const a=r.geodeticSurfaceNormal(e,E);t.Cartesian3.multiplyByScalar(a,o,a),t.Cartesian3.add(e,a,e)}return[e.x,e.y,e.z]}let u=e.minDistance;if(!a.defined(u)){const t=a.defaultValue(e.granularity,s.CesiumMath.RADIANS_PER_DEGREE);u=s.CesiumMath.chordLength(t,r.maximumRadius)}let h,f=0;for(h=0;h<i-1;h++)f+=l.numberOfPoints(n[h],n[h+1],u);const g=3*(f+1),C=new Array(g);let p=0;for(h=0;h<i-1;h++){p=D(n[h],n[h+1],u,r,c?o[h]:o,c?o[h+1]:o,C,p)}P.length=0;const d=n[i-1],m=r.cartesianToCartographic(d,y);m.height=c?o[i-1]:o;const w=r.cartographicToCartesian(m,E);return t.Cartesian3.pack(w,C,g-3),C};const N=new t.Cartographic,G=new t.Cartographic;l.generateRhumbArc=function(e){a.defined(e)||(e={});const n=e.positions,i=n.length,r=a.defaultValue(e.ellipsoid,t.Ellipsoid.WGS84);let o=a.defaultValue(e.height,0);const c=Array.isArray(o);if(i<1)return[];if(1===i){const e=r.scaleToGeodeticSurface(n[0],R);if(o=c?o[0]:o,0!==o){const a=r.geodeticSurfaceNormal(e,E);t.Cartesian3.multiplyByScalar(a,o,a),t.Cartesian3.add(e,a,e)}return[e.x,e.y,e.z]}const u=a.defaultValue(e.granularity,s.CesiumMath.RADIANS_PER_DEGREE);let h,f,g=0,C=r.cartesianToCartographic(n[0],N);for(h=0;h<i-1;h++)f=r.cartesianToCartographic(n[h+1],G),g+=l.numberOfPointsRhumbLine(C,f,u),C=t.Cartographic.clone(f,N);const p=3*(g+1),d=new Array(p);let m=0;for(h=0;h<i-1;h++){m=x(n[h],n[h+1],u,r,c?o[h]:o,c?o[h+1]:o,d,m)}P.length=0;const w=n[i-1],T=r.cartesianToCartographic(w,y);T.height=c?o[i-1]:o;const A=r.cartographicToCartesian(T,E);return t.Cartesian3.pack(A,d,p-3),d},l.generateCartesianArc=function(e){const a=l.generateArc(e),n=a.length/3,i=new Array(n);for(let e=0;e<n;e++)i[e]=t.Cartesian3.unpack(a,3*e);return i},l.generateCartesianRhumbArc=function(e){const a=l.generateRhumbArc(e),n=a.length/3,i=new Array(n);for(let e=0;e<n;e++)i[e]=t.Cartesian3.unpack(a,3*e);return i},e.PolylinePipeline=l}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-413c4048","./Matrix3-81054f0f","./EllipsoidTangentPlane-4cf30b6c","./Math-2ce22ee9","./PolylinePipeline-3006b0cf","./Transforms-c65aae74","./defaultValue-f6d5e6da"],(function(e,a,t,n,r,i,s,o){"use strict";var l=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2});const c={};function C(e,a){o.defined(c[e])||(c[e]=!0,console.warn(o.defaultValue(a,e)))}C.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",C.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",C.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",C.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";const u=[new t.Cartesian3,new t.Cartesian3],d=new t.Cartesian3,g=new t.Cartesian3,y=new t.Cartesian3,h=new t.Cartesian3,m=new t.Cartesian3,f=new t.Cartesian3,p=new t.Cartesian3,w=new t.Cartesian3,x=new t.Cartesian3,E=new t.Cartesian3,P=new t.Cartesian3,M={};let T=new t.Cartographic;function b(e,a,n,r){const i=e[0],s=e[1],o=t.Cartesian3.angleBetween(i,s),l=Math.ceil(o/r),c=new Array(l);let C;if(a===n){for(C=0;C<l;C++)c[C]=a;return c.push(n),c}const u=(n-a)/l;for(C=1;C<l;C++){const e=a+C*u;c[C]=e}return c[0]=a,c.push(n),c}const B=new t.Cartesian3,z=new t.Cartesian3;const S=new t.Cartesian3(-1,0,0);let A=new a.Matrix4;const D=new a.Matrix4;let R=new t.Matrix3;const O=t.Matrix3.IDENTITY.clone(),V=new t.Cartesian3,I=new a.Cartesian4,v=new t.Cartesian3;function N(e,r,i,o,l,c,C,u){let d=V,g=I;A=s.Transforms.eastNorthUpToFixedFrame(e,l,A),d=a.Matrix4.multiplyByPointAsVector(A,S,d),d=t.Cartesian3.normalize(d,d);const y=function(e,r,i,s){const o=new n.EllipsoidTangentPlane(i,s),l=o.projectPointOntoPlane(t.Cartesian3.add(i,e,B),B),c=o.projectPointOntoPlane(t.Cartesian3.add(i,r,z),z),C=a.Cartesian2.angleBetween(l,c);return c.x*l.y-c.y*l.x>=0?-C:C}(d,r,e,l);R=t.Matrix3.fromRotationZ(y,R),v.z=c,A=a.Matrix4.multiplyTransformation(A,a.Matrix4.fromRotationTranslation(R,v,D),A);const h=O;h[0]=C;for(let e=0;e<u;e++)for(let e=0;e<i.length;e+=3)g=t.Cartesian3.fromArray(i,e,g),g=t.Matrix3.multiplyByVector(h,g,g),g=a.Matrix4.multiplyByPoint(A,g,g),o.push(g.x,g.y,g.z);return o}const G=new t.Cartesian3;function H(e,a,n,r,i,s,o){for(let l=0;l<e.length;l+=3){r=N(t.Cartesian3.fromArray(e,l,G),a,n,r,i,s[l/3],o,1)}return r}function L(e,a){const t=e.length,n=new Array(3*t);let r=0;const i=a.x+a.width/2,s=a.y+a.height/2;for(let a=0;a<t;a++)n[r++]=e[a].x-i,n[r++]=0,n[r++]=e[a].y-s;return n}const j=new s.Quaternion,Q=new t.Cartesian3,q=new t.Matrix3;function F(e,a,n,i,o,c,C,u,d,g){const y=t.Cartesian3.angleBetween(t.Cartesian3.subtract(a,e,E),t.Cartesian3.subtract(n,e,P)),h=i===l.BEVELED?0:Math.ceil(y/r.CesiumMath.toRadians(5));let m,f,p;if(m=o?t.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(t.Cartesian3.negate(e,E),y/(h+1),j),q):t.Matrix3.fromQuaternion(s.Quaternion.fromAxisAngle(e,y/(h+1),j),q),a=t.Cartesian3.clone(a,Q),h>0){const n=g?2:1;for(let r=0;r<h;r++)a=t.Matrix3.multiplyByVector(m,a,a),f=t.Cartesian3.subtract(a,e,E),f=t.Cartesian3.normalize(f,f),o||(f=t.Cartesian3.negate(f,f)),p=c.scaleToGeodeticSurface(a,P),C=N(p,f,u,C,c,d,1,n)}else f=t.Cartesian3.subtract(a,e,E),f=t.Cartesian3.normalize(f,f),o||(f=t.Cartesian3.negate(f,f)),p=c.scaleToGeodeticSurface(a,P),C=N(p,f,u,C,c,d,1,1),n=t.Cartesian3.clone(n,Q),f=t.Cartesian3.subtract(n,e,E),f=t.Cartesian3.normalize(f,f),o||(f=t.Cartesian3.negate(f,f)),p=c.scaleToGeodeticSurface(n,P),C=N(p,f,u,C,c,d,1,1);return C}M.removeDuplicatesFromShape=function(e){const t=e.length,n=[];for(let r=t-1,i=0;i<t;r=i++){const t=e[r],s=e[i];a.Cartesian2.equals(t,s)||n.push(s)}return n},M.angleIsGreaterThanPi=function(e,a,r,i){const s=new n.EllipsoidTangentPlane(r,i),o=s.projectPointOntoPlane(t.Cartesian3.add(r,e,B),B),l=s.projectPointOntoPlane(t.Cartesian3.add(r,a,z),z);return l.x*o.y-l.y*o.x>=0};const U=new t.Cartesian3,_=new t.Cartesian3;M.computePositions=function(e,a,n,s,o){const c=s._ellipsoid,P=function(e,a){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];T=a.cartesianToCartographic(r,T),t[n]=T.height,e[n]=a.scaleToGeodeticSurface(r,r)}return t}(e,c),B=s._granularity,z=s._cornerType,S=o?function(e,a){const t=e.length,n=new Array(6*t);let r=0;const i=a.x+a.width/2,s=a.y+a.height/2;let o=e[0];n[r++]=o.x-i,n[r++]=0,n[r++]=o.y-s;for(let a=1;a<t;a++){o=e[a];const t=o.x-i,l=o.y-s;n[r++]=t,n[r++]=0,n[r++]=l,n[r++]=t,n[r++]=0,n[r++]=l}return o=e[0],n[r++]=o.x-i,n[r++]=0,n[r++]=o.y-s,n}(a,n):L(a,n),A=o?L(a,n):void 0,D=n.height/2,R=n.width/2;let O=e.length,V=[],I=o?[]:void 0,v=d,G=g,j=y,Q=h,q=m,Z=f,W=p,Y=w,k=x,J=e[0],K=e[1];Q=c.geodeticSurfaceNormal(J,Q),v=t.Cartesian3.subtract(K,J,v),v=t.Cartesian3.normalize(v,v),Y=t.Cartesian3.cross(Q,v,Y),Y=t.Cartesian3.normalize(Y,Y);let X,$,ee=P[0],ae=P[1];o&&(I=N(J,Y,A,I,c,ee+D,1,1)),k=t.Cartesian3.clone(J,k),J=K,G=t.Cartesian3.negate(v,G);for(let a=1;a<O-1;a++){const n=o?2:1;if(K=e[a+1],J.equals(K)){C("Positions are too close and are considered equivalent with rounding error.");continue}v=t.Cartesian3.subtract(K,J,v),v=t.Cartesian3.normalize(v,v),j=t.Cartesian3.add(v,G,j),j=t.Cartesian3.normalize(j,j),Q=c.geodeticSurfaceNormal(J,Q);const s=t.Cartesian3.multiplyByScalar(Q,t.Cartesian3.dot(v,Q),U);t.Cartesian3.subtract(v,s,s),t.Cartesian3.normalize(s,s);const d=t.Cartesian3.multiplyByScalar(Q,t.Cartesian3.dot(G,Q),_);t.Cartesian3.subtract(G,d,d),t.Cartesian3.normalize(d,d);if(!r.CesiumMath.equalsEpsilon(Math.abs(t.Cartesian3.dot(s,d)),1,r.CesiumMath.EPSILON7)){j=t.Cartesian3.cross(j,Q,j),j=t.Cartesian3.cross(Q,j,j),j=t.Cartesian3.normalize(j,j);const e=1/Math.max(.25,t.Cartesian3.magnitude(t.Cartesian3.cross(j,G,E))),a=M.angleIsGreaterThanPi(v,G,J,c);a?(q=t.Cartesian3.add(J,t.Cartesian3.multiplyByScalar(j,e*R,j),q),Z=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,R,Z),Z),u[0]=t.Cartesian3.clone(k,u[0]),u[1]=t.Cartesian3.clone(Z,u[1]),X=b(u,ee+D,ae+D,B),$=i.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),Y=t.Cartesian3.cross(Q,v,Y),Y=t.Cartesian3.normalize(Y,Y),W=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,R,W),W),z===l.ROUNDED||z===l.BEVELED?F(q,Z,W,z,a,c,V,S,ae+D,o):(j=t.Cartesian3.negate(j,j),V=N(J,j,S,V,c,ae+D,e,n)),k=t.Cartesian3.clone(W,k)):(q=t.Cartesian3.add(J,t.Cartesian3.multiplyByScalar(j,e*R,j),q),Z=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,-R,Z),Z),u[0]=t.Cartesian3.clone(k,u[0]),u[1]=t.Cartesian3.clone(Z,u[1]),X=b(u,ee+D,ae+D,B),$=i.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),Y=t.Cartesian3.cross(Q,v,Y),Y=t.Cartesian3.normalize(Y,Y),W=t.Cartesian3.add(q,t.Cartesian3.multiplyByScalar(Y,-R,W),W),z===l.ROUNDED||z===l.BEVELED?F(q,Z,W,z,a,c,V,S,ae+D,o):V=N(J,j,S,V,c,ae+D,e,n),k=t.Cartesian3.clone(W,k)),G=t.Cartesian3.negate(v,G)}else V=N(k,Y,S,V,c,ee+D,1,1),k=J;ee=ae,ae=P[a+1],J=K}u[0]=t.Cartesian3.clone(k,u[0]),u[1]=t.Cartesian3.clone(J,u[1]),X=b(u,ee+D,ae+D,B),$=i.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),o&&(I=N(J,Y,A,I,c,ae+D,1,1)),O=V.length;const te=o?O+I.length:O,ne=new Float64Array(te);return ne.set(V),o&&ne.set(I,O),ne};var Z=M;e.CornerType=l,e.PolylineVolumeGeometryLibrary=Z,e.oneTimeWarning=C}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Matrix2-1509208a","./EllipsoidTangentPlane-330be9cc","./ComponentDatatype-a9820060","./PolylinePipeline-39d7619d","./Transforms-bf323bcf","./defaultValue-69ee94f4","./RuntimeError-ac440aa5"],(function(e,a,t,n,r,i,o,s){"use strict";var l=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2});const c={};function C(e,a){o.defined(c[e])||(c[e]=!0,console.warn(o.defaultValue(a,e)))}C.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",C.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",C.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",C.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";const u=[new a.Cartesian3,new a.Cartesian3],d=new a.Cartesian3,g=new a.Cartesian3,y=new a.Cartesian3,m=new a.Cartesian3,f=new a.Cartesian3,h=new a.Cartesian3,p=new a.Cartesian3,w=new a.Cartesian3,x=new a.Cartesian3,E=new a.Cartesian3,P=new a.Cartesian3,b={};let M=new a.Cartographic;function T(e,t,n,r){const i=e[0],o=e[1],s=a.Cartesian3.angleBetween(i,o),l=Math.ceil(s/r),c=new Array(l);let C;if(t===n){for(C=0;C<l;C++)c[C]=t;return c.push(n),c}const u=(n-t)/l;for(C=1;C<l;C++){const e=t+C*u;c[C]=e}return c[0]=t,c.push(n),c}const B=new a.Cartesian3,z=new a.Cartesian3;const S=new a.Cartesian3(-1,0,0);let A=new a.Matrix4;const D=new a.Matrix4;let R=new a.Matrix3;const O=a.Matrix3.IDENTITY.clone(),V=new a.Cartesian3,I=new a.Cartesian4,N=new a.Cartesian3;function v(e,n,r,o,s,l,c,C){let u=V,d=I;A=i.Transforms.eastNorthUpToFixedFrame(e,s,A),u=a.Matrix4.multiplyByPointAsVector(A,S,u),u=a.Cartesian3.normalize(u,u);const g=function(e,n,r,i){const o=new t.EllipsoidTangentPlane(r,i),s=o.projectPointOntoPlane(a.Cartesian3.add(r,e,B),B),l=o.projectPointOntoPlane(a.Cartesian3.add(r,n,z),z),c=a.Cartesian2.angleBetween(s,l);return l.x*s.y-l.y*s.x>=0?-c:c}(u,n,e,s);R=a.Matrix3.fromRotationZ(g,R),N.z=l,A=a.Matrix4.multiplyTransformation(A,a.Matrix4.fromRotationTranslation(R,N,D),A);const y=O;y[0]=c;for(let e=0;e<C;e++)for(let e=0;e<r.length;e+=3)d=a.Cartesian3.fromArray(r,e,d),d=a.Matrix3.multiplyByVector(y,d,d),d=a.Matrix4.multiplyByPoint(A,d,d),o.push(d.x,d.y,d.z);return o}const G=new a.Cartesian3;function H(e,t,n,r,i,o,s){for(let l=0;l<e.length;l+=3){r=v(a.Cartesian3.fromArray(e,l,G),t,n,r,i,o[l/3],s,1)}return r}function L(e,a){const t=e.length,n=new Array(3*t);let r=0;const i=a.x+a.width/2,o=a.y+a.height/2;for(let a=0;a<t;a++)n[r++]=e[a].x-i,n[r++]=0,n[r++]=e[a].y-o;return n}const j=new i.Quaternion,Q=new a.Cartesian3,q=new a.Matrix3;function F(e,t,r,o,s,c,C,u,d,g){const y=a.Cartesian3.angleBetween(a.Cartesian3.subtract(t,e,E),a.Cartesian3.subtract(r,e,P)),m=o===l.BEVELED?0:Math.ceil(y/n.CesiumMath.toRadians(5));let f,h,p;if(f=s?a.Matrix3.fromQuaternion(i.Quaternion.fromAxisAngle(a.Cartesian3.negate(e,E),y/(m+1),j),q):a.Matrix3.fromQuaternion(i.Quaternion.fromAxisAngle(e,y/(m+1),j),q),t=a.Cartesian3.clone(t,Q),m>0){const n=g?2:1;for(let r=0;r<m;r++)t=a.Matrix3.multiplyByVector(f,t,t),h=a.Cartesian3.subtract(t,e,E),h=a.Cartesian3.normalize(h,h),s||(h=a.Cartesian3.negate(h,h)),p=c.scaleToGeodeticSurface(t,P),C=v(p,h,u,C,c,d,1,n)}else h=a.Cartesian3.subtract(t,e,E),h=a.Cartesian3.normalize(h,h),s||(h=a.Cartesian3.negate(h,h)),p=c.scaleToGeodeticSurface(t,P),C=v(p,h,u,C,c,d,1,1),r=a.Cartesian3.clone(r,Q),h=a.Cartesian3.subtract(r,e,E),h=a.Cartesian3.normalize(h,h),s||(h=a.Cartesian3.negate(h,h)),p=c.scaleToGeodeticSurface(r,P),C=v(p,h,u,C,c,d,1,1);return C}b.removeDuplicatesFromShape=function(e){const t=e.length,n=[];for(let r=t-1,i=0;i<t;r=i++){const t=e[r],o=e[i];a.Cartesian2.equals(t,o)||n.push(o)}return n},b.angleIsGreaterThanPi=function(e,n,r,i){const o=new t.EllipsoidTangentPlane(r,i),s=o.projectPointOntoPlane(a.Cartesian3.add(r,e,B),B),l=o.projectPointOntoPlane(a.Cartesian3.add(r,n,z),z);return l.x*s.y-l.y*s.x>=0};const U=new a.Cartesian3,_=new a.Cartesian3;b.computePositions=function(e,t,i,o,s){const c=o._ellipsoid,P=function(e,a){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];M=a.cartesianToCartographic(r,M),t[n]=M.height,e[n]=a.scaleToGeodeticSurface(r,r)}return t}(e,c),B=o._granularity,z=o._cornerType,S=s?function(e,a){const t=e.length,n=new Array(6*t);let r=0;const i=a.x+a.width/2,o=a.y+a.height/2;let s=e[0];n[r++]=s.x-i,n[r++]=0,n[r++]=s.y-o;for(let a=1;a<t;a++){s=e[a];const t=s.x-i,l=s.y-o;n[r++]=t,n[r++]=0,n[r++]=l,n[r++]=t,n[r++]=0,n[r++]=l}return s=e[0],n[r++]=s.x-i,n[r++]=0,n[r++]=s.y-o,n}(t,i):L(t,i),A=s?L(t,i):void 0,D=i.height/2,R=i.width/2;let O=e.length,V=[],I=s?[]:void 0,N=d,G=g,j=y,Q=m,q=f,Z=h,W=p,Y=w,k=x,J=e[0],K=e[1];Q=c.geodeticSurfaceNormal(J,Q),N=a.Cartesian3.subtract(K,J,N),N=a.Cartesian3.normalize(N,N),Y=a.Cartesian3.cross(Q,N,Y),Y=a.Cartesian3.normalize(Y,Y);let X,$,ee=P[0],ae=P[1];s&&(I=v(J,Y,A,I,c,ee+D,1,1)),k=a.Cartesian3.clone(J,k),J=K,G=a.Cartesian3.negate(N,G);for(let t=1;t<O-1;t++){const i=s?2:1;if(K=e[t+1],J.equals(K)){C("Positions are too close and are considered equivalent with rounding error.");continue}N=a.Cartesian3.subtract(K,J,N),N=a.Cartesian3.normalize(N,N),j=a.Cartesian3.add(N,G,j),j=a.Cartesian3.normalize(j,j),Q=c.geodeticSurfaceNormal(J,Q);const o=a.Cartesian3.multiplyByScalar(Q,a.Cartesian3.dot(N,Q),U);a.Cartesian3.subtract(N,o,o),a.Cartesian3.normalize(o,o);const d=a.Cartesian3.multiplyByScalar(Q,a.Cartesian3.dot(G,Q),_);a.Cartesian3.subtract(G,d,d),a.Cartesian3.normalize(d,d);if(!n.CesiumMath.equalsEpsilon(Math.abs(a.Cartesian3.dot(o,d)),1,n.CesiumMath.EPSILON7)){j=a.Cartesian3.cross(j,Q,j),j=a.Cartesian3.cross(Q,j,j),j=a.Cartesian3.normalize(j,j);const e=1/Math.max(.25,a.Cartesian3.magnitude(a.Cartesian3.cross(j,G,E))),t=b.angleIsGreaterThanPi(N,G,J,c);t?(q=a.Cartesian3.add(J,a.Cartesian3.multiplyByScalar(j,e*R,j),q),Z=a.Cartesian3.add(q,a.Cartesian3.multiplyByScalar(Y,R,Z),Z),u[0]=a.Cartesian3.clone(k,u[0]),u[1]=a.Cartesian3.clone(Z,u[1]),X=T(u,ee+D,ae+D,B),$=r.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),Y=a.Cartesian3.cross(Q,N,Y),Y=a.Cartesian3.normalize(Y,Y),W=a.Cartesian3.add(q,a.Cartesian3.multiplyByScalar(Y,R,W),W),z===l.ROUNDED||z===l.BEVELED?F(q,Z,W,z,t,c,V,S,ae+D,s):(j=a.Cartesian3.negate(j,j),V=v(J,j,S,V,c,ae+D,e,i)),k=a.Cartesian3.clone(W,k)):(q=a.Cartesian3.add(J,a.Cartesian3.multiplyByScalar(j,e*R,j),q),Z=a.Cartesian3.add(q,a.Cartesian3.multiplyByScalar(Y,-R,Z),Z),u[0]=a.Cartesian3.clone(k,u[0]),u[1]=a.Cartesian3.clone(Z,u[1]),X=T(u,ee+D,ae+D,B),$=r.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),Y=a.Cartesian3.cross(Q,N,Y),Y=a.Cartesian3.normalize(Y,Y),W=a.Cartesian3.add(q,a.Cartesian3.multiplyByScalar(Y,-R,W),W),z===l.ROUNDED||z===l.BEVELED?F(q,Z,W,z,t,c,V,S,ae+D,s):V=v(J,j,S,V,c,ae+D,e,i),k=a.Cartesian3.clone(W,k)),G=a.Cartesian3.negate(N,G)}else V=v(k,Y,S,V,c,ee+D,1,1),k=J;ee=ae,ae=P[t+1],J=K}u[0]=a.Cartesian3.clone(k,u[0]),u[1]=a.Cartesian3.clone(J,u[1]),X=T(u,ee+D,ae+D,B),$=r.PolylinePipeline.generateArc({positions:u,granularity:B,ellipsoid:c}),V=H($,Y,S,V,c,X,1),s&&(I=v(J,Y,A,I,c,ae+D,1,1)),O=V.length;const te=s?O+I.length:O,ne=new Float64Array(te);return ne.set(V),s&&ne.set(I,O),ne},e.CornerType=l,e.PolylineVolumeGeometryLibrary=b,e.oneTimeWarning=C}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Transforms-c65aae74","./ComponentDatatype-ab629b88","./defaultValue-f6d5e6da","./Matrix3-81054f0f","./GeometryAttribute-b10c5c29","./GeometryAttributes-1e4ddcd2","./GeometryPipeline-5926bf6a","./IndexDatatype-d3db4e7d","./Matrix2-413c4048","./WebMercatorProjection-943e2226"],(function(e,t,n,r,o,i,s,c,a,d,p){"use strict";function u(e,t,n){e=r.defaultValue(e,0),t=r.defaultValue(t,0),n=r.defaultValue(n,0),this.value=new Float32Array([e,t,n])}function f(e,t){const r=e.attributes,o=r.position,s=o.values.length/o.componentsPerAttribute;r.batchId=new i.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:new Float32Array(s)});const c=r.batchId.values;for(let e=0;e<s;++e)c[e]=t}function l(e){const o=e.instances,i=e.projection,s=e.elementIndexUintSupported,a=e.scene3DOnly,p=e.vertexCacheOptimize,u=e.compressVertices,l=e.modelMatrix;let m,h,g=o.length;for(m=0;m<g;++m)if(r.defined(o[m].geometry)){o[m].geometry.primitiveType;break}if(function(e,t,n){let o=!n;const i=e.length;let s;if(!o&&i>1){const t=e[0].modelMatrix;for(s=1;s<i;++s)if(!d.Matrix4.equals(t,e[s].modelMatrix)){o=!0;break}}if(o)for(s=0;s<i;++s)r.defined(e[s].geometry)&&c.GeometryPipeline.transformToWorldCoordinates(e[s]);else d.Matrix4.multiplyTransformation(t,e[0].modelMatrix,t)}(o,l,a),!a)for(m=0;m<g;++m)r.defined(o[m].geometry)&&c.GeometryPipeline.splitLongitude(o[m]);if(function(e){const t=e.length;for(let n=0;n<t;++n){const t=e[n];r.defined(t.geometry)?f(t.geometry,n):r.defined(t.westHemisphereGeometry)&&r.defined(t.eastHemisphereGeometry)&&(f(t.westHemisphereGeometry,n),f(t.eastHemisphereGeometry,n))}}(o),p)for(m=0;m<g;++m){const e=o[m];r.defined(e.geometry)?(c.GeometryPipeline.reorderForPostVertexCache(e.geometry),c.GeometryPipeline.reorderForPreVertexCache(e.geometry)):r.defined(e.westHemisphereGeometry)&&r.defined(e.eastHemisphereGeometry)&&(c.GeometryPipeline.reorderForPostVertexCache(e.westHemisphereGeometry),c.GeometryPipeline.reorderForPreVertexCache(e.westHemisphereGeometry),c.GeometryPipeline.reorderForPostVertexCache(e.eastHemisphereGeometry),c.GeometryPipeline.reorderForPreVertexCache(e.eastHemisphereGeometry))}let y=c.GeometryPipeline.combineInstances(o);for(g=y.length,m=0;m<g;++m){h=y[m];const e=h.attributes;if(a)for(const t in e)e.hasOwnProperty(t)&&e[t].componentDatatype===n.ComponentDatatype.DOUBLE&&c.GeometryPipeline.encodeAttribute(h,t,`${t}3DHigh`,`${t}3DLow`);else for(const o in e)if(e.hasOwnProperty(o)&&e[o].componentDatatype===n.ComponentDatatype.DOUBLE){const e=`${o}3D`,n=`${o}2D`;c.GeometryPipeline.projectTo2D(h,o,e,n,i),r.defined(h.boundingSphere)&&"position"===o&&(h.boundingSphereCV=t.BoundingSphere.fromVertices(h.attributes.position2D.values)),c.GeometryPipeline.encodeAttribute(h,e,`${e}High`,`${e}Low`),c.GeometryPipeline.encodeAttribute(h,n,`${n}High`,`${n}Low`)}u&&c.GeometryPipeline.compressVertices(h)}if(!s){let e=[];for(g=y.length,m=0;m<g;++m)h=y[m],e=e.concat(c.GeometryPipeline.fitToUnsignedShortIndices(h));y=e}return y}function m(e,t,n,o){let i,s,c;const a=o.length-1;if(a>=0){const e=o[a];i=e.offset+e.count,c=e.index,s=n[c].indices.length}else i=0,c=0,s=n[c].indices.length;const d=e.length;for(let a=0;a<d;++a){const d=e[a][t];if(!r.defined(d))continue;const p=d.indices.length;i+p>s&&(i=0,s=n[++c].indices.length),o.push({index:c,offset:i,count:p}),i+=p}}Object.defineProperties(u.prototype,{componentDatatype:{get:function(){return n.ComponentDatatype.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),u.fromCartesian3=function(e){return new u(e.x,e.y,e.z)},u.toValue=function(e,t){return r.defined(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};const h={};function g(e,t){const n=e.attributes;for(const e in n)if(n.hasOwnProperty(e)){const o=n[e];r.defined(o)&&r.defined(o.values)&&t.push(o.values.buffer)}r.defined(e.indices)&&t.push(e.indices.buffer)}function y(e,t){const n=e.length,o=new Float64Array(1+19*n);let i=0;o[i++]=n;for(let t=0;t<n;t++){const n=e[t];if(d.Matrix4.pack(n.modelMatrix,o,i),i+=d.Matrix4.packedLength,r.defined(n.attributes)&&r.defined(n.attributes.offset)){const e=n.attributes.offset.value;o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2]}i+=3}return t.push(o.buffer),o}function b(e){const n=e.length,o=1+(t.BoundingSphere.packedLength+1)*n,i=new Float32Array(o);let s=0;i[s++]=n;for(let o=0;o<n;++o){const n=e[o];r.defined(n)?(i[s++]=1,t.BoundingSphere.pack(e[o],i,s)):i[s++]=0,s+=t.BoundingSphere.packedLength}return i}function x(e){const n=new Array(e[0]);let r=0,o=1;for(;o<e.length;)1===e[o++]&&(n[r]=t.BoundingSphere.unpack(e,o)),++r,o+=t.BoundingSphere.packedLength;return n}h.combineGeometry=function(e){let n,o;const i=e.instances,s=i.length;let a,d,p=!1;s>0&&(n=l(e),n.length>0&&(o=c.GeometryPipeline.createAttributeLocations(n[0]),e.createPickOffsets&&(a=function(e,t){const n=[];return m(e,"geometry",t,n),m(e,"westHemisphereGeometry",t,n),m(e,"eastHemisphereGeometry",t,n),n}(i,n))),r.defined(i[0].attributes)&&r.defined(i[0].attributes.offset)&&(d=new Array(s),p=!0));const u=new Array(s),f=new Array(s);for(let e=0;e<s;++e){const n=i[e],o=n.geometry;r.defined(o)&&(u[e]=o.boundingSphere,f[e]=o.boundingSphereCV,p&&(d[e]=n.geometry.offsetAttribute));const s=n.eastHemisphereGeometry,c=n.westHemisphereGeometry;r.defined(s)&&r.defined(c)&&(r.defined(s.boundingSphere)&&r.defined(c.boundingSphere)&&(u[e]=t.BoundingSphere.union(s.boundingSphere,c.boundingSphere)),r.defined(s.boundingSphereCV)&&r.defined(c.boundingSphereCV)&&(f[e]=t.BoundingSphere.union(s.boundingSphereCV,c.boundingSphereCV)))}return{geometries:n,modelMatrix:e.modelMatrix,attributeLocations:o,pickOffsets:a,offsetInstanceExtend:d,boundingSpheres:u,boundingSpheresCV:f}},h.packCreateGeometryResults=function(e,n){const o=new Float64Array(function(e){let n=1;const o=e.length;for(let i=0;i<o;i++){const o=e[i];if(++n,!r.defined(o))continue;const s=o.attributes;n+=7+2*t.BoundingSphere.packedLength+(r.defined(o.indices)?o.indices.length:0);for(const e in s)s.hasOwnProperty(e)&&r.defined(s[e])&&(n+=5+s[e].values.length)}return n}(e)),i=[],s={},c=e.length;let a=0;o[a++]=c;for(let n=0;n<c;n++){const c=e[n],d=r.defined(c);if(o[a++]=d?1:0,!d)continue;o[a++]=c.primitiveType,o[a++]=c.geometryType,o[a++]=r.defaultValue(c.offsetAttribute,-1);const p=r.defined(c.boundingSphere)?1:0;o[a++]=p,p&&t.BoundingSphere.pack(c.boundingSphere,o,a),a+=t.BoundingSphere.packedLength;const u=r.defined(c.boundingSphereCV)?1:0;o[a++]=u,u&&t.BoundingSphere.pack(c.boundingSphereCV,o,a),a+=t.BoundingSphere.packedLength;const f=c.attributes,l=[];for(const e in f)f.hasOwnProperty(e)&&r.defined(f[e])&&(l.push(e),r.defined(s[e])||(s[e]=i.length,i.push(e)));o[a++]=l.length;for(let e=0;e<l.length;e++){const t=l[e],n=f[t];o[a++]=s[t],o[a++]=n.componentDatatype,o[a++]=n.componentsPerAttribute,o[a++]=n.normalize?1:0,o[a++]=n.values.length,o.set(n.values,a),a+=n.values.length}const m=r.defined(c.indices)?c.indices.length:0;o[a++]=m,m>0&&(o.set(c.indices,a),a+=m)}return n.push(o.buffer),{stringTable:i,packedData:o}},h.unpackCreateGeometryResults=function(e){const r=e.stringTable,o=e.packedData;let c;const d=new Array(o[0]);let p=0,u=1;for(;u<o.length;){if(!(1===o[u++])){d[p++]=void 0;continue}const e=o[u++],f=o[u++];let l,m,h=o[u++];-1===h&&(h=void 0);1===o[u++]&&(l=t.BoundingSphere.unpack(o,u)),u+=t.BoundingSphere.packedLength;let g,y,b;1===o[u++]&&(m=t.BoundingSphere.unpack(o,u)),u+=t.BoundingSphere.packedLength;const x=new s.GeometryAttributes,G=o[u++];for(c=0;c<G;c++){const e=r[o[u++]],t=o[u++];b=o[u++];const s=0!==o[u++];g=o[u++],y=n.ComponentDatatype.createTypedArray(t,g);for(let e=0;e<g;e++)y[e]=o[u++];x[e]=new i.GeometryAttribute({componentDatatype:t,componentsPerAttribute:b,normalize:s,values:y})}let S;if(g=o[u++],g>0){const e=y.length/b;for(S=a.IndexDatatype.createTypedArray(e,g),c=0;c<g;c++)S[c]=o[u++]}d[p++]=new i.Geometry({primitiveType:e,geometryType:f,boundingSphere:l,boundingSphereCV:m,indices:S,attributes:x,offsetAttribute:h})}return d},h.packCombineGeometryParameters=function(e,n){const r=e.createGeometryResults,o=r.length;for(let e=0;e<o;e++)n.push(r[e].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:y(e.instances,n),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof t.GeographicProjection,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}},h.unpackCombineGeometryParameters=function(e){const n=function(e){const t=e,n=new Array(t[0]);let o=0,i=1;for(;i<t.length;){const e=d.Matrix4.unpack(t,i);let s;i+=d.Matrix4.packedLength,r.defined(t[i])&&(s={offset:new u(t[i],t[i+1],t[i+2])}),i+=3,n[o++]={modelMatrix:e,attributes:s}}return n}(e.packedInstances),i=e.createGeometryResults,s=i.length;let c=0;for(let e=0;e<s;e++){const t=h.unpackCreateGeometryResults(i[e]),r=t.length;for(let e=0;e<r;e++){const r=t[e];n[c].geometry=r,++c}}const a=o.Ellipsoid.clone(e.ellipsoid);return{instances:n,ellipsoid:a,projection:e.isGeographic?new t.GeographicProjection(a):new p.WebMercatorProjection(a),elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:d.Matrix4.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}},h.packCombineGeometryResults=function(e,t){r.defined(e.geometries)&&function(e,t){const n=e.length;for(let r=0;r<n;++r)g(e[r],t)}(e.geometries,t);const n=b(e.boundingSpheres),o=b(e.boundingSpheresCV);return t.push(n.buffer,o.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:n,boundingSpheresCV:o}},h.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:x(e.boundingSpheres),boundingSpheresCV:x(e.boundingSpheresCV)}};var G=h;e.PrimitivePipeline=G}));
|