2 lines
9.2 KiB
JavaScript
2 lines
9.2 KiB
JavaScript
|
/* 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.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),0),n};var c=[];xe.getRegularGridIndicesAndEdgeIndices=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=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<e;++a)n[o[a]=a]=e*t-1-a;for(a=0;a<t;++a)i[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:i,northIndicesWestToEast:o}}function E(e,t,r,n){for(var i=0,o=0;o<t-1;++o){for(var a=0;a<e-1;++a){var s=i+e,h=s+1,d=i+1;r[n++]=i,r[n++]=s,r[n++]=d,r[n++]=d,r[n++]=s,r[n++]=h,++i}++i}}function h(e,t,r,n){for(var i=e[0],o=e.length,a=1;a<o;++a){var s=e[a];r[n++]=i,r[n++]=s,r[n++]=t,r[n++]=t,r[n++]=s,r[n++]=t+1,i=s,++t}return n}xe.getRegularGridAndSkirtIndicesAndEdgeIndices=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=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.Ca
|