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
6.3 KiB
2 lines
6.3 KiB
12 months ago
|
define(["exports","./Math-6a1814d8","./Cartesian2-c451a606","./Transforms-e4be2a30","./EllipsoidTangentPlane-af8ae194","./PolylinePipeline-d0f0e8fc"],function(a,L,j,p,d,Q){"use strict";var F=Object.freeze({ROUNDED:0,MITERED:1,BEVELED:2}),U=[new j.Cartesian3,new j.Cartesian3],_=new j.Cartesian3,q=new j.Cartesian3,Y=new j.Cartesian3,Z=new j.Cartesian3,k=new j.Cartesian3,H=new j.Cartesian3,J=new j.Cartesian3,K=new j.Cartesian3,W=new j.Cartesian3,X=new j.Cartesian3,g=new j.Cartesian3,$={},aa=new j.Cartographic;function ea(a,e,r,n){var t,i=a[0],s=a[1],o=j.Cartesian3.angleBetween(i,s),l=Math.ceil(o/n),C=new Array(l);if(e===r){for(t=0;t<l;t++)C[t]=e;return C.push(r),C}var c=(r-e)/l;for(t=1;t<l;t++){var u=e+t*c;C[t]=u}return C[0]=e,C.push(r),C}var f=new j.Cartesian3,w=new j.Cartesian3;var h=new j.Cartesian3(-1,0,0),v=new p.Matrix4,x=new p.Matrix4,P=new p.Matrix3,E=p.Matrix3.IDENTITY.clone(),M=new j.Cartesian3,T=new p.Cartesian4,B=new j.Cartesian3;function ra(a,e,r,n,t,i,s,o){var l=M,C=T;v=p.Transforms.eastNorthUpToFixedFrame(a,t,v),l=p.Matrix4.multiplyByPointAsVector(v,h,l);var c=function(a,e,r,n){var t=new d.EllipsoidTangentPlane(r,n),i=t.projectPointOntoPlane(j.Cartesian3.add(r,a,f),f),s=t.projectPointOntoPlane(j.Cartesian3.add(r,e,w),w),o=j.Cartesian2.angleBetween(i,s);return 0<=s.x*i.y-s.y*i.x?-o:o}(l=j.Cartesian3.normalize(l,l),e,a,t);P=p.Matrix3.fromRotationZ(c,P),B.z=i,v=p.Matrix4.multiplyTransformation(v,p.Matrix4.fromRotationTranslation(P,B,x),v);var u=E;u[0]=s;for(var y=0;y<o;y++)for(var m=0;m<r.length;m+=3)C=j.Cartesian3.fromArray(r,m,C),C=p.Matrix3.multiplyByVector(u,C,C),C=p.Matrix4.multiplyByPoint(v,C,C),n.push(C.x,C.y,C.z);return n}var l=new j.Cartesian3;function na(a,e,r,n,t,i,s){for(var o=0;o<a.length;o+=3){n=ra(j.Cartesian3.fromArray(a,o,l),e,r,n,t,i[o/3],s,1)}return n}function ta(a,e){for(var r=a.length,n=new Array(3*r),t=0,i=e.x+e.width/2,s=e.y+e.height/2,o=0;o<r;o++)n[t++]=a[o].x-i,n[t++]=0,n[t++]=a[o].y-s;return n}var z=new p.Quaternion,S=new j.Cartesian3,A=new p.Matrix3;function ia(a,e,r,n,t,i,s,o,l,C){var c,u,y=j.Cartesian3.angleBetween(j.Cartesian3.subtract(e,a,X),j.Cartesian3.subtract(r,a,g)),m=n===F.BEVELED?0:Math.ceil(y/L.CesiumMath.toRadians(5));if(c=t?p.Matrix3.fromQuaternion(p.Quaternion.fromAxisAngle(j.Cartesian3.negate(a,X),y/(m+1),z),A):p.Matrix3.fromQuaternion(p.Quaternion.fromAxisAngle(a,y/(m+1),z),A),e=j.Cartesian3.clone(e,S),0<m)for(var d=C?2:1,f=0;f<m;f++)e=p.Matrix3.multiplyByVector(c,e,e),u=j.Cartesian3.subtract(e,a,X),u=j.Cartesian3.normalize(u,u),t||(u=j.Cartesian3.negate(u,u)),s=ra(i.scaleToGeodeticSurface(e,g),u,o,s,i,l,1,d);else u=j.Cartesian3.subtract(e,a,X),u=j.Cartesian3.normalize(u,u),t||(u=j.Cartesian3.negate(u,u)),s=ra(i.scaleToGeodeticSurface(e,g),u,o,s,i,l,1,1),r=j.Cartesian3.clone(r,S),u=j.Cartesian3.subtract(r,a,X),u=j.Cartesian3.normalize(u,u),t||(u=j.Cartesian3.negate(u,u)),s=ra(i.scaleToGeodeticSurface(r,g),u,o,s,i,l,1,1);return s}$.removeDuplicatesFromShape=function(a){for(var e=a.length,r=[],n=e-1,t=0;t<e;n=t++){var i=a[n],s=a[t];j.Cartesian2.equals(i,s)||r.push(s)}return r},$.angleIsGreaterThanPi=function(a,e,r,n){var t=new d.EllipsoidTangentPlane(r,n),i=t.projectPointOntoPlane(j.Cartesian3.add(r,a,f),f),s=t.projectPointOntoPlane(j.Cartesian3.add(r,e,w),w);return 0<=s.x*i.y-s.y*i.x};var sa=new j.Cartesian3,oa=new j.Cartesian3;$.computePositions=function(a,e,r,n,t){var i=n._ellipsoid,s=function(a,e){for(var r=new Array(a.length),n=0;n<a.length;n++){var t=a[n];aa=e.cartesianToCartographic(t,aa),r[n]=aa.height,a[n]=e.scaleToGeodeticSurface(t,t)}return r}(a,i),o=n._granularity,l=n._cornerType,C=t?function(a,e){var r=a.length,n=new Array(6*r),t=0,i=e.x+e.width/2,s=e.y+e.height/2,o=a[0];n[t++]=o.x-i,n[t++]=0,n[t++]=o.y-s;for(var l=1;l<r;l++){var C=(o=a[l]).x-i,c=o.y-s;n[t++]=C,n[t++]=0,n[t++]=c,n[t++]=C,n[t++]=0,n[t++]=c}return o=a[0],n[t++]=o.x-i,n[t++]=0,n[t++]=o.y-s,n}(e,r):ta(e,r),c=t?ta(e,r):void 0,u=r.height/2,y=r.width/2,m=a.length,d=[],f=t?[]:void 0,p=_,g=q,w=Y,h=Z,v=k,x=H,P=J,E=K,M=W,T=a[0],B=a[1];h=i.geodeticSurfaceNormal(T,h),p=j.Cartesian3.subtract(B,T,p),p=j.C
|