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
1.9 KiB
2 lines
1.9 KiB
12 months ago
|
define(["exports","./when-cbf8cd21","./Math-6a1814d8","./Cartesian2-c451a606","./arrayRemoveDuplicates-4dfa28d2","./PolylinePipeline-d0f0e8fc"],function(e,P,A,C,w,b){"use strict";var i={};var M=new C.Cartographic,E=new C.Cartographic;var F=new Array(2),H=new Array(2),L={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};i.computePositions=function(e,i,t,a,r,n){var o=function(e,i,t,a){var r=(i=w.arrayRemoveDuplicates(i,C.Cartesian3.equalsEpsilon)).length;if(!(r<2)){var n=P.defined(a),o=P.defined(t),l=new Array(r),s=new Array(r),h=new Array(r),g=i[0];l[0]=g;var p=e.cartesianToCartographic(g,M);o&&(p.height=t[0]),s[0]=p.height,h[0]=n?a[0]:0;for(var u,c,d=s[0]===h[0],v=1,y=1;y<r;++y){var f=i[y],m=e.cartesianToCartographic(f,E);o&&(m.height=t[y]),d=d&&0===m.height,u=p,c=m,A.CesiumMath.equalsEpsilon(u.latitude,c.latitude,A.CesiumMath.EPSILON10)&&A.CesiumMath.equalsEpsilon(u.longitude,c.longitude,A.CesiumMath.EPSILON10)?p.height<m.height&&(s[v-1]=m.height):(l[v]=f,s[v]=m.height,h[v]=n?a[y]:0,d=d&&s[v]===h[v],C.Cartographic.clone(m,p),++v)}if(!(d||v<2))return l.length=v,s.length=v,h.length=v,{positions:l,topHeights:s,bottomHeights:h}}}(e,i,t,a);if(P.defined(o)){i=o.positions,t=o.topHeights,a=o.bottomHeights;var l,s,h=i.length,g=h-2,p=A.CesiumMath.chordLength(r,e.maximumRadius),u=L;if(u.minDistance=p,u.ellipsoid=e,n){var c,d=0;for(c=0;c<h-1;c++)d+=b.PolylinePipeline.numberOfPoints(i[c],i[c+1],p)+1;l=new Float64Array(3*d),s=new Float64Array(3*d);var v=F,y=H;u.positions=v,u.height=y;var f=0;for(c=0;c<h-1;c++){v[0]=i[c],v[1]=i[c+1],y[0]=t[c],y[1]=t[c+1];var m=b.PolylinePipeline.generateArc(u);l.set(m,f),y[0]=a[c],y[1]=a[c+1],s.set(b.PolylinePipeline.generateArc(u),f),f+=m.length}}else u.positions=i,u.height=t,l=new Float64Array(b.PolylinePipeline.generateArc(u)),u.height=a,s=new Float64Array(b.PolylinePipeline.generateArc(u));return{bottomPositions:s,topPositions:l,numCorners:g}}},e.WallGeometryLibrary=i});
|