2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
|
define(["./AttributeCompression-90851096","./EllipsoidTangentPlane-edb321d3","./buildModuleUrl-4e1b81e7","./Cartesian2-47311507","./Cartographic-3309dd0d","./when-b60132fc","./TerrainEncoding-c4158481","./IndexDatatype-8a5eead4","./Math-119be1a3","./PrimitiveType-a54dc62f","./OrientedBoundingBox-87d59c2a","./Check-7b2a090c","./GeometryAttribute-3a88ba31","./WebMercatorProjection-01b1b5e7","./createTaskProcessorWorker","./Cartesian4-3ca25aab","./IntersectionTests-7386ffbf","./Plane-7ae8294c","./Event-16a2dfbf","./RuntimeError-4a5c8994","./ComponentDatatype-c140a87d","./WebGLConstants-4ae0db90","./PolygonPipeline-660e1625","./earcut-2.2.1-20c8012f","./EllipsoidRhumbLine-ed1a6bf4","./FeatureDetection-c3b71206"],(function(e,t,r,i,n,o,a,s,d,c,u,h,l,I,m,g,f,v,T,p,E,y,w,N,b,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 C=[];M.getRegularGridIndices=function(e,t){var r=C[e];o.defined(r)||(C[e]=r=[]);var i=r[t];return o.defined(i)||W(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=C[e];o.defined(r)||(C[e]=r=[]);var i=r[t];return o.defined(i)||W(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 A=[];M.getRegularGridIndicesAndEdgeIndices=function(e,t){var r=A[e];o.defined(r)||(A[e]=r=[]);var i=r[t];if(!o.defined(i)){var n=M.getRegularGridIndices(e,t),a=P(e,t),s=a.westIndicesSouthToNorth,d=a.southIndicesEastToWest,c=a.eastIndicesNorthToSouth,u=a.northIndicesWestToEast;i=r[t]={indices:n,westIndicesSouthToNorth:s,southIndicesEastToWest:d,eastIndicesNorthToSouth:c,northIndicesWestToEast:u}}return i};var S=[];function P(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 W(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,c=d+1,u=s+1;r[i++]=s,r[i++]=d,r[i++]=u,r[i++]=u,r[i++]=d,r[i++]=c,++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 B(e,t,r,i,n){for(var a=o.defined(n),s=e[0],d=e.length,c=1;c<d;++c){var u=e[c];!a||n[s+"_"+u]?(r[i++]=s,r[i++]=u,r[i++]=t,r[i++]=t,r[i++]=u,r[i++]=t+1,s=u,++t):(s=u,++t)}return i}M.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var r=S[e];o.defined(r)||(S[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,c=n+d,u=3*(e+t-2),h=a+6*Math.max(0,d-4)+u,l=P(e,t),I=l.westIndicesSouthToNorth,m=l.southIndicesEastToWest,g=l.eastIndicesNorthToSouth,f=l.northIndicesWestToEast,v=s.IndexDatatype.createTypedArray(c,h);W(e,t,v,0),M.addSkirtIndices(I,m,g,f,n,v,a+u),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=B(e,d,o,a,s),a=B(t,d+=e.length,o,a,s),a=B(r,d+=t.length,o,a,s),B(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.throwInstan
|