月球大数据地理空间分析展示平台-【中台】
Surpriseplus
2023-06-14 a7ceb07fdcbcac1edcecb8c96bfa7808ea7670c5
1
define(["exports","./arrayRemoveDuplicates-fe254feb","./Matrix2-52f9f880","./defaultValue-69ee94f4","./ComponentDatatype-a9820060","./PolylinePipeline-96d5682f"],(function(e,t,i,n,o,r){"use strict";const a={};function s(e,t){return o.CesiumMath.equalsEpsilon(e.latitude,t.latitude,o.CesiumMath.EPSILON10)&&o.CesiumMath.equalsEpsilon(e.longitude,t.longitude,o.CesiumMath.EPSILON10)}const l=new i.Cartographic,h=new i.Cartographic;const g=new Array(2),c=new Array(2),u={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};a.computePositions=function(e,a,p,d,f,y){const m=function(e,o,r,a){const g=(o=t.arrayRemoveDuplicates(o,i.Cartesian3.equalsEpsilon)).length;if(g<2)return;const c=n.defined(a),u=n.defined(r),p=new Array(g),d=new Array(g),f=new Array(g),y=o[0];p[0]=y;const m=e.cartesianToCartographic(y,l);u&&(m.height=r[0]),d[0]=m.height,f[0]=c?a[0]:0;let P=d[0]===f[0],A=1;for(let t=1;t<g;++t){const n=o[t],l=e.cartesianToCartographic(n,h);u&&(l.height=r[t]),P=P&&0===l.height,s(m,l)?m.height<l.height&&(d[A-1]=l.height):(p[A]=n,d[A]=l.height,f[A]=c?a[t]:0,P=P&&d[A]===f[A],i.Cartographic.clone(l,m),++A)}return P||A<2?void 0:(p.length=A,d.length=A,f.length=A,{positions:p,topHeights:d,bottomHeights:f})}(e,a,p,d);if(!n.defined(m))return;a=m.positions,p=m.topHeights,d=m.bottomHeights;const P=a.length,A=P-2;let C,w;const v=o.CesiumMath.chordLength(f,e.maximumRadius),b=u;if(b.minDistance=v,b.ellipsoid=e,y){let e,t=0;for(e=0;e<P-1;e++)t+=r.PolylinePipeline.numberOfPoints(a[e],a[e+1],v)+1;C=new Float64Array(3*t),w=new Float64Array(3*t);const i=g,n=c;b.positions=i,b.height=n;let o=0;for(e=0;e<P-1;e++){i[0]=a[e],i[1]=a[e+1],n[0]=p[e],n[1]=p[e+1];const t=r.PolylinePipeline.generateArc(b);C.set(t,o),n[0]=d[e],n[1]=d[e+1],w.set(r.PolylinePipeline.generateArc(b),o),o+=t.length}}else b.positions=a,b.height=p,C=new Float64Array(r.PolylinePipeline.generateArc(b)),b.height=d,w=new Float64Array(r.PolylinePipeline.generateArc(b));return{bottomPositions:w,topPositions:C,numCorners:A}},e.WallGeometryLibrary=a}));