2025-01-21 08:36:33 +08:00
|
|
|
define(["./AttributeCompression-90851096","./EllipsoidTangentPlane-ce9a1fbb","./buildModuleUrl-8958744c","./Cartesian2-47311507","./Cartographic-3309dd0d","./when-b60132fc","./TerrainEncoding-895d4619","./IndexDatatype-8a5eead4","./Math-119be1a3","./FeatureDetection-806b12f0","./OrientedBoundingBox-08964f84","./Check-7b2a090c","./GeometryAttribute-06a41648","./WebMercatorProjection-01b1b5e7","./createTaskProcessorWorker","./Cartesian4-3ca25aab","./IntersectionTests-a793ed08","./Plane-a3d8b3d2","./Event-16a2dfbf","./RuntimeError-4a5c8994","./ComponentDatatype-c140a87d","./WebGLConstants-4ae0db90","./PolygonPipeline-d328cdf1","./earcut-2.2.1-20c8012f","./EllipsoidRhumbLine-ed1a6bf4"],(function(e,t,r,i,n,o,a,s,d,u,c,h,l,I,m,g,f,v,T,p,E,y,w,N,x){"use strict";function M(){h.DeveloperError.throwInstantiationError()}Object.defineProperties(M.prototype,{errorEvent:{get:h.DeveloperError.throwInstantiationError},credit:{get:h.DeveloperError.throwInstantiationError},tilingScheme:{get:h.DeveloperError.throwInstantiationError},ready:{get:h.DeveloperError.throwInstantiationError},readyPromise:{get:h.DeveloperError.throwInstantiationError},hasWaterMask:{get:h.DeveloperError.throwInstantiationError},hasVertexNormals:{get:h.DeveloperError.throwInstantiationError},availability:{get:h.DeveloperError.throwInstantiationError}});var b=[];M.getRegularGridIndices=function(e,t){var r=b[e];o.defined(r)||(b[e]=r=[]);var i=r[t];return o.defined(i)||P(e,t,i=e*t<d.CesiumMath.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6+3*(e+t-2)):r[t]=new Uint32Array((e-1)*(t-1)*6+3*(e+t-2)),0),i},M.getRegularGridIndicesForReproject=function(e,t){var r=b[e];o.defined(r)||(b[e]=r=[]);var i=r[t];return o.defined(i)||P(e,t,i=e*t<d.CesiumMath.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),0),i};var C=[];M.getRegularGridIndicesAndEdgeIndices=function(e,t){var r=C[e];o.defined(r)||(C[e]=r=[]);var i=r[t];if(!o.defined(i)){var n=M.getRegularGridIndices(e,t),a=S(e,t),s=a.westIndicesSouthToNorth,d=a.southIndicesEastToWest,u=a.eastIndicesNorthToSouth,c=a.northIndicesWestToEast;i=r[t]={indices:n,westIndicesSouthToNorth:s,southIndicesEastToWest:d,eastIndicesNorthToSouth:u,northIndicesWestToEast:c}}return i};var A=[];function S(e,t){var r,i=new Array(t),n=new Array(e),o=new Array(t),a=new Array(e);for(r=0;r<e;++r)a[r]=r,n[r]=e*t-1-r;for(r=0;r<t;++r)o[r]=(r+1)*e-1,i[r]=(t-r-1)*e;return{westIndicesSouthToNorth:i,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:a}}function P(e,t,r,i){for(var n=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=n,d=s+e,u=d+1,c=s+1;r[i++]=s,r[i++]=d,r[i++]=c,r[i++]=c,r[i++]=d,r[i++]=u,++n}++n}var h=(t-1)/2,l=(e-1)/2;n=0;for(a=0;a<l;a++)r[i++]=n,r[i++]=n+1,r[i++]=n+2,n+=2;n=e*(t-1);for(a=0;a<l;a++)r[i++]=n+1,r[i++]=n,r[i++]=n+2,n+=2;n=0;for(a=0;a<h;a++)r[i++]=n+e,r[i++]=n,r[i++]=n+2*e,n+=2*e;n=e-1;for(a=0;a<h;a++)r[i++]=n,r[i++]=n+e,r[i++]=n+2*e,n+=2*e}function W(e,t,r,i,n){for(var a=o.defined(n),s=e[0],d=e.length,u=1;u<d;++u){var c=e[u];!a||n[s+"_"+c]?(r[i++]=s,r[i++]=c,r[i++]=t,r[i++]=t,r[i++]=c,r[i++]=t+1,s=c,++t):(s=c,++t)}return i}M.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var r=A[e];o.defined(r)||(A[e]=r=[]);var i=r[t];if(!o.defined(i)){var n=e*t,a=(e-1)*(t-1)*6,d=2*e+2*t,u=n+d,c=3*(e+t-2),h=a+6*Math.max(0,d-4)+c,l=S(e,t),I=l.westIndicesSouthToNorth,m=l.southIndicesEastToWest,g=l.eastIndicesNorthToSouth,f=l.northIndicesWestToEast,v=s.IndexDatatype.createTypedArray(u,h);P(e,t,v,0),M.addSkirtIndices(I,m,g,f,n,v,a+c),i=r[t]={indices:v,westIndicesSouthToNorth:I,southIndicesEastToWest:m,eastIndicesNorthToSouth:g,northIndicesWestToEast:f,indexCountWithoutSkirts:a}}return i},M.addSkirtIndices=function(e,t,r,i,n,o,a,s){var d=n;a=W(e,d,o,a,s),a=W(t,d+=e.length,o,a,s),a=W(r,d+=t.length,o,a,s),W(i,d+=r.length,o,a,s)},M.heightmapTerrainQuality=.25,M.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*M.heightmapTerrainQuality/(t*r)},M.prototype.requestTileGeometry=h.DeveloperError.throwInstantiationError,M.prototype.getL
|