数字孪生Web 后台dt( digital twin)2.0版本 统一命名格式
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.
 
 
 
 
 

1 lines
5.2 KiB

define(["./when-cbf8cd21","./Check-35e1a91d","./Math-6a1814d8","./Cartesian2-c451a606","./Transforms-e4be2a30","./RuntimeError-f4c64df1","./WebGLConstants-95ceb4e9","./ComponentDatatype-7ee14e67","./GeometryAttribute-6f280ece","./GeometryAttributes-90846c5f","./IndexDatatype-354a5ea3","./IntersectionTests-8371bf29","./Plane-929e0674","./ArcType-2b58731c","./EllipsoidRhumbLine-8c93f67a","./EllipsoidGeodesic-19b1a191","./PolylinePipeline-d0f0e8fc","./Color-bfeeb147"],function(S,e,I,R,O,o,r,M,U,N,F,t,a,H,l,i,W,Y){"use strict";function q(e,o,r,t,a,l,i){var n,s=W.PolylinePipeline.numberOfPoints(e,o,a),p=r.red,d=r.green,c=r.blue,f=r.alpha,y=t.red,u=t.green,h=t.blue,C=t.alpha;if(Y.Color.equals(r,t)){for(n=0;n<s;n++)l[i++]=Y.Color.floatToByte(p),l[i++]=Y.Color.floatToByte(d),l[i++]=Y.Color.floatToByte(c),l[i++]=Y.Color.floatToByte(f);return i}var T=(y-p)/s,g=(u-d)/s,m=(h-c)/s,v=(C-f)/s,b=i;for(n=0;n<s;n++)l[b++]=Y.Color.floatToByte(p+n*T),l[b++]=Y.Color.floatToByte(d+n*g),l[b++]=Y.Color.floatToByte(c+n*m),l[b++]=Y.Color.floatToByte(f+n*v);return b}function c(e){var o=(e=S.defaultValue(e,S.defaultValue.EMPTY_OBJECT)).positions,r=e.colors,t=S.defaultValue(e.colorsPerVertex,!1);this._positions=o,this._colors=r,this._colorsPerVertex=t,this._arcType=S.defaultValue(e.arcType,H.ArcType.GEODESIC),this._granularity=S.defaultValue(e.granularity,I.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=S.defaultValue(e.ellipsoid,R.Ellipsoid.WGS84),this._workerName="createSimplePolylineGeometry";var a=1+o.length*R.Cartesian3.packedLength;a+=S.defined(r)?1+r.length*Y.Color.packedLength:1,this.packedLength=a+R.Ellipsoid.packedLength+3}c.pack=function(e,o,r){var t;r=S.defaultValue(r,0);var a=e._positions,l=a.length;for(o[r++]=l,t=0;t<l;++t,r+=R.Cartesian3.packedLength)R.Cartesian3.pack(a[t],o,r);var i=e._colors;for(l=S.defined(i)?i.length:0,o[r++]=l,t=0;t<l;++t,r+=Y.Color.packedLength)Y.Color.pack(i[t],o,r);return R.Ellipsoid.pack(e._ellipsoid,o,r),r+=R.Ellipsoid.packedLength,o[r++]=e._colorsPerVertex?1:0,o[r++]=e._arcType,o[r]=e._granularity,o},c.unpack=function(e,o,r){var t;o=S.defaultValue(o,0);var a=e[o++],l=new Array(a);for(t=0;t<a;++t,o+=R.Cartesian3.packedLength)l[t]=R.Cartesian3.unpack(e,o);var i=0<(a=e[o++])?new Array(a):void 0;for(t=0;t<a;++t,o+=Y.Color.packedLength)i[t]=Y.Color.unpack(e,o);var n=R.Ellipsoid.unpack(e,o);o+=R.Ellipsoid.packedLength;var s=1===e[o++],p=e[o++],d=e[o];return S.defined(r)?(r._positions=l,r._colors=i,r._ellipsoid=n,r._colorsPerVertex=s,r._arcType=p,r._granularity=d,r):new c({positions:l,colors:i,ellipsoid:n,colorsPerVertex:s,arcType:p,granularity:d})};var z=new Array(2),J=new Array(2),j={positions:z,height:J,ellipsoid:void 0,minDistance:void 0,granularity:void 0};return c.createGeometry=function(e){var o,r,t,a,l,i=e._positions,n=e._colors,s=e._colorsPerVertex,p=e._arcType,d=e._granularity,c=e._ellipsoid,f=I.CesiumMath.chordLength(d,c.maximumRadius),y=S.defined(n)&&!s,u=i.length,h=0;if(p===H.ArcType.GEODESIC||p===H.ArcType.RHUMB){var C,T,g;g=p===H.ArcType.GEODESIC?(C=I.CesiumMath.chordLength(d,c.maximumRadius),T=W.PolylinePipeline.numberOfPoints,W.PolylinePipeline.generateArc):(C=d,T=W.PolylinePipeline.numberOfPointsRhumbLine,W.PolylinePipeline.generateRhumbArc);var m=W.PolylinePipeline.extractHeights(i,c),v=j;if(p===H.ArcType.GEODESIC?v.minDistance=f:v.granularity=d,v.ellipsoid=c,y){var b=0;for(o=0;o<u-1;o++)b+=T(i[o],i[o+1],C)+1;r=new Float64Array(3*b),a=new Uint8Array(4*b),v.positions=z,v.height=J;var P=0;for(o=0;o<u-1;++o){z[0]=i[o],z[1]=i[o+1],J[0]=m[o],J[1]=m[o+1];var _=g(v);if(S.defined(n)){var B=_.length/3;l=n[o];for(var A=0;A<B;++A)a[P++]=Y.Color.floatToByte(l.red),a[P++]=Y.Color.floatToByte(l.green),a[P++]=Y.Color.floatToByte(l.blue),a[P++]=Y.Color.floatToByte(l.alpha)}r.set(_,h),h+=_.length}}else if(v.positions=i,v.height=m,r=new Float64Array(g(v)),S.defined(n)){for(a=new Uint8Array(r.length/3*4),o=0;o<u-1;++o){h=q(i[o],i[o+1],n[o],n[o+1],f,a,h)}var E=n[u-1];a[h++]=Y.Color.floatToByte(E.red),a[h++]=Y.Color.floatToByte(E.green),a[h++]=Y.Color.floatToByte(E.blue),a[h++]=Y.Color.floatToByte(E.alpha)}}else{t=y?2*u-2:u,r=new Float64Array(3*t),a=S.defined(n)?new Uint8Array(4*t):void 0;var k=0,G=0;for(o=0;o<u;++o){var w=i[o];if(y&&0<o&&(R.Cartesian3.pack(w,r,k),k+=3,l=n[o-1],a[G++]=Y.Color.floatToByte(l.red),a[G++]=Y.Color.floatToByte(l.green),a[G++]=Y.Color.floatToByte(l.blue),a[G++]=Y.Color.floatToByte(l.alpha)),y&&o===u-1)break;R.Cartesian3.pack(w,r,k),k+=3,S.defined(n)&&(l=n[o],a[G++]=Y.Color.floatToByte(l.red),a[G++]=Y.Color.floatToByte(l.green),a[G++]=Y.Color.floatToByte(l.blue),a[G++]=Y.Color.floatToByte(l.alpha))}}var D=new N.GeometryAttributes;D.position=new U.GeometryAttribute({componentDatatype:M.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:r}),S.defined(n)&&(D.color=new U.GeometryAttribute({componentDatatype:M.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,values:a,normalize:!0}));var L=2*((t=r.length/3)-1),V=F.IndexDatatype.createTypedArray(t,L),x=0;for(o=0;o<t-1;++o)V[x++]=o,V[x++]=o+1;return new U.Geometry({attributes:D,indices:V,primitiveType:U.PrimitiveType.LINES,boundingSphere:O.BoundingSphere.fromPoints(i)})},function(e,o){return S.defined(o)&&(e=c.unpack(e,o)),e._ellipsoid=R.Ellipsoid.clone(e._ellipsoid),c.createGeometry(e)}});