@mapgis/cesium 16.8.0 → 16.8.1
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/Documentation/Color.html +185 -185
- package/Documentation/ModelFilterTool.html +3 -3
- package/Documentation/Scene.html +26 -26
- package/dist/Cesium.d.ts +4262 -152
- package/dist/Cesium.js +3 -3
- package/dist/Workers/{Color-2e7c1984.js → Color-d1173a3e.js} +1 -1
- package/dist/Workers/createPolylineGeometry.js +1 -1
- package/dist/Workers/createSimplePolylineGeometry.js +1 -1
- package/dist/Workers/createVectorTileGeometries.js +1 -1
- package/dist/Workers/createVectorTilePolygons.js +1 -1
- package/package.json +1 -1
- package/@mapgiscesium@16.5.0/346/233/264/346/226/260/350/257/264/346/230/216.md +0 -8
- package/dist/Workers/AttributeCompression-b9605c73.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-26346796.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-450093aa.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-6524b214.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-73a9d462.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-996de4d7.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-c65efdad.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-cbc92df1.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-f0ce5db6.js +0 -1
- package/dist/Workers/AxisAlignedBoundingBox-fe8fad3e.js +0 -1
- package/dist/Workers/BoundingRectangle-28b9fdf0.js +0 -1
- package/dist/Workers/BoundingRectangle-487613f3.js +0 -1
- package/dist/Workers/BoundingRectangle-97e6b58d.js +0 -1
- package/dist/Workers/BoundingRectangle-b3ae8525.js +0 -1
- package/dist/Workers/BoundingRectangle-ce593811.js +0 -1
- package/dist/Workers/BoundingRectangle-d5cbbc95.js +0 -1
- package/dist/Workers/BoundingRectangle-d6d7a8e5.js +0 -1
- package/dist/Workers/BoundingRectangle-ecccc268.js +0 -1
- package/dist/Workers/BoundingRectangle-f1ffad8b.js +0 -1
- package/dist/Workers/BoxGeometry-0f1f8568.js +0 -1
- package/dist/Workers/BoxGeometry-13026ce3.js +0 -1
- package/dist/Workers/BoxGeometry-2d60329e.js +0 -1
- package/dist/Workers/BoxGeometry-3726be8b.js +0 -1
- package/dist/Workers/BoxGeometry-6dbcc914.js +0 -1
- package/dist/Workers/BoxGeometry-9e762f2e.js +0 -1
- package/dist/Workers/BoxGeometry-bd552da0.js +0 -1
- package/dist/Workers/BoxGeometry-d47744b6.js +0 -1
- package/dist/Workers/BoxGeometry-f55ff093.js +0 -1
- package/dist/Workers/Cartesian2-c1eb9da0.js +0 -1
- package/dist/Workers/Color-3aa21182.js +0 -1
- package/dist/Workers/Color-5b416733.js +0 -1
- package/dist/Workers/Color-98ea9560.js +0 -1
- package/dist/Workers/Color-9f2a6781.js +0 -1
- package/dist/Workers/Color-a4bb5b8a.js +0 -1
- package/dist/Workers/Color-af213549.js +0 -1
- package/dist/Workers/Color-b3353b71.js +0 -1
- package/dist/Workers/Color-cab9e933.js +0 -1
- package/dist/Workers/Color-d7f86623.js +0 -1
- package/dist/Workers/Color-e9b0b56b.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-0cd605e2.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-4311fc38.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-838fa1ce.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-8f8d8ac1.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-cd63dc83.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-ceede0d0.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-df225097.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-e350124e.js +0 -1
- package/dist/Workers/CoplanarPolygonGeometryLibrary-ed9489b1.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-0471dcd0.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-2321175a.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-353eec0a.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-4c3150e8.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-4db1f8fd.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-4dfdc665.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-7ab6160a.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-90fffecc.js +0 -1
- package/dist/Workers/CorridorGeometryLibrary-df6e9ae6.js +0 -1
- package/dist/Workers/CylinderGeometry-325283f2.js +0 -1
- package/dist/Workers/CylinderGeometry-639b5060.js +0 -1
- package/dist/Workers/CylinderGeometry-6c32efdc.js +0 -1
- package/dist/Workers/CylinderGeometry-7cfc0752.js +0 -1
- package/dist/Workers/CylinderGeometry-8107a836.js +0 -1
- package/dist/Workers/CylinderGeometry-d0b18367.js +0 -1
- package/dist/Workers/CylinderGeometry-d0bc500d.js +0 -1
- package/dist/Workers/CylinderGeometry-ea8d45f7.js +0 -1
- package/dist/Workers/CylinderGeometry-f8c8f23b.js +0 -1
- package/dist/Workers/EllipseGeometry-196fb5d2.js +0 -1
- package/dist/Workers/EllipseGeometry-34b7aab0.js +0 -1
- package/dist/Workers/EllipseGeometry-3a63604a.js +0 -1
- package/dist/Workers/EllipseGeometry-4dc2f3cd.js +0 -1
- package/dist/Workers/EllipseGeometry-5bc7efb7.js +0 -1
- package/dist/Workers/EllipseGeometry-a00d9fde.js +0 -1
- package/dist/Workers/EllipseGeometry-a21e62b2.js +0 -1
- package/dist/Workers/EllipseGeometry-b25df4e1.js +0 -1
- package/dist/Workers/EllipseGeometry-fce1c172.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-2e02e40d.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-716ccbc1.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-774fb909.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-787e8d53.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-8b1f8e47.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-9003dd80.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-bb11ea48.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-cde71e7f.js +0 -1
- package/dist/Workers/EllipseGeometryLibrary-fc808930.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-210384df.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-3831cf67.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-63fa8f1c.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-8bc5a2e5.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-97648130.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-c0b0a9a4.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-dbb4067a.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-e46b4af5.js +0 -1
- package/dist/Workers/EllipseOutlineGeometry-ec5d7684.js +0 -1
- package/dist/Workers/EllipsoidGeodesic-a0581819.js +0 -1
- package/dist/Workers/EllipsoidGeometry-499e5b68.js +0 -1
- package/dist/Workers/EllipsoidGeometry-5af792d2.js +0 -1
- package/dist/Workers/EllipsoidGeometry-6a2f4f30.js +0 -1
- package/dist/Workers/EllipsoidGeometry-71f9609d.js +0 -1
- package/dist/Workers/EllipsoidGeometry-751dd3dc.js +0 -1
- package/dist/Workers/EllipsoidGeometry-8844cb55.js +0 -1
- package/dist/Workers/EllipsoidGeometry-d0a3d570.js +0 -1
- package/dist/Workers/EllipsoidGeometry-dc85d254.js +0 -1
- package/dist/Workers/EllipsoidGeometry-fcbf9df5.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-008bdd22.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-34940155.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-66e52f3c.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-9466799f.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-aa49f341.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-bf6fec74.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-cb9dbedb.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-e9a5c4a4.js +0 -1
- package/dist/Workers/EllipsoidOutlineGeometry-fd9318b6.js +0 -1
- package/dist/Workers/EllipsoidRhumbLine-2fd480f5.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-27707043.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-67eb8fd7.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-7e7cce04.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-b07a98b6.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-b362af49.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-d3bb82f1.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-d5fd24ed.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-eee5ec6d.js +0 -1
- package/dist/Workers/EllipsoidTangentPlane-fd3d43cb.js +0 -1
- package/dist/Workers/EncodedCartesian3-6f721b97.js +0 -1
- package/dist/Workers/FrustumGeometry-037da224.js +0 -1
- package/dist/Workers/FrustumGeometry-54d281be.js +0 -1
- package/dist/Workers/FrustumGeometry-64fca627.js +0 -1
- package/dist/Workers/FrustumGeometry-697158a6.js +0 -1
- package/dist/Workers/FrustumGeometry-705dc598.js +0 -1
- package/dist/Workers/FrustumGeometry-7a28dc14.js +0 -1
- package/dist/Workers/FrustumGeometry-a0988373.js +0 -1
- package/dist/Workers/FrustumGeometry-b357a0a2.js +0 -1
- package/dist/Workers/FrustumGeometry-de2d6bb2.js +0 -1
- package/dist/Workers/GeometryAttribute-8106b887.js +0 -1
- package/dist/Workers/GeometryAttribute-842f7f8f.js +0 -1
- package/dist/Workers/GeometryAttribute-9509a6ac.js +0 -1
- package/dist/Workers/GeometryAttribute-9cc31675.js +0 -1
- package/dist/Workers/GeometryAttribute-a5b580d6.js +0 -1
- package/dist/Workers/GeometryAttribute-b0d1422a.js +0 -1
- package/dist/Workers/GeometryAttribute-e03451d8.js +0 -1
- package/dist/Workers/GeometryAttribute-f0467ee1.js +0 -1
- package/dist/Workers/GeometryAttribute-f82de479.js +0 -1
- package/dist/Workers/GeometryInstance-083d7584.js +0 -1
- package/dist/Workers/GeometryInstance-1af88174.js +0 -1
- package/dist/Workers/GeometryInstance-2f8b5c4a.js +0 -1
- package/dist/Workers/GeometryInstance-35d037ed.js +0 -1
- package/dist/Workers/GeometryInstance-3fbf3924.js +0 -1
- package/dist/Workers/GeometryInstance-539e00df.js +0 -1
- package/dist/Workers/GeometryInstance-5729d1a7.js +0 -1
- package/dist/Workers/GeometryInstance-a24fc358.js +0 -1
- package/dist/Workers/GeometryInstance-ed6965ba.js +0 -1
- package/dist/Workers/GeometryPipeline-0c08714b.js +0 -1
- package/dist/Workers/GeometryPipeline-160871a5.js +0 -1
- package/dist/Workers/GeometryPipeline-1f7508a2.js +0 -1
- package/dist/Workers/GeometryPipeline-21c7c817.js +0 -1
- package/dist/Workers/GeometryPipeline-2e63b615.js +0 -1
- package/dist/Workers/GeometryPipeline-57087f49.js +0 -1
- package/dist/Workers/GeometryPipeline-64734a0f.js +0 -1
- package/dist/Workers/GeometryPipeline-6f352065.js +0 -1
- package/dist/Workers/GeometryPipeline-fef2cc93.js +0 -1
- package/dist/Workers/IntersectionTests-12a15587.js +0 -1
- package/dist/Workers/IntersectionTests-318fd637.js +0 -1
- package/dist/Workers/IntersectionTests-46ce3a3a.js +0 -1
- package/dist/Workers/IntersectionTests-ac09ddc2.js +0 -1
- package/dist/Workers/IntersectionTests-ce427234.js +0 -1
- package/dist/Workers/IntersectionTests-ed46e10e.js +0 -1
- package/dist/Workers/IntersectionTests-f3d5850d.js +0 -1
- package/dist/Workers/IntersectionTests-f5c29800.js +0 -1
- package/dist/Workers/IntersectionTests-f6c80ab5.js +0 -1
- package/dist/Workers/OrientedBoundingBox-155b5606.js +0 -1
- package/dist/Workers/OrientedBoundingBox-33a0a521.js +0 -1
- package/dist/Workers/OrientedBoundingBox-528af689.js +0 -1
- package/dist/Workers/OrientedBoundingBox-6ff47a8a.js +0 -1
- package/dist/Workers/OrientedBoundingBox-83b01426.js +0 -1
- package/dist/Workers/OrientedBoundingBox-a6a4c32b.js +0 -1
- package/dist/Workers/OrientedBoundingBox-bd219df7.js +0 -1
- package/dist/Workers/OrientedBoundingBox-d8d60f95.js +0 -1
- package/dist/Workers/OrientedBoundingBox-f9919823.js +0 -1
- package/dist/Workers/Plane-07db2b77.js +0 -1
- package/dist/Workers/Plane-0f30f65b.js +0 -1
- package/dist/Workers/Plane-8d6fa990.js +0 -1
- package/dist/Workers/Plane-91027bbd.js +0 -1
- package/dist/Workers/Plane-9e807de8.js +0 -1
- package/dist/Workers/Plane-d53c8e90.js +0 -1
- package/dist/Workers/Plane-ee0aa150.js +0 -1
- package/dist/Workers/Plane-f4840d15.js +0 -1
- package/dist/Workers/Plane-fa12edbb.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-1b173d8c.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-1c2452bf.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-2394a24c.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-3a7fcee1.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-814d3108.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-8ed54fa5.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-8f1626d5.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-e7ef9273.js +0 -1
- package/dist/Workers/PolygonGeometryLibrary-edec67a0.js +0 -1
- package/dist/Workers/PolygonPipeline-1d8700a4.js +0 -1
- package/dist/Workers/PolygonPipeline-37a33a39.js +0 -1
- package/dist/Workers/PolygonPipeline-3925588d.js +0 -1
- package/dist/Workers/PolygonPipeline-5983aa11.js +0 -1
- package/dist/Workers/PolygonPipeline-74b9dcb6.js +0 -1
- package/dist/Workers/PolygonPipeline-7b19eef3.js +0 -1
- package/dist/Workers/PolygonPipeline-7c54e19e.js +0 -1
- package/dist/Workers/PolygonPipeline-c4284eb2.js +0 -1
- package/dist/Workers/PolygonPipeline-c8c3d457.js +0 -1
- package/dist/Workers/PolylinePipeline-36bb5be5.js +0 -1
- package/dist/Workers/PolylinePipeline-5f01f4e3.js +0 -1
- package/dist/Workers/PolylinePipeline-6484d4ee.js +0 -1
- package/dist/Workers/PolylinePipeline-8831ea08.js +0 -1
- package/dist/Workers/PolylinePipeline-90d28432.js +0 -1
- package/dist/Workers/PolylinePipeline-971ba240.js +0 -1
- package/dist/Workers/PolylinePipeline-9b4a6834.js +0 -1
- package/dist/Workers/PolylinePipeline-d59947c4.js +0 -1
- package/dist/Workers/PolylinePipeline-dbe39542.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-18fa5257.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-5cce30e5.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-7347f6ba.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-81481506.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-b532118b.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-dcb7f513.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-e2e6c33b.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-e435332a.js +0 -1
- package/dist/Workers/PolylineVolumeGeometryLibrary-f59e9faa.js +0 -1
- package/dist/Workers/PrimitivePipeline-35ff0c65.js +0 -1
- package/dist/Workers/PrimitivePipeline-757ec521.js +0 -1
- package/dist/Workers/PrimitivePipeline-805c9b16.js +0 -1
- package/dist/Workers/PrimitivePipeline-928d43fe.js +0 -1
- package/dist/Workers/PrimitivePipeline-929842fb.js +0 -1
- package/dist/Workers/PrimitivePipeline-9deb0937.js +0 -1
- package/dist/Workers/PrimitivePipeline-a63836f9.js +0 -1
- package/dist/Workers/PrimitivePipeline-d376903b.js +0 -1
- package/dist/Workers/PrimitivePipeline-dcf6bdc3.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-1ea04494.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-2c3c1c71.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-44075333.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-61f60679.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-89d8ce03.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-9e402320.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-ae3770f2.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-af611323.js +0 -1
- package/dist/Workers/RectangleGeometryLibrary-b15d6d79.js +0 -1
- package/dist/Workers/TerrainEncoding-0c1d54fd.js +0 -1
- package/dist/Workers/TerrainEncoding-161cf654.js +0 -1
- package/dist/Workers/TerrainEncoding-390964a7.js +0 -1
- package/dist/Workers/TerrainEncoding-4f6e002f.js +0 -1
- package/dist/Workers/TerrainEncoding-652abf1d.js +0 -1
- package/dist/Workers/TerrainEncoding-6f894d6e.js +0 -1
- package/dist/Workers/TerrainEncoding-a621a0f9.js +0 -1
- package/dist/Workers/TerrainEncoding-ca220d73.js +0 -1
- package/dist/Workers/TerrainEncoding-e8b346f1.js +0 -1
- package/dist/Workers/Transforms-1b5921a3.js +0 -1
- package/dist/Workers/Transforms-1fa85493.js +0 -1
- package/dist/Workers/Transforms-5a0f5c0d.js +0 -1
- package/dist/Workers/Transforms-713e2e92.js +0 -1
- package/dist/Workers/Transforms-75c1d9a1.js +0 -1
- package/dist/Workers/Transforms-8c8e0c6f.js +0 -1
- package/dist/Workers/Transforms-b0beda9b.js +0 -1
- package/dist/Workers/Transforms-badb9ae9.js +0 -1
- package/dist/Workers/Transforms-ce97037a.js +0 -1
- package/dist/Workers/WallGeometryLibrary-2ee708d4.js +0 -1
- package/dist/Workers/WallGeometryLibrary-3a0c8447.js +0 -1
- package/dist/Workers/WallGeometryLibrary-40d299b6.js +0 -1
- package/dist/Workers/WallGeometryLibrary-5386b8d1.js +0 -1
- package/dist/Workers/WallGeometryLibrary-62af8286.js +0 -1
- package/dist/Workers/WallGeometryLibrary-769cd0fb.js +0 -1
- package/dist/Workers/WallGeometryLibrary-950a2a48.js +0 -1
- package/dist/Workers/WallGeometryLibrary-a24bff99.js +0 -1
- package/dist/Workers/WallGeometryLibrary-ff52859c.js +0 -1
- package/dist/Workers/WebMercatorProjection-e6de5e67.js +0 -1
- /package/dist/Workers/{Color-6861a390.js → Color-b92c4c84.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-dcb7f513","./when-ae2e0b60","./Math-5bbcea10","./Transforms-1b5921a3","./PolylinePipeline-5f01f4e3"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,b=W,P=X,A=Y,B=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(b=R.Cartesian3.add(v,w,b),A=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,A),A),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),x=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(b,z,P,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),P,O)})):(P=R.Cartesian3.add(v,w,P),A=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,A),A),A),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(b,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),x=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(P,z,b,d,O)}):M.push({rightPositions:$(v,w,b,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),B=_(e,f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=B)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:B,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-18fa5257","./when-ae2e0b60","./Math-5bbcea10","./Transforms-75c1d9a1","./PolylinePipeline-90d28432"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,P=W,A=X,B=Y,b=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(P=R.Cartesian3.add(v,w,P),B=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,B),B),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(A,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),x=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(P,z,A,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),A,O)})):(A=R.Cartesian3.add(v,w,A),B=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,B),B),B),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),x=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(A,z,P,d,O)}):M.push({rightPositions:$(v,w,P,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),b=_(e,f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=b)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:b,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-e2e6c33b","./when-ae2e0b60","./Math-5bbcea10","./Transforms-1fa85493","./PolylinePipeline-971ba240"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,b=W,P=X,A=Y,B=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(b=R.Cartesian3.add(v,w,b),A=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,A),A),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),x=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(b,z,P,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),P,O)})):(P=R.Cartesian3.add(v,w,P),A=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,A),A),A),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(b,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),x=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(P,z,b,d,O)}):M.push({rightPositions:$(v,w,b,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),B=_(e,f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=B)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:B,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-e435332a","./when-ae2e0b60","./Math-5bbcea10","./Transforms-713e2e92","./PolylinePipeline-d59947c4"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,P=W,A=X,B=Y,b=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(P=R.Cartesian3.add(v,w,P),B=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,B),B),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(A,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),x=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(P,z,A,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),A,O)})):(A=R.Cartesian3.add(v,w,A),B=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,B),B),B),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),x=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(A,z,P,d,O)}):M.push({rightPositions:$(v,w,P,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),b=_(e,f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=b)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:b,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-7347f6ba","./when-ae2e0b60","./Math-5bbcea10","./Transforms-b0beda9b","./PolylinePipeline-dbe39542"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,b=W,P=X,A=Y,B=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(b=R.Cartesian3.add(v,w,b),A=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,A),A),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),x=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(b,z,P,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),P,O)})):(P=R.Cartesian3.add(v,w,P),A=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,A),A),A),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(b,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),x=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(P,z,b,d,O)}):M.push({rightPositions:$(v,w,b,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),B=_(e,f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=B)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:B,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-5cce30e5","./when-ae2e0b60","./Math-5bbcea10","./Transforms-badb9ae9","./PolylinePipeline-36bb5be5"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,b=W,P=X,A=Y,B=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(b=R.Cartesian3.add(v,w,b),A=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,A),A),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),x=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(b,z,P,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),P,O)})):(P=R.Cartesian3.add(v,w,P),A=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,A),A),A),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(b,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),x=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(P,z,b,d,O)}):M.push({rightPositions:$(v,w,b,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),B=_(e,f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=B)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:B,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-38b35910","./PolylineVolumeGeometryLibrary-f59e9faa","./when-ae2e0b60","./Math-5bbcea10","./Transforms-ce97037a","./PolylinePipeline-8831ea08"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,P=W,A=X,B=Y,b=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(P=R.Cartesian3.add(v,w,P),B=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,B),B),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(A,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),x=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(P,z,A,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),A,O)})):(A=R.Cartesian3.add(v,w,A),B=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,B),B),B),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),x=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(A,z,P,d,O)}):M.push({rightPositions:$(v,w,P,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),b=_(e,f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=b)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:b,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-81481506","./when-ae2e0b60","./Math-5bbcea10","./Transforms-8c8e0c6f","./PolylinePipeline-6484d4ee"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,P=W,A=X,B=Y,b=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(P=R.Cartesian3.add(v,w,P),B=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,B),B),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(A,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),A=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,2*c,A),A),x=R.Cartesian3.add(P,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(P,z,A,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),A,O)})):(A=R.Cartesian3.add(v,w,A),B=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,B),B),B),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(B,I[1]),b=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,P),P),P),x=R.Cartesian3.add(A,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(A,z,P,d,O)}):M.push({rightPositions:$(v,w,P,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),b=_(e,f,c,b),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=b)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:b,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./Cartesian2-c1eb9da0","./PolylineVolumeGeometryLibrary-b532118b","./when-ae2e0b60","./Math-5bbcea10","./Transforms-5a0f5c0d","./PolylinePipeline-9b4a6834"],function(a,R,V,s,Q,u,U){"use strict";var e={},G=new R.Cartesian3,d=new R.Cartesian3,p=new R.Cartesian3,m=new R.Cartesian3,I=[new R.Cartesian3,new R.Cartesian3],q=new R.Cartesian3,j=new R.Cartesian3,k=new R.Cartesian3,F=new R.Cartesian3,H=new R.Cartesian3,J=new R.Cartesian3,K=new R.Cartesian3,W=new R.Cartesian3,X=new R.Cartesian3,Y=new R.Cartesian3,c=new u.Quaternion,g=new u.Matrix3;function Z(a,e,r,n,t){var i,s=R.Cartesian3.angleBetween(R.Cartesian3.subtract(e,a,G),R.Cartesian3.subtract(r,a,d)),o=n===V.CornerType.BEVELED?1:Math.ceil(s/Q.CesiumMath.toRadians(5))+1,n=3*o,C=new Array(n),l=(C[n-3]=r.x,C[n-2]=r.y,C[n-1]=r.z,i=t?u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(R.Cartesian3.negate(a,G),s/o,c),g):u.Matrix3.fromQuaternion(u.Quaternion.fromAxisAngle(a,s/o,c),g),0);e=R.Cartesian3.clone(e,G);for(var y=0;y<o;y++)e=u.Matrix3.multiplyByVector(i,e,e),C[l++]=e.x,C[l++]=e.y,C[l++]=e.z;return C}function $(a,e,r,n){var t=G;return n||(e=R.Cartesian3.negate(e,e)),[(t=R.Cartesian3.add(a,e,t)).x,t.y,t.z,r.x,r.y,r.z]}function _(a,e,r,n){for(var t=new Array(a.length),i=new Array(a.length),s=R.Cartesian3.multiplyByScalar(e,r,G),o=R.Cartesian3.negate(s,d),C=0,l=a.length-1,y=0;y<a.length;y+=3){var u=R.Cartesian3.fromArray(a,y,p),c=R.Cartesian3.add(u,o,m),c=(t[C++]=c.x,t[C++]=c.y,t[C++]=c.z,R.Cartesian3.add(u,s,m));i[l--]=c.z,i[l--]=c.y,i[l--]=c.x}return n.push(t,i),n}e.addAttribute=function(a,e,r,n){var t=e.x,i=e.y,e=e.z;s.defined(r)&&(a[r]=t,a[r+1]=i,a[r+2]=e),s.defined(n)&&(a[n]=e,a[n-1]=i,a[n-2]=t)};var aa=new R.Cartesian3,ea=new R.Cartesian3;e.computePositions=function(a){for(var e,r,n,t,i,s,o,C,l=a.granularity,y=a.positions,u=a.ellipsoid,c=a.width/2,d=a.cornerType,p=a.saveAttributes,m=q,g=j,h=k,f=F,w=H,z=J,x=K,b=W,P=X,A=Y,B=[],E=p?[]:void 0,S=p?[]:void 0,v=y[0],D=y[1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),m=u.geodeticSurfaceNormal(v,m),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),x=(p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),R.Cartesian3.clone(v,x)),v=D,h=R.Cartesian3.negate(g,h),M=[],T=y.length,N=1;N<T-1;N++){m=u.geodeticSurfaceNormal(v,m),D=y[N+1],g=R.Cartesian3.normalize(R.Cartesian3.subtract(D,v,g),g),w=R.Cartesian3.normalize(R.Cartesian3.add(g,h,w),w);var L=R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(g,m),aa),O=(R.Cartesian3.subtract(g,L,L),R.Cartesian3.normalize(L,L),R.Cartesian3.multiplyByScalar(m,R.Cartesian3.dot(h,m),ea));R.Cartesian3.subtract(h,O,O),R.Cartesian3.normalize(O,O),!Q.CesiumMath.equalsEpsilon(Math.abs(R.Cartesian3.dot(L,O)),1,Q.CesiumMath.EPSILON7)&&(w=R.Cartesian3.cross(w,m,w),w=R.Cartesian3.cross(m,w,w),w=R.Cartesian3.normalize(w,w),L=c/Math.max(.25,R.Cartesian3.magnitude(R.Cartesian3.cross(w,h,G))),O=V.PolylineVolumeGeometryLibrary.angleIsGreaterThanPi(g,h,v,u),w=R.Cartesian3.multiplyByScalar(w,L,w),O?(b=R.Cartesian3.add(v,w,b),A=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,A),A),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(P,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),P=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,2*c,P),P),x=R.Cartesian3.add(b,R.Cartesian3.multiplyByScalar(f,c,x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({leftPositions:Z(b,z,P,d,O)}):M.push({leftPositions:$(v,R.Cartesian3.negate(w,w),P,O)})):(P=R.Cartesian3.add(v,w,P),A=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,A),A),A),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(A,I[1]),B=_(e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),z=R.Cartesian3.clone(b,z),f=R.Cartesian3.normalize(R.Cartesian3.cross(m,g,f),f),b=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,2*c,b),b),b),x=R.Cartesian3.add(P,R.Cartesian3.negate(R.Cartesian3.multiplyByScalar(f,c,x),x),x),d===V.CornerType.ROUNDED||d===V.CornerType.BEVELED?M.push({rightPositions:Z(P,z,b,d,O)}):M.push({rightPositions:$(v,w,b,O)})),h=R.Cartesian3.negate(g,h)),v=D}return m=u.geodeticSurfaceNormal(v,m),I[0]=R.Cartesian3.clone(x,I[0]),I[1]=R.Cartesian3.clone(v,I[1]),e=U.PolylinePipeline.generateArc({positions:I,granularity:l,ellipsoid:u}),B=_(e,f,c,B),p&&(E.push(f.x,f.y,f.z),S.push(m.x,m.y,m.z)),d===V.CornerType.ROUNDED&&(a=q,n=k,t=(r=B)[1],i=R.Cartesian3.fromArray(r[1],t.length-3,j),n=R.Cartesian3.fromArray(r[0],0,n),s=Z(a=R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1),o=r.length-1,C=r[o-1],t=r[o],i=R.Cartesian3.fromArray(C,C.length-3,i),n=R.Cartesian3.fromArray(t,0,n),r=[s,Z(R.Cartesian3.midpoint(i,n,a),i,n,V.CornerType.ROUNDED,!1)]),{positions:B,corners:M,lefts:E,normals:S,endPositions:r}},a.CorridorGeometryLibrary=e});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-713e2e92","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-e03451d8","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,d=new m.VertexFormat,p={vertexFormat:d,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,d),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(p.length=n,p.topRadius=o,p.bottomRadius=i,p.slices=s,p.offsetAttribute=-1===t?void 0:t,new u(p))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,f=n.normal||n.tangent||n.bitangent;if(f){for(var b=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);f&&(h.x=G,h.y=w,b&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(p[c++]=h.x,p[c++]=h.y,p[c++]=h.z,p[c++]=h.x,p[c++]=h.y,p[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);d[T++]=(L.x+O)/(2*O),d[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-ce97037a","./Cartesian2-38b35910","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-f82de479","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,p=new m.VertexFormat,d={vertexFormat:p,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,p),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(d.length=n,d.topRadius=o,d.bottomRadius=i,d.slices=s,d.offsetAttribute=-1===t?void 0:t,new u(d))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),p=n.st?new Float32Array(2*m):void 0,d=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,f=n.normal||n.tangent||n.bitangent;if(f){for(var b=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);f&&(h.x=G,h.y=w,b&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(d[c++]=h.x,d[c++]=h.y,d[c++]=h.z,d[c++]=h.x,d[c++]=h.y,d[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(d[c++]=0,d[c++]=0,d[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(d[c++]=0,d[c++]=0,d[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);p[T++]=(L.x+O)/(2*O),p[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-8c8e0c6f","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-8106b887","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,p=new m.VertexFormat,d={vertexFormat:p,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,p),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(d.length=n,d.topRadius=o,d.bottomRadius=i,d.slices=s,d.offsetAttribute=-1===t?void 0:t,new u(d))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),p=n.st?new Float32Array(2*m):void 0,d=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,f=n.normal||n.tangent||n.bitangent;if(f){for(var b=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);f&&(h.x=G,h.y=w,b&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(d[c++]=h.x,d[c++]=h.y,d[c++]=h.z,d[c++]=h.x,d[c++]=h.y,d[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(d[c++]=0,d[c++]=0,d[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(d[c++]=0,d[c++]=0,d[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);p[T++]=(L.x+O)/(2*O),p[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-1fa85493","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-9cc31675","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,p=new m.VertexFormat,d={vertexFormat:p,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,p),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(d.length=n,d.topRadius=o,d.bottomRadius=i,d.slices=s,d.offsetAttribute=-1===t?void 0:t,new u(d))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),p=n.st?new Float32Array(2*m):void 0,d=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,f=n.normal||n.tangent||n.bitangent;if(f){for(var b=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);f&&(h.x=G,h.y=w,b&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(d[c++]=h.x,d[c++]=h.y,d[c++]=h.z,d[c++]=h.x,d[c++]=h.y,d[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(d[c++]=0,d[c++]=0,d[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(d[c++]=0,d[c++]=0,d[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);p[T++]=(L.x+O)/(2*O),p[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-b0beda9b","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-9509a6ac","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,d=new m.VertexFormat,p={vertexFormat:d,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,d),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(p.length=n,p.topRadius=o,p.bottomRadius=i,p.slices=s,p.offsetAttribute=-1===t?void 0:t,new u(p))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,b=n.normal||n.tangent||n.bitangent;if(b){for(var f=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);b&&(h.x=G,h.y=w,f&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(p[c++]=h.x,p[c++]=h.y,p[c++]=h.z,p[c++]=h.x,p[c++]=h.y,p[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);d[T++]=(L.x+O)/(2*O),d[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-1b5921a3","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-b0d1422a","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,d=new m.VertexFormat,p={vertexFormat:d,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,d),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(p.length=n,p.topRadius=o,p.bottomRadius=i,p.slices=s,p.offsetAttribute=-1===t?void 0:t,new u(p))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,b=n.normal||n.tangent||n.bitangent;if(b){for(var f=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);b&&(h.x=G,h.y=w,f&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(p[c++]=h.x,p[c++]=h.y,p[c++]=h.z,p[c++]=h.x,p[c++]=h.y,p[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);d[T++]=(L.x+O)/(2*O),d[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-badb9ae9","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-a5b580d6","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,d=new m.VertexFormat,p={vertexFormat:d,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,d),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(p.length=n,p.topRadius=o,p.bottomRadius=i,p.slices=s,p.offsetAttribute=-1===t?void 0:t,new u(p))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,b=n.normal||n.tangent||n.bitangent;if(b){for(var f=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);b&&(h.x=G,h.y=w,f&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(p[c++]=h.x,p[c++]=h.y,p[c++]=h.z,p[c++]=h.x,p[c++]=h.y,p[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);d[T++]=(L.x+O)/(2*O),d[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-75c1d9a1","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-842f7f8f","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,d=new m.VertexFormat,p={vertexFormat:d,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,d),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(p.length=n,p.topRadius=o,p.bottomRadius=i,p.slices=s,p.offsetAttribute=-1===t?void 0:t,new u(p))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,f=n.bitangent?new Float32Array(3*m):void 0,l=n.normal||n.tangent||n.bitangent;if(l){for(var b=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);l&&(h.x=G,h.y=w,b&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(p[c++]=h.x,p[c++]=h.y,p[c++]=h.z,p[c++]=h.x,p[c++]=h.y,p[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),f[v++]=C.x,f[v++]=C.y,f[v++]=C.z,f[v++]=C.x,f[v++]=C.y,f[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(f[v++]=0,f[v++]=-1,f[v++]=0);for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(f[v++]=0,f[v++]=1,f[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);d[T++]=(L.x+O)/(2*O),d[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-5a0f5c0d","./Cartesian2-c1eb9da0","./ComponentDatatype-e44126e4","./CylinderGeometryLibrary-88cb80d2","./when-ae2e0b60","./Check-f996273c","./GeometryAttribute-f0467ee1","./GeometryAttributes-5ce4955a","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,P,k,M,z,E,N,e,I,U,S,B,m){"use strict";var Y=new M.Cartesian2,Z=new M.Cartesian3,J=new M.Cartesian3,W=new M.Cartesian3,j=new M.Cartesian3;function u(t){var e=(t=N.defaultValue(t,N.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=N.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT),o=N.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=m.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}u.packedLength=m.VertexFormat.packedLength+5,u.pack=function(t,e,a){return a=N.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,e,a),a+=m.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=N.defaultValue(t._offsetAttribute,-1),e};var a,d=new m.VertexFormat,p={vertexFormat:d,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};u.unpack=function(t,e,a){e=N.defaultValue(e,0);var r=m.VertexFormat.unpack(t,e,d),n=(e+=m.VertexFormat.packedLength,t[e++]),o=t[e++],i=t[e++],s=t[e++],t=t[e];return N.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===t?void 0:t,a):(p.length=n,p.topRadius=o,p.bottomRadius=i,p.slices=s,p.offsetAttribute=-1===t?void 0:t,new u(p))},u.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,m=i+i,u=E.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,y=n.tangent?new Float32Array(3*m):void 0,l=n.bitangent?new Float32Array(3*m):void 0,f=n.normal||n.tangent||n.bitangent;if(f){for(var b=n.tangent||n.bitangent,c=0,A=0,v=0,g=Math.atan2(r-a,e),h=Z,x=(h.z=Math.sin(g),Math.cos(g)),_=W,C=J,F=0;F<o;F++){var w=F/o*B.CesiumMath.TWO_PI,G=x*Math.cos(w),w=x*Math.sin(w);f&&(h.x=G,h.y=w,b&&(_=M.Cartesian3.normalize(M.Cartesian3.cross(M.Cartesian3.UNIT_Z,h,_),_)),n.normal&&(p[c++]=h.x,p[c++]=h.y,p[c++]=h.z,p[c++]=h.x,p[c++]=h.y,p[c++]=h.z),n.tangent&&(y[A++]=_.x,y[A++]=_.y,y[A++]=_.z,y[A++]=_.x,y[A++]=_.y,y[A++]=_.z),n.bitangent)&&(C=M.Cartesian3.normalize(M.Cartesian3.cross(h,_,C),C),l[v++]=C.x,l[v++]=C.y,l[v++]=C.z,l[v++]=C.x,l[v++]=C.y,l[v++]=C.z)}for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=-1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=-1,l[v++]=0);for(F=0;F<o;F++)n.normal&&(p[c++]=0,p[c++]=0,p[c++]=1),n.tangent&&(y[A++]=1,y[A++]=0,y[A++]=0),n.bitangent&&(l[v++]=0,l[v++]=1,l[v++]=0)}var D=S.IndexDatatype.createTypedArray(m,12*o-12),R=0,V=0;for(F=0;F<o-1;F++)D[R++]=V,D[R++]=V+2,D[R++]=V+3,D[R++]=V,D[R++]=V+3,D[R++]=V+1,V+=2;for(D[R++]=i-2,D[R++]=0,D[R++]=1,D[R++]=i-2,D[R++]=1,D[R++]=i-1,F=1;F<o-1;F++)D[R++]=i+F+1,D[R++]=i+F,D[R++]=i;for(F=1;F<o-1;F++)D[R++]=s,D[R++]=s+F,D[R++]=s+F+1;var T=0;if(n.st){var O=Math.max(a,r);for(F=0;F<m;F++){var L=M.Cartesian3.fromArray(u,3*F,j);d[T++]=(L.x+O)/(2*O),d[T++]=(L.y+O)/(2*O)}}g=new U.GeometryAttributes,r=(n.position&&(g.position=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:u})),n.normal&&(g.normal=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(g.tangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.bitangent&&(g.bitangent=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(g.st=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),Y.x=.5*e,Y.y=Math.max(r,a),new k.BoundingSphere(M.Cartesian3.ZERO,M.Cartesian2.magnitude(Y)));return N.defined(t._offsetAttribute)&&(e=u.length,a=new Uint8Array(e/3),e=t._offsetAttribute===P.GeometryOffsetAttribute.NONE?0:1,P.arrayFill(a,e),g.applyOffset=new I.GeometryAttribute({componentDatatype:z.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),new I.Geometry({attributes:g,indices:D,primitiveType:I.PrimitiveType.TRIANGLES,boundingSphere:r,offsetAttribute:t._offsetAttribute})}},u.getUnitCylinder=function(){return a=N.defined(a)?a:u.createGeometry(new u({topRadius:1,bottomRadius:1,length:1,vertexFormat:m.VertexFormat.POSITION_ONLY}))},t.CylinderGeometry=u});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-b0beda9b","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-787e8d53","./GeometryAttribute-9509a6ac","./GeometryAttributes-5ce4955a","./GeometryInstance-1af88174","./GeometryPipeline-6f352065","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,h=0,x=K,f=X,g=$,b=new L.GeographicProjection(s),_=b.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=b.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,_,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[h+T]=J.x,p[h+1+T]=J.y),p[h++]=J.x,p[h++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(x=s.geodeticSurfaceNormal(V,x),m&&(A[G+I]=-x.x,A[P+I]=-x.y,A[F+I]=-x.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(f=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,x,f),f),L.Matrix3.multiplyByVector(v,f,f)),a.normal&&(y[G]=x.x,y[P]=x.y,y[F]=x.z,r)&&(y[G+I]=-x.x,y[P+I]=-x.y,y[F+I]=-x.z),a.tangent&&(c[G]=f.x,c[P]=f.y,c[F]=f.z,r)&&(c[G+I]=-f.x,c[P+I]=-f.y,c[F+I]=-f.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(x,f,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var h=new L.BoundingSphere,x=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),x.center=R.Cartesian3.add(t,i,x.center),x.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(h,x),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,h=t.shadowVolume,x=h?new Float32Array(3*m):void 0,f=0,g=K,b=X,_=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[f+I]=J.x,y[f+1+I]=J.y,y[f++]=J.x,y[f++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),h&&(x[T+D]=-g.x,x[G+D]=-g.y,x[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(_=R.Cartesian3.clone(g,_),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(b=R.Cartesian3.normalize(R.Cartesian3.cross(_,g,b),b),d[T]=b.x,d[G]=b.y,d[N]=b.z,d[T+D]=b.x,d[T+1+D]=b.y,d[T+2+D]=b.z),r.bitangent)&&(A[T]=_.x,A[G]=_.y,A[N]=_.z,A[T+D]=_.x,A[G+D]=_.y,A[N+D]=_.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),h&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function f(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}f.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,f.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,b=new R.Ellipsoid,v=new d.VertexFormat,_={center:g,ellipsoid:b,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};f.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,b)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(_.height=m,_.extrudedHeight=y,_.granularity=p,_.stRotation=u,_.rotation=l,_.semiMajorAxis=o,_.semiMinorAxis=s,_.shadowVolume=c,_.offsetAttribute=-1===e?void 0:e,new f(_))},f.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},f.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},f.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new f({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(f.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=f});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-badb9ae9","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-2e02e40d","./GeometryAttribute-a5b580d6","./GeometryAttributes-5ce4955a","./GeometryInstance-3fbf3924","./GeometryPipeline-fef2cc93","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,f=0,h=K,x=X,g=$,b=new L.GeographicProjection(s),_=b.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=b.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,_,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[f+T]=J.x,p[f+1+T]=J.y),p[f++]=J.x,p[f++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(h=s.geodeticSurfaceNormal(V,h),m&&(A[G+I]=-h.x,A[P+I]=-h.y,A[F+I]=-h.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(x=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,h,x),x),L.Matrix3.multiplyByVector(v,x,x)),a.normal&&(y[G]=h.x,y[P]=h.y,y[F]=h.z,r)&&(y[G+I]=-h.x,y[P+I]=-h.y,y[F+I]=-h.z),a.tangent&&(c[G]=x.x,c[P]=x.y,c[F]=x.z,r)&&(c[G+I]=-x.x,c[P+I]=-x.y,c[F+I]=-x.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(h,x,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var f=new L.BoundingSphere,h=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(f.center=R.Cartesian3.add(t,i,f.center),f.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(f,h),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,f=t.shadowVolume,h=f?new Float32Array(3*m):void 0,x=0,g=K,b=X,_=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[x+I]=J.x,y[x+1+I]=J.y,y[x++]=J.x,y[x++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),f&&(h[T+D]=-g.x,h[G+D]=-g.y,h[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(_=R.Cartesian3.clone(g,_),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(b=R.Cartesian3.normalize(R.Cartesian3.cross(_,g,b),b),d[T]=b.x,d[G]=b.y,d[N]=b.z,d[T+D]=b.x,d[T+1+D]=b.y,d[T+2+D]=b.z),r.bitangent)&&(A[T]=_.x,A[G]=_.y,A[N]=_.z,A[T+D]=_.x,A[G+D]=_.y,A[N+D]=_.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),f&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function x(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}x.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,x.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,b=new R.Ellipsoid,v=new d.VertexFormat,_={center:g,ellipsoid:b,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};x.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,b)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(_.height=m,_.extrudedHeight=y,_.granularity=p,_.stRotation=u,_.rotation=l,_.semiMajorAxis=o,_.semiMinorAxis=s,_.shadowVolume=c,_.offsetAttribute=-1===e?void 0:e,new x(_))},x.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},x.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},x.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new x({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(x.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=x});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-1b5921a3","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-774fb909","./GeometryAttribute-b0d1422a","./GeometryAttributes-5ce4955a","./GeometryInstance-2f8b5c4a","./GeometryPipeline-0c08714b","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(t,S,L,R,e,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,it=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,tt=new R.Cartographic,et=new R.Cartesian3,rt=new R.Cartesian2,at=new R.Cartesian2;function c(t,e,r){for(var a=e.vertexFormat,i=e.center,n=e.semiMajorAxis,o=e.semiMinorAxis,s=e.ellipsoid,l=e.stRotation,u=r?t.length/3*2:t.length/3,m=e.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,h=0,x=K,f=X,g=$,b=new L.GeographicProjection(s),_=b.project(s.cartesianToCartographic(i,tt),et),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=it,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,rt)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,at),E=t.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(t,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=b.project(s.cartesianToCartographic(N,tt),Q),R.Cartesian3.subtract(N,_,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[h+T]=J.x,p[h+1+T]=J.y),p[h++]=J.x,p[h++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(x=s.geodeticSurfaceNormal(V,x),m&&(A[G+I]=-x.x,A[P+I]=-x.y,A[F+I]=-x.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(f=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,x,f),f),L.Matrix3.multiplyByVector(v,f,f)),a.normal&&(y[G]=x.x,y[P]=x.y,y[F]=x.z,r)&&(y[G+I]=-x.x,y[P+I]=-x.y,y[F+I]=-x.z),a.tangent&&(c[G]=f.x,c[P]=f.y,c[F]=f.z,r)&&(c[G+I]=-f.x,c[P+I]=-f.y,c[F+I]=-f.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(x,f,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(t,e,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(e.offsetAttribute)&&(O=new Uint8Array(u),O=e.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=e.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(t){for(var e,r,a=new Array(t*(t+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<t+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,e=2*s,r=0;r<e-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(e=2*t,++o,++n,s=0;s<e-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=t-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,e=2*s,r=0;r<e-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var h=new L.BoundingSphere,x=new L.BoundingSphere;function l(t){for(var e=t.center,r=t.ellipsoid,a=t.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(e,H),t.height,H),r=(h.center=R.Cartesian3.add(e,i,h.center),h.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(e,i),t.extrudedHeight,i),x.center=R.Cartesian3.add(e,i,x.center),x.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(t,!0,!0)),e=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(h,x),n=c(e,t,!0),o=(u=A(i)).length,s=(u.length=2*o,e.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(t,e){for(var r=e.vertexFormat,a=e.center,i=e.semiMajorAxis,n=e.semiMinorAxis,o=e.ellipsoid,s=e.height,l=e.extrudedHeight,u=e.stRotation,m=t.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,h=e.shadowVolume,x=h?new Float32Array(3*m):void 0,f=0,g=K,b=X,_=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,tt),et),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,rt),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,at),I=(D=t.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(t,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,tt),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[f+I]=J.x,y[f+1+I]=J.y,y[f++]=J.x,y[f++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),h&&(x[T+D]=-g.x,x[G+D]=-g.y,x[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(_=R.Cartesian3.clone(g,_),F=R.Cartesian3.fromArray(t,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(b=R.Cartesian3.normalize(R.Cartesian3.cross(_,g,b),b),d[T]=b.x,d[G]=b.y,d[N]=b.z,d[T+D]=b.x,d[T+1+D]=b.y,d[T+2+D]=b.z),r.bitangent)&&(A[T]=_.x,A[G]=_.y,A[N]=_.z,A[T+D]=_.x,A[G+D]=_.y,A[N+D]=_.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),h&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),k.defined(e.offsetAttribute)&&(a=new Uint8Array(m),a=e.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=e.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,t),u=function(t){for(var e=t.length/3,r=p.IndexDatatype.createTypedArray(e,6*e),a=0,i=0;i<e;i++){var n=i,o=i+e,s=(n+1)%e,l=s+e;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:e}),new m.GeometryInstance({geometry:t})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(t,e,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:t,semiMajorAxis:e,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);t=R.Rectangle.fromCartesianArray(u,n,o);return t.width>y.CesiumMath.PI&&(t.north=0<t.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:t.north,t.south=t.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:t.south,t.east=y.CesiumMath.PI,t.west=-y.CesiumMath.PI),t}function f(t){var e=(t=k.defaultValue(t,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(t.ellipsoid,R.Ellipsoid.WGS84),a=t.semiMajorAxis,i=t.semiMinorAxis,n=k.defaultValue(t.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(t.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(t.height,0),l=k.defaultValue(t.extrudedHeight,s);this._center=R.Cartesian3.clone(e),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(t.rotation,0),this._stRotation=k.defaultValue(t.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(t.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}f.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,f.pack=function(t,e,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(t._center,e,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(t._ellipsoid,e,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(t._vertexFormat,e,r),r+=d.VertexFormat.packedLength,e[r++]=t._semiMajorAxis,e[r++]=t._semiMinorAxis,e[r++]=t._rotation,e[r++]=t._stRotation,e[r++]=t._height,e[r++]=t._granularity,e[r++]=t._extrudedHeight,e[r++]=t._shadowVolume?1:0,e[r]=k.defaultValue(t._offsetAttribute,-1),e};var g=new R.Cartesian3,b=new R.Ellipsoid,v=new d.VertexFormat,_={center:g,ellipsoid:b,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};f.unpack=function(t,e,r){e=k.defaultValue(e,0);var a=R.Cartesian3.unpack(t,e,g),i=(e+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(t,e,b)),n=(e+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(t,e,v)),o=(e+=d.VertexFormat.packedLength,t[e++]),s=t[e++],l=t[e++],u=t[e++],m=t[e++],p=t[e++],y=t[e++],c=1===t[e++],t=t[e];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===t?void 0:t,r):(_.height=m,_.extrudedHeight=y,_.granularity=p,_.stRotation=u,_.rotation=l,_.semiMajorAxis=o,_.semiMinorAxis=s,_.shadowVolume=c,_.offsetAttribute=-1===t?void 0:t,new f(_))},f.computeRectangle=function(t,e){var r=(t=k.defaultValue(t,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(t.ellipsoid,R.Ellipsoid.WGS84),i=t.semiMajorAxis,n=t.semiMinorAxis,o=k.defaultValue(t.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(t.rotation,0),o,a,e)},f.createGeometry=function(t){var e,r,a,i,n;if(!(t._semiMajorAxis<=0||t._semiMinorAxis<=0))return n=t._height,a=t._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),t._center=t._ellipsoid.scaleToGeodeticSurface(t._center,t._center),n={center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:t._ellipsoid,rotation:t._rotation,height:n,granularity:t._granularity,vertexFormat:t._vertexFormat,stRotation:t._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=t._shadowVolume,n.offsetAttribute=t._offsetAttribute,e=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),e={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(t._offsetAttribute)&&(a=e.attributes.position.values.length,r=new Uint8Array(a/3),i=t._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),e.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:e.attributes,indices:e.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:e.boundingSphere,offsetAttribute:t._offsetAttribute})},f.createShadowVolume=function(t,e,r){var a=t._granularity,i=t._ellipsoid,e=e(a,i),r=r(a,i);return new f({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,ellipsoid:i,rotation:t._rotation,stRotation:t._stRotation,granularity:a,extrudedHeight:e,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(f.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){var e=-t._stRotation;if(0==e)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:t._center,semiMajorAxis:t._semiMajorAxis,semiMinorAxis:t._semiMinorAxis,rotation:t._rotation,granularity:t._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=t._ellipsoid,t=t.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,e,o,t)}(this)),this._textureCoordinateRotationPoints}}}),t.EllipseGeometry=f});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-1fa85493","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-cde71e7f","./GeometryAttribute-9cc31675","./GeometryAttributes-5ce4955a","./GeometryInstance-083d7584","./GeometryPipeline-64734a0f","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,h=0,f=K,x=X,g=$,_=new L.GeographicProjection(s),b=_.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=_.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,b,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[h+T]=J.x,p[h+1+T]=J.y),p[h++]=J.x,p[h++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(f=s.geodeticSurfaceNormal(V,f),m&&(A[G+I]=-f.x,A[P+I]=-f.y,A[F+I]=-f.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(x=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,f,x),x),L.Matrix3.multiplyByVector(v,x,x)),a.normal&&(y[G]=f.x,y[P]=f.y,y[F]=f.z,r)&&(y[G+I]=-f.x,y[P+I]=-f.y,y[F+I]=-f.z),a.tangent&&(c[G]=x.x,c[P]=x.y,c[F]=x.z,r)&&(c[G+I]=-x.x,c[P+I]=-x.y,c[F+I]=-x.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(f,x,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var h=new L.BoundingSphere,f=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),f.center=R.Cartesian3.add(t,i,f.center),f.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(h,f),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,h=t.shadowVolume,f=h?new Float32Array(3*m):void 0,x=0,g=K,_=X,b=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[x+I]=J.x,y[x+1+I]=J.y,y[x++]=J.x,y[x++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),h&&(f[T+D]=-g.x,f[G+D]=-g.y,f[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(b=R.Cartesian3.clone(g,b),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(_=R.Cartesian3.normalize(R.Cartesian3.cross(b,g,_),_),d[T]=_.x,d[G]=_.y,d[N]=_.z,d[T+D]=_.x,d[T+1+D]=_.y,d[T+2+D]=_.z),r.bitangent)&&(A[T]=b.x,A[G]=b.y,A[N]=b.z,A[T+D]=b.x,A[G+D]=b.y,A[N+D]=b.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),h&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function x(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}x.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,x.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,_=new R.Ellipsoid,v=new d.VertexFormat,b={center:g,ellipsoid:_,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};x.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,_)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(b.height=m,b.extrudedHeight=y,b.granularity=p,b.stRotation=u,b.rotation=l,b.semiMajorAxis=o,b.semiMinorAxis=s,b.shadowVolume=c,b.offsetAttribute=-1===e?void 0:e,new x(b))},x.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},x.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},x.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new x({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(x.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=x});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-8c8e0c6f","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-8b1f8e47","./GeometryAttribute-8106b887","./GeometryAttributes-5ce4955a","./GeometryInstance-a24fc358","./GeometryPipeline-21c7c817","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,h=0,f=K,x=X,g=$,_=new L.GeographicProjection(s),b=_.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=_.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,b,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[h+T]=J.x,p[h+1+T]=J.y),p[h++]=J.x,p[h++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(f=s.geodeticSurfaceNormal(V,f),m&&(A[G+I]=-f.x,A[P+I]=-f.y,A[F+I]=-f.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(x=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,f,x),x),L.Matrix3.multiplyByVector(v,x,x)),a.normal&&(y[G]=f.x,y[P]=f.y,y[F]=f.z,r)&&(y[G+I]=-f.x,y[P+I]=-f.y,y[F+I]=-f.z),a.tangent&&(c[G]=x.x,c[P]=x.y,c[F]=x.z,r)&&(c[G+I]=-x.x,c[P+I]=-x.y,c[F+I]=-x.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(f,x,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var h=new L.BoundingSphere,f=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),f.center=R.Cartesian3.add(t,i,f.center),f.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(h,f),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,h=t.shadowVolume,f=h?new Float32Array(3*m):void 0,x=0,g=K,_=X,b=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[x+I]=J.x,y[x+1+I]=J.y,y[x++]=J.x,y[x++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),h&&(f[T+D]=-g.x,f[G+D]=-g.y,f[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(b=R.Cartesian3.clone(g,b),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(_=R.Cartesian3.normalize(R.Cartesian3.cross(b,g,_),_),d[T]=_.x,d[G]=_.y,d[N]=_.z,d[T+D]=_.x,d[T+1+D]=_.y,d[T+2+D]=_.z),r.bitangent)&&(A[T]=b.x,A[G]=b.y,A[N]=b.z,A[T+D]=b.x,A[G+D]=b.y,A[N+D]=b.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),h&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function x(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}x.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,x.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,_=new R.Ellipsoid,v=new d.VertexFormat,b={center:g,ellipsoid:_,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};x.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,_)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(b.height=m,b.extrudedHeight=y,b.granularity=p,b.stRotation=u,b.rotation=l,b.semiMajorAxis=o,b.semiMinorAxis=s,b.shadowVolume=c,b.offsetAttribute=-1===e?void 0:e,new x(b))},x.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},x.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},x.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new x({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(x.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=x});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-713e2e92","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-716ccbc1","./GeometryAttribute-e03451d8","./GeometryAttributes-5ce4955a","./GeometryInstance-5729d1a7","./GeometryPipeline-160871a5","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,h=0,x=K,f=X,g=$,_=new L.GeographicProjection(s),b=_.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=_.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,b,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[h+T]=J.x,p[h+1+T]=J.y),p[h++]=J.x,p[h++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(x=s.geodeticSurfaceNormal(V,x),m&&(A[G+I]=-x.x,A[P+I]=-x.y,A[F+I]=-x.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(f=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,x,f),f),L.Matrix3.multiplyByVector(v,f,f)),a.normal&&(y[G]=x.x,y[P]=x.y,y[F]=x.z,r)&&(y[G+I]=-x.x,y[P+I]=-x.y,y[F+I]=-x.z),a.tangent&&(c[G]=f.x,c[P]=f.y,c[F]=f.z,r)&&(c[G+I]=-f.x,c[P+I]=-f.y,c[F+I]=-f.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(x,f,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var h=new L.BoundingSphere,x=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),x.center=R.Cartesian3.add(t,i,x.center),x.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(h,x),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,h=t.shadowVolume,x=h?new Float32Array(3*m):void 0,f=0,g=K,_=X,b=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[f+I]=J.x,y[f+1+I]=J.y,y[f++]=J.x,y[f++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),h&&(x[T+D]=-g.x,x[G+D]=-g.y,x[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(b=R.Cartesian3.clone(g,b),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(_=R.Cartesian3.normalize(R.Cartesian3.cross(b,g,_),_),d[T]=_.x,d[G]=_.y,d[N]=_.z,d[T+D]=_.x,d[T+1+D]=_.y,d[T+2+D]=_.z),r.bitangent)&&(A[T]=b.x,A[G]=b.y,A[N]=b.z,A[T+D]=b.x,A[G+D]=b.y,A[N+D]=b.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),h&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function f(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}f.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,f.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,_=new R.Ellipsoid,v=new d.VertexFormat,b={center:g,ellipsoid:_,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};f.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,_)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(b.height=m,b.extrudedHeight=y,b.granularity=p,b.stRotation=u,b.rotation=l,b.semiMajorAxis=o,b.semiMinorAxis=s,b.shadowVolume=c,b.offsetAttribute=-1===e?void 0:e,new f(b))},f.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},f.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},f.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new f({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(f.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=f});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-ce97037a","./Cartesian2-38b35910","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-9003dd80","./GeometryAttribute-f82de479","./GeometryAttributes-5ce4955a","./GeometryInstance-ed6965ba","./GeometryPipeline-2e63b615","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,h=0,x=K,f=X,g=$,_=new L.GeographicProjection(s),b=_.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=_.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,b,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[h+T]=J.x,p[h+1+T]=J.y),p[h++]=J.x,p[h++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(x=s.geodeticSurfaceNormal(V,x),m&&(A[G+I]=-x.x,A[P+I]=-x.y,A[F+I]=-x.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(f=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,x,f),f),L.Matrix3.multiplyByVector(v,f,f)),a.normal&&(y[G]=x.x,y[P]=x.y,y[F]=x.z,r)&&(y[G+I]=-x.x,y[P+I]=-x.y,y[F+I]=-x.z),a.tangent&&(c[G]=f.x,c[P]=f.y,c[F]=f.z,r)&&(c[G+I]=-f.x,c[P+I]=-f.y,c[F+I]=-f.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(x,f,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var h=new L.BoundingSphere,x=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),x.center=R.Cartesian3.add(t,i,x.center),x.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(h,x),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,h=t.shadowVolume,x=h?new Float32Array(3*m):void 0,f=0,g=K,_=X,b=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[f+I]=J.x,y[f+1+I]=J.y,y[f++]=J.x,y[f++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),h&&(x[T+D]=-g.x,x[G+D]=-g.y,x[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(b=R.Cartesian3.clone(g,b),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(_=R.Cartesian3.normalize(R.Cartesian3.cross(b,g,_),_),d[T]=_.x,d[G]=_.y,d[N]=_.z,d[T+D]=_.x,d[T+1+D]=_.y,d[T+2+D]=_.z),r.bitangent)&&(A[T]=b.x,A[G]=b.y,A[N]=b.z,A[T+D]=b.x,A[G+D]=b.y,A[N+D]=b.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),h&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:x})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function f(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}f.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,f.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,_=new R.Ellipsoid,v=new d.VertexFormat,b={center:g,ellipsoid:_,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};f.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,_)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(b.height=m,b.extrudedHeight=y,b.granularity=p,b.stRotation=u,b.rotation=l,b.semiMajorAxis=o,b.semiMinorAxis=s,b.shadowVolume=c,b.offsetAttribute=-1===e?void 0:e,new f(b))},f.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},f.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},f.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new f({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(f.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=f});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(["exports","./GeometryOffsetAttribute-b02d5bb9","./Transforms-75c1d9a1","./Cartesian2-c1eb9da0","./Check-f996273c","./ComponentDatatype-e44126e4","./when-ae2e0b60","./EllipseGeometryLibrary-bb11ea48","./GeometryAttribute-842f7f8f","./GeometryAttributes-5ce4955a","./GeometryInstance-539e00df","./GeometryPipeline-1f7508a2","./IndexDatatype-516320ea","./Math-5bbcea10","./VertexFormat-90d15264"],function(e,S,L,R,t,j,k,z,B,Y,m,C,p,y,d){"use strict";var H=new R.Cartesian3,U=new R.Cartesian3,Q=new R.Cartesian3,W=new R.Cartesian3,J=new R.Cartesian2,q=new L.Matrix3,ie=new L.Matrix3,Z=new L.Quaternion,K=new R.Cartesian3,X=new R.Cartesian3,$=new R.Cartesian3,ee=new R.Cartographic,te=new R.Cartesian3,re=new R.Cartesian2,ae=new R.Cartesian2;function c(e,t,r){for(var a=t.vertexFormat,i=t.center,n=t.semiMajorAxis,o=t.semiMinorAxis,s=t.ellipsoid,l=t.stRotation,u=r?e.length/3*2:e.length/3,m=t.shadowVolume,p=a.st?new Float32Array(2*u):void 0,y=a.normal?new Float32Array(3*u):void 0,c=a.tangent?new Float32Array(3*u):void 0,d=a.bitangent?new Float32Array(3*u):void 0,A=m?new Float32Array(3*u):void 0,f=0,h=K,x=X,g=$,_=new L.GeographicProjection(s),b=_.project(s.cartesianToCartographic(i,ee),te),i=s.scaleToGeodeticSurface(i,H),C=(s.geodeticSurfaceNormal(i,i),q),v=ie,w=(v=0!==l?(O=L.Quaternion.fromAxisAngle(i,l,Z),C=L.Matrix3.fromQuaternion(O,C),O=L.Quaternion.fromAxisAngle(i,-l,Z),L.Matrix3.fromQuaternion(O,v)):(C=L.Matrix3.clone(L.Matrix3.IDENTITY,C),L.Matrix3.clone(L.Matrix3.IDENTITY,v)),R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re)),M=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),E=e.length,I=r?E:0,T=I/3*2,G=0;G<E;G+=3){var N,P=G+1,F=G+2,V=R.Cartesian3.fromArray(e,G,H);a.st&&(N=L.Matrix3.multiplyByVector(C,V,U),N=_.project(s.cartesianToCartographic(N,ee),Q),R.Cartesian3.subtract(N,b,N),J.x=(N.x+n)/(2*n),J.y=(N.y+o)/(2*o),w.x=Math.min(J.x,w.x),w.y=Math.min(J.y,w.y),M.x=Math.max(J.x,M.x),M.y=Math.max(J.y,M.y),r&&(p[f+T]=J.x,p[f+1+T]=J.y),p[f++]=J.x,p[f++]=J.y),(a.normal||a.tangent||a.bitangent||m)&&(h=s.geodeticSurfaceNormal(V,h),m&&(A[G+I]=-h.x,A[P+I]=-h.y,A[F+I]=-h.z),a.normal||a.tangent||a.bitangent)&&((a.tangent||a.bitangent)&&(x=R.Cartesian3.normalize(R.Cartesian3.cross(R.Cartesian3.UNIT_Z,h,x),x),L.Matrix3.multiplyByVector(v,x,x)),a.normal&&(y[G]=h.x,y[P]=h.y,y[F]=h.z,r)&&(y[G+I]=-h.x,y[P+I]=-h.y,y[F+I]=-h.z),a.tangent&&(c[G]=x.x,c[P]=x.y,c[F]=x.z,r)&&(c[G+I]=-x.x,c[P+I]=-x.y,c[F+I]=-x.z),a.bitangent)&&(g=R.Cartesian3.normalize(R.Cartesian3.cross(h,x,g),g),d[G]=g.x,d[P]=g.y,d[F]=g.z,r)&&(d[G+I]=g.x,d[P+I]=g.y,d[F+I]=g.z)}if(a.st)for(var E=p.length,D=0;D<E;D+=2)p[D]=(p[D]-w.x)/(M.x-w.x),p[D+1]=(p[D+1]-w.y)/(M.y-w.y);var O,i=new Y.GeometryAttributes;return a.position&&(l=z.EllipseGeometryLibrary.raisePositionsToHeight(e,t,r),i.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),a.st&&(i.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:p})),a.normal&&(i.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),a.tangent&&(i.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),a.bitangent&&(i.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),m&&(i.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),r&&k.defined(t.offsetAttribute)&&(O=new Uint8Array(u),O=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(O,1,0,u/2):(l=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(O,l)),i.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})),i}function A(e){for(var t,r,a=new Array(e*(e+1)*12-6),i=0,n=0,o=1,s=0;s<3;s++)a[i++]=o++,a[i++]=n,a[i++]=o;for(s=2;s<e+1;++s){for(o=s*(s+1)-1,n=(s-1)*s-1,a[i++]=o++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=o++,a[i++]=n,a[i++]=o}for(t=2*e,++o,++n,s=0;s<t-1;++s)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;for(a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n++,a[i++]=n,++n,s=e-1;1<s;--s){for(a[i++]=n++,a[i++]=n,a[i++]=o,t=2*s,r=0;r<t-1;++r)a[i++]=o,a[i++]=n++,a[i++]=n,a[i++]=o++,a[i++]=n,a[i++]=o;a[i++]=n++,a[i++]=n++,a[i++]=o++}for(s=0;s<3;s++)a[i++]=n++,a[i++]=n,a[i++]=o;return a}var o=new R.Cartesian3;var f=new L.BoundingSphere,h=new L.BoundingSphere;function l(e){for(var t=e.center,r=e.ellipsoid,a=e.semiMajorAxis,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,H),e.height,H),r=(f.center=R.Cartesian3.add(t,i,f.center),f.radius=a,i=R.Cartesian3.multiplyByScalar(r.geodeticSurfaceNormal(t,i),e.extrudedHeight,i),h.center=R.Cartesian3.add(t,i,h.center),h.radius=a,z.EllipseGeometryLibrary.computeEllipsePositions(e,!0,!0)),t=r.positions,i=r.numPts,a=r.outerPositions,r=L.BoundingSphere.union(f,h),n=c(t,e,!0),o=(u=A(i)).length,s=(u.length=2*o,t.length/3),l=0;l<o;l+=3)u[l+o]=u[l+2]+s,u[l+1+o]=u[l+1]+s,u[l+2+o]=u[l]+s;var i=p.IndexDatatype.createTypedArray(2*s/3,u),t=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),n=function(e,t){for(var r=t.vertexFormat,a=t.center,i=t.semiMajorAxis,n=t.semiMinorAxis,o=t.ellipsoid,s=t.height,l=t.extrudedHeight,u=t.stRotation,m=e.length/3*2,p=new Float64Array(3*m),y=r.st?new Float32Array(2*m):void 0,c=r.normal?new Float32Array(3*m):void 0,d=r.tangent?new Float32Array(3*m):void 0,A=r.bitangent?new Float32Array(3*m):void 0,f=t.shadowVolume,h=f?new Float32Array(3*m):void 0,x=0,g=K,_=X,b=$,C=new L.GeographicProjection(o),v=C.project(o.cartesianToCartographic(a,ee),te),a=o.scaleToGeodeticSurface(a,H),a=(o.geodeticSurfaceNormal(a,a),L.Quaternion.fromAxisAngle(a,u,Z)),w=L.Matrix3.fromQuaternion(a,q),M=R.Cartesian2.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,re),E=R.Cartesian2.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,ae),I=(D=e.length)/3*2,T=0;T<D;T+=3){var G=T+1,N=T+2,P=R.Cartesian3.fromArray(e,T,H),F=(r.st&&(V=L.Matrix3.multiplyByVector(w,P,U),V=C.project(o.cartesianToCartographic(V,ee),Q),R.Cartesian3.subtract(V,v,V),J.x=(V.x+i)/(2*i),J.y=(V.y+n)/(2*n),M.x=Math.min(J.x,M.x),M.y=Math.min(J.y,M.y),E.x=Math.max(J.x,E.x),E.y=Math.max(J.y,E.y),y[x+I]=J.x,y[x+1+I]=J.y,y[x++]=J.x,y[x++]=J.y),P=o.scaleToGeodeticSurface(P,P),V=R.Cartesian3.clone(P,U),g=o.geodeticSurfaceNormal(P,g),f&&(h[T+D]=-g.x,h[G+D]=-g.y,h[N+D]=-g.z),R.Cartesian3.multiplyByScalar(g,s,W)),P=R.Cartesian3.add(P,F,P),F=R.Cartesian3.multiplyByScalar(g,l,F),V=R.Cartesian3.add(V,F,V);r.position&&(p[T+D]=V.x,p[G+D]=V.y,p[N+D]=V.z,p[T]=P.x,p[G]=P.y,p[N]=P.z),(r.normal||r.tangent||r.bitangent)&&(b=R.Cartesian3.clone(g,b),F=R.Cartesian3.fromArray(e,(T+3)%D,W),R.Cartesian3.subtract(F,P,F),P=R.Cartesian3.subtract(V,P,Q),g=R.Cartesian3.normalize(R.Cartesian3.cross(P,F,g),g),r.normal&&(c[T]=g.x,c[G]=g.y,c[N]=g.z,c[T+D]=g.x,c[G+D]=g.y,c[N+D]=g.z),r.tangent&&(_=R.Cartesian3.normalize(R.Cartesian3.cross(b,g,_),_),d[T]=_.x,d[G]=_.y,d[N]=_.z,d[T+D]=_.x,d[T+1+D]=_.y,d[T+2+D]=_.z),r.bitangent)&&(A[T]=b.x,A[G]=b.y,A[N]=b.z,A[T+D]=b.x,A[G+D]=b.y,A[N+D]=b.z)}if(r.st)for(var D=y.length,O=0;O<D;O+=2)y[O]=(y[O]-M.x)/(E.x-M.x),y[O+1]=(y[O+1]-M.y)/(E.y-M.y);return u=new Y.GeometryAttributes,r.position&&(u.position=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:p})),r.st&&(u.st=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:y})),r.normal&&(u.normal=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:c})),r.tangent&&(u.tangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})),r.bitangent&&(u.bitangent=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:A})),f&&(u.extrudeDirection=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:h})),k.defined(t.offsetAttribute)&&(a=new Uint8Array(m),a=t.offsetAttribute===S.GeometryOffsetAttribute.TOP?S.arrayFill(a,1,0,m/2):(m=t.offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(a,m)),u.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})),u}(a,e),u=function(e){for(var t=e.length/3,r=p.IndexDatatype.createTypedArray(t,6*t),a=0,i=0;i<t;i++){var n=i,o=i+t,s=(n+1)%t,l=s+t;r[a++]=n,r[a++]=o,r[a++]=s,r[a++]=s,r[a++]=o,r[a++]=l}return r}(a),i=p.IndexDatatype.createTypedArray(2*a.length/3,u),e=new B.Geometry({attributes:n,indices:i,primitiveType:B.PrimitiveType.TRIANGLES}),a=C.GeometryPipeline.combineInstances([new m.GeometryInstance({geometry:t}),new m.GeometryInstance({geometry:e})]);return{boundingSphere:r,attributes:a[0].attributes,indices:a[0].indices}}function s(e,t,r,a,i,n,o){for(var s=z.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:r,rotation:a,granularity:i},!1,!0).outerPositions,l=s.length/3,u=new Array(l),m=0;m<l;++m)u[m]=R.Cartesian3.fromArray(s,3*m);e=R.Rectangle.fromCartesianArray(u,n,o);return e.width>y.CesiumMath.PI&&(e.north=0<e.north?y.CesiumMath.PI_OVER_TWO-y.CesiumMath.EPSILON7:e.north,e.south=e.south<0?y.CesiumMath.EPSILON7-y.CesiumMath.PI_OVER_TWO:e.south,e.east=y.CesiumMath.PI,e.west=-y.CesiumMath.PI),e}function x(e){var t=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,r=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),a=e.semiMajorAxis,i=e.semiMinorAxis,n=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE),o=k.defaultValue(e.vertexFormat,d.VertexFormat.DEFAULT),s=k.defaultValue(e.height,0),l=k.defaultValue(e.extrudedHeight,s);this._center=R.Cartesian3.clone(t),this._semiMajorAxis=a,this._semiMinorAxis=i,this._ellipsoid=R.Ellipsoid.clone(r),this._rotation=k.defaultValue(e.rotation,0),this._stRotation=k.defaultValue(e.stRotation,0),this._height=Math.max(l,s),this._granularity=n,this._vertexFormat=d.VertexFormat.clone(o),this._extrudedHeight=Math.min(l,s),this._shadowVolume=k.defaultValue(e.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}x.packedLength=R.Cartesian3.packedLength+R.Ellipsoid.packedLength+d.VertexFormat.packedLength+9,x.pack=function(e,t,r){return r=k.defaultValue(r,0),R.Cartesian3.pack(e._center,t,r),r+=R.Cartesian3.packedLength,R.Ellipsoid.pack(e._ellipsoid,t,r),r+=R.Ellipsoid.packedLength,d.VertexFormat.pack(e._vertexFormat,t,r),r+=d.VertexFormat.packedLength,t[r++]=e._semiMajorAxis,t[r++]=e._semiMinorAxis,t[r++]=e._rotation,t[r++]=e._stRotation,t[r++]=e._height,t[r++]=e._granularity,t[r++]=e._extrudedHeight,t[r++]=e._shadowVolume?1:0,t[r]=k.defaultValue(e._offsetAttribute,-1),t};var g=new R.Cartesian3,_=new R.Ellipsoid,v=new d.VertexFormat,b={center:g,ellipsoid:_,vertexFormat:v,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};x.unpack=function(e,t,r){t=k.defaultValue(t,0);var a=R.Cartesian3.unpack(e,t,g),i=(t+=R.Cartesian3.packedLength,R.Ellipsoid.unpack(e,t,_)),n=(t+=R.Ellipsoid.packedLength,d.VertexFormat.unpack(e,t,v)),o=(t+=d.VertexFormat.packedLength,e[t++]),s=e[t++],l=e[t++],u=e[t++],m=e[t++],p=e[t++],y=e[t++],c=1===e[t++],e=e[t];return k.defined(r)?(r._center=R.Cartesian3.clone(a,r._center),r._ellipsoid=R.Ellipsoid.clone(i,r._ellipsoid),r._vertexFormat=d.VertexFormat.clone(n,r._vertexFormat),r._semiMajorAxis=o,r._semiMinorAxis=s,r._rotation=l,r._stRotation=u,r._height=m,r._granularity=p,r._extrudedHeight=y,r._shadowVolume=c,r._offsetAttribute=-1===e?void 0:e,r):(b.height=m,b.extrudedHeight=y,b.granularity=p,b.stRotation=u,b.rotation=l,b.semiMajorAxis=o,b.semiMinorAxis=s,b.shadowVolume=c,b.offsetAttribute=-1===e?void 0:e,new x(b))},x.computeRectangle=function(e,t){var r=(e=k.defaultValue(e,k.defaultValue.EMPTY_OBJECT)).center,a=k.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),i=e.semiMajorAxis,n=e.semiMinorAxis,o=k.defaultValue(e.granularity,y.CesiumMath.RADIANS_PER_DEGREE);return s(r,i,n,k.defaultValue(e.rotation,0),o,a,t)},x.createGeometry=function(e){var t,r,a,i,n;if(!(e._semiMajorAxis<=0||e._semiMinorAxis<=0))return n=e._height,a=e._extrudedHeight,r=!y.CesiumMath.equalsEpsilon(n,a,0,y.CesiumMath.EPSILON2),e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center),n={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:n,granularity:e._granularity,vertexFormat:e._vertexFormat,stRotation:e._stRotation},r?(n.extrudedHeight=a,n.shadowVolume=e._shadowVolume,n.offsetAttribute=e._offsetAttribute,t=l(n)):(a=(r=n).center,o=R.Cartesian3.multiplyByScalar(r.ellipsoid.geodeticSurfaceNormal(a,o),r.height,o),o=R.Cartesian3.add(a,o,o),a=new L.BoundingSphere(o,r.semiMajorAxis),i=(n=z.EllipseGeometryLibrary.computeEllipsePositions(r,!0,!1)).positions,n=n.numPts,r=c(i,r,!1),n=A(n),t={boundingSphere:a,attributes:r,indices:p.IndexDatatype.createTypedArray(i.length/3,n)},k.defined(e._offsetAttribute)&&(a=t.attributes.position.values.length,r=new Uint8Array(a/3),i=e._offsetAttribute===S.GeometryOffsetAttribute.NONE?0:1,S.arrayFill(r,i),t.attributes.applyOffset=new B.GeometryAttribute({componentDatatype:j.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:r}))),new B.Geometry({attributes:t.attributes,indices:t.indices,primitiveType:B.PrimitiveType.TRIANGLES,boundingSphere:t.boundingSphere,offsetAttribute:e._offsetAttribute})},x.createShadowVolume=function(e,t,r){var a=e._granularity,i=e._ellipsoid,t=t(a,i),r=r(a,i);return new x({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:i,rotation:e._rotation,stRotation:e._stRotation,granularity:a,extrudedHeight:t,height:r,vertexFormat:d.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(x.prototype,{rectangle:{get:function(){return k.defined(this._rectangle)||(this._rectangle=s(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return k.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(e){var t=-e._stRotation;if(0==t)return[0,0,0,1,1,0];for(var r=z.EllipseGeometryLibrary.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,a=r.length/3,i=new Array(a),n=0;n<a;++n)i[n]=R.Cartesian3.fromArray(r,3*n);var o=e._ellipsoid,e=e.rectangle;return B.Geometry._textureCoordinateRotationPoints(i,t,o,e)}(this)),this._textureCoordinateRotationPoints}}}),e.EllipseGeometry=x});
|