2025-01-21 08:36:33 +08:00
|
|
|
define(["./when-b60132fc","./Cartesian2-47311507","./buildModuleUrl-8958744c","./Cartographic-3309dd0d","./ComponentDatatype-c140a87d","./Check-7b2a090c","./GeometryAttribute-06a41648","./GeometryAttributes-252e9929","./IndexDatatype-8a5eead4","./Math-119be1a3","./FeatureDetection-806b12f0","./VertexFormat-6446fca0","./WallGeometryLibrary-b3b432bb","./Event-16a2dfbf","./RuntimeError-4a5c8994","./WebGLConstants-4ae0db90","./Cartesian4-3ca25aab","./arrayRemoveDuplicates-d2f048c5","./PolylinePipeline-3454449c","./EllipsoidGeodesic-0f19ac62","./EllipsoidRhumbLine-ed1a6bf4","./IntersectionTests-a793ed08","./Plane-a3d8b3d2"],(function(e,t,a,i,n,r,o,s,l,m,u,p,d,c,y,f,C,g,h,v,b,x,A){"use strict";var _=new i.Cartesian3,E=new i.Cartesian3,F=new i.Cartesian3,w=new i.Cartesian3,k=new i.Cartesian3,L=new i.Cartesian3,P=new i.Cartesian3,D=new i.Cartesian3;function G(a){var n=(a=e.defaultValue(a,e.defaultValue.EMPTY_OBJECT)).positions,r=a.maximumHeights,o=a.minimumHeights,s=e.defaultValue(a.vertexFormat,p.VertexFormat.DEFAULT),l=e.defaultValue(a.granularity,m.CesiumMath.RADIANS_PER_DEGREE),u=e.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84);this._positions=n,this._minimumHeights=o,this._maximumHeights=r,this._vertexFormat=p.VertexFormat.clone(s),this._granularity=l,this._ellipsoid=t.Ellipsoid.clone(u),this._enuCenter=a.enuCenter,this._workerName="createWallGeometry";var d=1+n.length*i.Cartesian3.packedLength+2;e.defined(o)&&(d+=o.length),e.defined(r)&&(d+=r.length),this.packedLength=d+t.Ellipsoid.packedLength+p.VertexFormat.packedLength+1,this.packedLength+=i.Cartesian3.packedLength}G.pack=function(a,n,r){var o;r=e.defaultValue(r,0);var s=a._positions,l=s.length;for(n[r++]=l,o=0;o<l;++o,r+=i.Cartesian3.packedLength)i.Cartesian3.pack(s[o],n,r);var m=a._minimumHeights;if(l=e.defined(m)?m.length:0,n[r++]=l,e.defined(m))for(o=0;o<l;++o)n[r++]=m[o];var u=a._maximumHeights;if(l=e.defined(u)?u.length:0,n[r++]=l,e.defined(u))for(o=0;o<l;++o)n[r++]=u[o];return t.Ellipsoid.pack(a._ellipsoid,n,r),r+=t.Ellipsoid.packedLength,p.VertexFormat.pack(a._vertexFormat,n,r),r+=p.VertexFormat.packedLength,n[r++]=a._granularity,e.defined(a._enuCenter)?i.Cartesian3.pack(a._enuCenter,n,r):i.Cartesian3.pack(i.Cartesian3.ZERO,n,r),n};var H=t.Ellipsoid.clone(t.Ellipsoid.UNIT_SPHERE),T=new p.VertexFormat,V={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:H,vertexFormat:T,granularity:void 0,enuCenter:void 0};return G.unpack=function(a,n,r){var o;n=e.defaultValue(n,0);var s,l,m=a[n++],u=new Array(m);for(o=0;o<m;++o,n+=i.Cartesian3.packedLength)u[o]=i.Cartesian3.unpack(a,n);if((m=a[n++])>0)for(s=new Array(m),o=0;o<m;++o)s[o]=a[n++];if((m=a[n++])>0)for(l=new Array(m),o=0;o<m;++o)l[o]=a[n++];var d=t.Ellipsoid.unpack(a,n,H);n+=t.Ellipsoid.packedLength;var c=p.VertexFormat.unpack(a,n,T);n+=p.VertexFormat.packedLength;var y=a[n++],f=i.Cartesian3.unpack(a,n);return i.Cartesian3.equals(f,i.Cartesian3.ZERO)&&(f=void 0),e.defined(r)?(r._positions=u,r._minimumHeights=s,r._maximumHeights=l,r._ellipsoid=t.Ellipsoid.clone(d,r._ellipsoid),r._vertexFormat=p.VertexFormat.clone(c,r._vertexFormat),r._granularity=y,r._enuCenter=f,r):(V.positions=u,V.minimumHeights=s,V.maximumHeights=l,V.granularity=y,V.enuCenter=f,new G(V))},G.fromConstantHeights=function(t){var a,i,n=(t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT)).positions,r=t.minimumHeight,o=t.maximumHeight,s=e.defined(r),l=e.defined(o);if(s||l){var m=n.length;a=s?new Array(m):void 0,i=l?new Array(m):void 0;for(var u=0;u<m;++u)s&&(a[u]=r),l&&(i[u]=o)}return new G({positions:n,maximumHeights:i,minimumHeights:a,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat})},G.createGeometry=function(t){var r=t._positions,p=t._minimumHeights,c=t._maximumHeights,y=t._vertexFormat,f=t._granularity,C=t._ellipsoid,g=t._enuCenter,h=d.WallGeometryLibrary.computePositions(C,r,c,p,f,!0,g);if(e.defined(h.pos)){var v;e.defined(g)&&(v=o.Transforms.eastNorthUpToFixedFrame(g));var b,x=h.pos.bottomPositions,A=h.pos.topPositions,G=h.pos.numCorners,H=A.length,T=2*H,V=y.position?new Float64Array(T):void 0,O=y.normal?new Float32Array(T):void 0
|