You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
8.7 KiB
2 lines
8.7 KiB
3 years ago
|
define(["./when-54c2dc71","./Check-6c0211bc","./Math-fc8cecf5","./Cartesian2-bddc1162","./Transforms-d07bb42c","./RuntimeError-2109023a","./WebGLConstants-76bb35d1","./ComponentDatatype-6d99a1ee","./AttributeCompression-9fc99391","./IndexDatatype-53503fee","./IntersectionTests-8abf6dba","./Plane-c8971487","./WebMercatorProjection-df58d479","./createTaskProcessorWorker","./EllipsoidTangentPlane-0a0e472c","./OrientedBoundingBox-2c275398","./TerrainEncoding-d6aef4ae"],function(ie,e,oe,ae,se,t,r,n,de,ce,i,o,ue,a,he,le,Ie){"use strict";function me(){e.DeveloperError.throwInstantiationError()}Object.defineProperties(me.prototype,{errorEvent:{get:e.DeveloperError.throwInstantiationError},credit:{get:e.DeveloperError.throwInstantiationError},tilingScheme:{get:e.DeveloperError.throwInstantiationError},ready:{get:e.DeveloperError.throwInstantiationError},readyPromise:{get:e.DeveloperError.throwInstantiationError},hasWaterMask:{get:e.DeveloperError.throwInstantiationError},hasVertexNormals:{get:e.DeveloperError.throwInstantiationError},availability:{get:e.DeveloperError.throwInstantiationError}});var s=[];me.getRegularGridIndices=function(e,t){var r=s[e];ie.defined(r)||(s[e]=r=[]);var n=r[t];return ie.defined(n)||m(e,t,n=e*t<oe.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 d=[];me.getRegularGridIndicesAndEdgeIndices=function(e,t){var r=d[e];ie.defined(r)||(d[e]=r=[]);var n,i,o,a,s=r[t];return ie.defined(s)||(n=me.getRegularGridIndices(e,t),i=(a=I(e,t)).westIndicesSouthToNorth,o=a.southIndicesEastToWest,e=a.eastIndicesNorthToSouth,a=a.northIndicesWestToEast,s=r[t]={indices:n,westIndicesSouthToNorth:i,southIndicesEastToWest:o,eastIndicesNorthToSouth:e,northIndicesWestToEast:a}),s};var l=[];function I(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 m(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,d=s+1,c=i+1;r[n++]=i,r[n++]=s,r[n++]=c,r[n++]=c,r[n++]=s,r[n++]=d,++i}++i}}function c(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}me.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){var r=l[e];ie.defined(r)||(l[e]=r=[]);var n,i,o,a,s,d,c,u,h=r[t];return ie.defined(h)||(o=(n=e*t)+(d=2*e+2*t),u=(i=(e-1)*(t-1)*6)+6*Math.max(0,d-4),a=(c=I(e,t)).westIndicesSouthToNorth,s=c.southIndicesEastToWest,d=c.eastIndicesNorthToSouth,c=c.northIndicesWestToEast,m(e,t,u=ce.IndexDatatype.createTypedArray(o,u),0),me.addSkirtIndices(a,s,d,c,n,u,i),h=r[t]={indices:u,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:d,northIndicesWestToEast:c,indexCountWithoutSkirts:i}),h},me.addSkirtIndices=function(e,t,r,n,i,o,a){a=c(e,i,o,a),a=c(t,i+=e.length,o,a),a=c(r,i+=t.length,o,a),c(n,i+=r.length,o,a)},me.heightmapTerrainQuality=.25,me.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*me.heightmapTerrainQuality/(t*r)},me.prototype.requestTileGeometry=e.DeveloperError.throwInstantiationError,me.prototype.getLevelMaximumGeometricError=e.DeveloperError.throwInstantiationError,me.prototype.getTileDataAvailable=e.DeveloperError.throwInstantiationError,me.prototype.loadTileDataAvailability=e.DeveloperError.throwInstantiationError;var ge=32767,Te=new ae.Cartesian3,pe=new ae.Cartesian3,Ee=new ae.Cartesian3,ye=new ae.Cartographic,fe=new ae.Cartesian2,ve=new ae.Cartesian3,Ne=new se.Matrix4,we=new se.Matrix4;function xe(e,t,r,n,i,o,a,s,d){var c=Number.POSITIVE_INFINITY,u=i.north,h=i.south,l=i.east,I=i.west;l<I&&(l+=oe.CesiumMath.TWO_PI);for(var m=e.length,g=0;g<m;++g){var T=e[g],p=r[T],T=n[T];ye.longitude=oe.CesiumMath.lerp(I,l,T.x),ye.latitude=oe.CesiumMath.lerp(h,u,T.y),ye.height=p-t;p=o.cartographicToCartesian(ye,Te);se.Matrix4.multiplyByPoint(a,p,p),ae.Cartesian3.minimumByComponent(p,s,s),ae.Cartesian3.maxim
|