/* 2020-9-22 15:23:25 | 版权所有 军懋国兴 */ define(["./when-cbf8cd21","./Check-35e1a91d","./Math-69007a69","./Cartesian2-43e3a3be","./Transforms-2d1ac5ec","./RuntimeError-f4c64df1","./WebGLConstants-95ceb4e9","./ComponentDatatype-607c9a0c","./AttributeCompression-ea810287","./IndexDatatype-79bb407c","./IntersectionTests-459f6f08","./Plane-46b5436f","./WebMercatorProjection-3da37aae","./createTaskProcessorWorker","./EllipsoidTangentPlane-b5927ee3","./OrientedBoundingBox-5e0b7a7c","./TerrainEncoding-848fa40b"],function(Te,g,pe,Ee,fe,e,t,r,ve,ye,n,i,we,o,Ne,be,Me){"use strict";function xe(){g.DeveloperError.throwInstantiationError()}Object.defineProperties(xe.prototype,{errorEvent:{get:g.DeveloperError.throwInstantiationError},credit:{get:g.DeveloperError.throwInstantiationError},tilingScheme:{get:g.DeveloperError.throwInstantiationError},ready:{get:g.DeveloperError.throwInstantiationError},readyPromise:{get:g.DeveloperError.throwInstantiationError},hasWaterMask:{get:g.DeveloperError.throwInstantiationError},hasVertexNormals:{get:g.DeveloperError.throwInstantiationError},availability:{get:g.DeveloperError.throwInstantiationError}});var a=[];xe.getRegularGridIndices=function(e,t){if(e*t>=pe.CesiumMath.FOUR_GIGABYTES)throw new g.DeveloperError("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=a[e];Te.defined(r)||(a[e]=r=[]);var n=r[t];return Te.defined(n)||E(e,t,n=e*t=pe.CesiumMath.FOUR_GIGABYTES)throw new g.DeveloperError("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=c[e];Te.defined(r)||(c[e]=r=[]);var n,i,o,a,s,h,d=r[t];return Te.defined(d)||(n=xe.getRegularGridIndices(e,t),o=(i=p(e,t)).westIndicesSouthToNorth,a=i.southIndicesEastToWest,s=i.eastIndicesNorthToSouth,h=i.northIndicesWestToEast,d=r[t]={indices:n,westIndicesSouthToNorth:o,southIndicesEastToWest:a,eastIndicesNorthToSouth:s,northIndicesWestToEast:h}),d};var T=[];function p(e,t){for(var r=new Array(t),n=new Array(e),i=new Array(t),o=new Array(e),a=0;a=pe.CesiumMath.FOUR_GIGABYTES)throw new g.DeveloperError("The total number of vertices (width * height) must be less than 4,294,967,296.");var r=T[e];Te.defined(r)||(T[e]=r=[]);var n,i,o,a,s,h,d,c,u,l,I,m=r[t];return Te.defined(m)||(a=(n=e*t)+(o=2*e+2*t),s=(i=(e-1)*(t-1)*6)+6*Math.max(0,o-4),d=(h=p(e,t)).westIndicesSouthToNorth,c=h.southIndicesEastToWest,u=h.eastIndicesNorthToSouth,l=h.northIndicesWestToEast,E(e,t,I=ye.IndexDatatype.createTypedArray(a,s),0),xe.addSkirtIndices(d,c,u,l,n,I,i),m=r[t]={indices:I,westIndicesSouthToNorth:d,southIndicesEastToWest:c,eastIndicesNorthToSouth:u,northIndicesWestToEast:l,indexCountWithoutSkirts:i}),m},xe.addSkirtIndices=function(e,t,r,n,i,o,a){var s=i;a=h(e,s,o,a),a=h(t,s+=e.length,o,a),a=h(r,s+=t.length,o,a),h(n,s+=r.length,o,a)},xe.heightmapTerrainQuality=.25,xe.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*xe.heightmapTerrainQuality/(t*r)},xe.prototype.requestTileGeometry=g.DeveloperError.throwInstantiationError,xe.prototype.getLevelMaximumGeometricError=g.DeveloperError.throwInstantiationError,xe.prototype.getTileDataAvailable=g.DeveloperError.throwInstantiationError,xe.prototype.loadTileDataAvailability=g.DeveloperError.throwInstantiationError;var Ce=32767,Se=new Ee.Cartesian3,Ae=new Ee.Cartesian3,Pe=new Ee.Cartesian3,We=new Ee.Cartographic,De=new Ee.Cartesian2,Be=new Ee.Cartesian3,Fe=new fe.Matrix4,Ge=new fe.Matrix4;function ke(e,t,r,n,i,o,a,s,h){var d=Number.POSITIVE_INFINITY,c=i.north,u=i.south,l=i.east,I=i.west;l