qa-regulatory-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/createVerticesFromQuantized...

2 lines
8.3 KiB
JavaScript
Raw Permalink Normal View History

2023-11-07 10:04:37 +08:00
define(["./AxisAlignedBoundingBox-8774439c","./Cartesian2-bd414876","./Cartesian3-e0307675","./defaultValue-81eec7ed","./TerrainEncoding-0f7ffc20","./IndexDatatype-3f3c99e8","./Math-e73894ab","./Matrix4-4c545f70","./Rectangle-cf3e0e3e","./Check-741c5f3c","./Transforms-5b829630","./WebMercatorProjection-44373a3d","./createTaskProcessorWorker","./BoundingSphere-9a3b5656","./GeographicProjection-c931c7fb","./AttributeCompression-8f752c03","./ComponentDatatype-aaeec80f","./WebGLConstants-508b9636","./Matrix2-dc0c61cc","./RuntimeError-26acdd3b","./when-422ea0ae","./Resource-8ae1a924","./combine-3c023bda"],(function(e,t,r,n,o,i,a,s,c,d,h,u,l,I,g,m,T,f,E,p,y,N,w){"use strict";function M(){d.DeveloperError.throwInstantiationError()}Object.defineProperties(M.prototype,{errorEvent:{get:d.DeveloperError.throwInstantiationError},credit:{get:d.DeveloperError.throwInstantiationError},tilingScheme:{get:d.DeveloperError.throwInstantiationError},ready:{get:d.DeveloperError.throwInstantiationError},readyPromise:{get:d.DeveloperError.throwInstantiationError},hasWaterMask:{get:d.DeveloperError.throwInstantiationError},hasVertexNormals:{get:d.DeveloperError.throwInstantiationError},availability:{get:d.DeveloperError.throwInstantiationError}});const S=[];M.getRegularGridIndices=function(e,t){let r=S[e];n.defined(r)||(S[e]=r=[]);let o=r[t];return n.defined(o)||(o=e*t<a.CesiumMath.SIXTY_FOUR_KILOBYTES?r[t]=new Uint16Array((e-1)*(t-1)*6):r[t]=new Uint32Array((e-1)*(t-1)*6),A(e,t,o,0)),o};const b=[];M.getRegularGridIndicesAndEdgeIndices=function(e,t){let r=b[e];n.defined(r)||(b[e]=r=[]);let o=r[t];if(!n.defined(o)){const n=M.getRegularGridIndices(e,t),i=C(e,t),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,d=i.northIndicesWestToEast;o=r[t]={indices:n,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return o};const x=[];function C(e,t){const r=new Array(t),n=new Array(e),o=new Array(t),i=new Array(e);let a;for(a=0;a<e;++a)i[a]=a,n[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function A(e,t,r,n){let o=0;for(let i=0;i<t-1;++i){for(let t=0;t<e-1;++t){const t=o,i=t+e,a=i+1,s=t+1;r[n++]=t,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function W(e,t,r,n){let o=e[0];const i=e.length;for(let a=1;a<i;++a){const i=e[a];r[n++]=o,r[n++]=i,r[n++]=t,r[n++]=t,r[n++]=i,r[n++]=t+1,o=i,++t}return n}M.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let r=x[e];n.defined(r)||(x[e]=r=[]);let o=r[t];if(!n.defined(o)){const n=e*t,a=(e-1)*(t-1)*6,s=2*e+2*t,c=n+s,d=a+6*Math.max(0,s-4),h=C(e,t),u=h.westIndicesSouthToNorth,l=h.southIndicesEastToWest,I=h.eastIndicesNorthToSouth,g=h.northIndicesWestToEast,m=i.IndexDatatype.createTypedArray(c,d);A(e,t,m,0),M.addSkirtIndices(u,l,I,g,n,m,a),o=r[t]={indices:m,westIndicesSouthToNorth:u,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:g,indexCountWithoutSkirts:a}}return o},M.addSkirtIndices=function(e,t,r,n,o,i,a){let s=o;a=W(e,s,i,a),s+=e.length,a=W(t,s,i,a),s+=t.length,a=W(r,s,i,a),s+=r.length,W(n,s,i,a)},M.heightmapTerrainQuality=.25,M.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*M.heightmapTerrainQuality/(t*r)},M.prototype.requestTileGeometry=d.DeveloperError.throwInstantiationError,M.prototype.getLevelMaximumGeometricError=d.DeveloperError.throwInstantiationError,M.prototype.getTileDataAvailable=d.DeveloperError.throwInstantiationError,M.prototype.loadTileDataAvailability=d.DeveloperError.throwInstantiationError;const v=32767,P=new r.Cartesian3,D=new r.Cartesian3,k=new r.Cartesian3,F=new t.Cartographic,G=new t.Cartesian2;function H(e,t,n,o,i,c,d,h,u){let l=Number.POSITIVE_INFINITY;const I=i.north,g=i.south;let m=i.east;const T=i.west;m<T&&(m+=a.CesiumMath.TWO_PI);const f=e.length;for(let i=0;i<f;++i){const f=e[i],E=n[f],p=o[f];F.longitude=a.CesiumMath.lerp(T,m,p.x),F.latitude=a.CesiumMath.lerp(g,I,p.y),F.height=E-t;const y=c