2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
define(["./GeometryOffsetAttribute-6e5d8e16","./arrayRemoveDuplicates-db90b85c","./Transforms-251ff661","./Cartesian2-697a9954","./Check-f3fec9b0","./ComponentDatatype-417761a2","./PolylineVolumeGeometryLibrary-82babed3","./CorridorGeometryLibrary-b7e7396f","./when-54335d57","./GeometryAttribute-7ca1c9e4","./GeometryAttributes-caa08d6c","./IndexDatatype-c134ea39","./Math-737a2579","./PolygonPipeline-1048742e","./VertexFormat-acf45ede","./RuntimeError-88a32665","./WebGLConstants-4739ce15","./EllipsoidTangentPlane-ae33ec6a","./AxisAlignedBoundingBox-dcfdb7a9","./IntersectionTests-3e34a0aa","./Plane-d4cb7bb3","./PolylinePipeline-d9c22c71","./EllipsoidGeodesic-efd225af","./EllipsoidRhumbLine-e5c51fa7"],function(E,y,m,rt,t,at,f,it,ot,nt,st,lt,dt,V,F,e,r,a,i,o,n,s,l,d){"use strict";var ut=new rt.Cartesian3,mt=new rt.Cartesian3,yt=new rt.Cartesian3,ft=new rt.Cartesian3,L=new rt.Cartesian3,ct=new rt.Cartesian3,pt=new rt.Cartesian3,ht=new rt.Cartesian3;function c(t,e){for(var r=0;r<t.length;r++)t[r]=e.scaleToGeodeticSurface(t[r],t[r]);return t}function gt(t,e,r,a,i,o){var n=t.normals,s=t.tangents,l=t.bitangents,t=rt.Cartesian3.normalize(rt.Cartesian3.cross(r,e,pt),pt);o.normal&&it.CorridorGeometryLibrary.addAttribute(n,e,a,i),o.tangent&&it.CorridorGeometryLibrary.addAttribute(s,t,a,i),o.bitangent&&it.CorridorGeometryLibrary.addAttribute(l,r,a,i)}function x(t,e,r){var a,i=t.positions,o=t.corners,n=t.endPositions,s=t.lefts,l=t.normals,d=new st.GeometryAttributes,u=0,m=0,y=0;for(D=0;D<i.length;D+=2)u+=a=i[D].length-3,y+=2*a,m+=i[D+1].length-3;for(u+=3,m+=3,D=0;D<o.length;D++){var f=o[D],c=o[D].leftPositions;ot.defined(c)?u+=a=c.length:m+=a=o[D].rightPositions.length,y+=a}var p,h=ot.defined(n);h&&(u+=p=n[0].length-3,m+=p,y+=6*(p/=3));var g,C,b,A,t=u+m,v=new Float64Array(t),_={normals:e.normal?new Float32Array(t):void 0,tangents:e.tangent?new Float32Array(t):void 0,bitangents:e.bitangent?new Float32Array(t):void 0},w=0,T=t-1,G=ut,E=mt,V=p/2,F=lt.IndexDatatype.createTypedArray(t/3,y),L=0;if(h)for(var x=yt,P=ft,N=n[0],G=rt.Cartesian3.fromArray(l,0,G),E=rt.Cartesian3.fromArray(s,0,E),D=0;D<V;D++)x=rt.Cartesian3.fromArray(N,3*(V-1-D),x),P=rt.Cartesian3.fromArray(N,3*(V+D),P),it.CorridorGeometryLibrary.addAttribute(v,P,w),it.CorridorGeometryLibrary.addAttribute(v,x,void 0,T),gt(_,G,E,w,T,e),A=(C=w/3)+1,b=(g=(T-2)/3)-1,F[L++]=g,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3;var M,O,I=0,S=0,R=i[I++],k=i[I++];for(v.set(R,w),v.set(k,T-k.length+1),E=rt.Cartesian3.fromArray(s,S,E),a=k.length-3,D=0;D<a;D+=3)M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,D,pt),pt),O=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(k,a-D,ht),ht),gt(_,G=rt.Cartesian3.normalize(rt.Cartesian3.add(M,O,G),G),E,w,T,e),A=(C=w/3)+1,b=(g=(T-2)/3)-1,F[L++]=g,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3;for(M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,a,pt),pt),O=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(k,a,ht),ht),G=rt.Cartesian3.normalize(rt.Cartesian3.add(M,O,G),G),S+=3,D=0;D<o.length;D++){var H,z,B,U=(f=o[D]).leftPositions,Y=f.rightPositions,W=ct,q=yt,J=ft;if(G=rt.Cartesian3.fromArray(l,S,G),ot.defined(U)){for(gt(_,G,E,void 0,T,e),T-=3,z=A,B=b,H=0;H<U.length/3;H++)W=rt.Cartesian3.fromArray(U,3*H,W),F[L++]=z,F[L++]=B-H-1,F[L++]=B-H,it.CorridorGeometryLibrary.addAttribute(v,W,void 0,T),q=rt.Cartesian3.fromArray(v,3*(B-H-1),q),J=rt.Cartesian3.fromArray(v,3*z,J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.subtract(q,J,E),E),void 0,T,e),T-=3;W=rt.Cartesian3.fromArray(v,3*z,W),q=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*B,q),W,q),J=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*(B-H),J),W,J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.add(q,J,E),E),w,void 0,e),w+=3}else{for(gt(_,G,E,w,void 0,e),w+=3,z=b,B=A,H=0;H<Y.length/3;H++)W=rt.Cartesian3.fromArray(Y,3*H,W),F[L++]=z,F[L++]=B+H,F[L++]=B+H+1,it.CorridorGeometryLibrary.addAttribute(v,W,w),q=rt.Cartesian3.fromArray(v,3*z,q),J=rt.Cartesian3.fromArray(v,3*(B+H),J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.subtract(q,J,E),E),w,void 0,e),w+=3;W=rt.Cartesian3.fromArray(v,3*z,W),q=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*(B+H),q),W,q),J=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(v,3*B,J),W,J),gt(_,G,E=rt.Cartesian3.normalize(rt.Cartesian3.negate(rt.Cartesian3.add(J,q,E),E),E),void 0,T,e),T-=3}for(R=i[I++],k=i[I++],R.splice(0,3),k.splice(k.length-3,3),v.set(R,w),v.set(k,T-k.length+1),a=k.length-3,S+=3,E=rt.Cartesian3.fromArray(s,S,E),H=0;H<k.length;H+=3)M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,H,pt),pt),O=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(k,a-H,ht),ht),gt(_,G=rt.Cartesian3.normalize(rt.Cartesian3.add(M,O,G),G),E,w,T,e),C=(A=w/3)-1,F[L++]=g=(b=(T-2)/3)+1,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3;w-=3,T+=3}if(gt(_,G=rt.Cartesian3.fromArray(l,l.length-3,G),E,w,T,e),h){w+=3,T-=3,x=yt,P=ft;var j=n[1];for(D=0;D<V;D++)x=rt.Cartesian3.fromArray(j,3*(p-D-1),x),P=rt.Cartesian3.fromArray(j,3*D,P),it.CorridorGeometryLibrary.addAttribute(v,x,void 0,T),it.CorridorGeometryLibrary.addAttribute(v,P,w),gt(_,G,E,w,T,e),C=(A=w/3)-1,F[L++]=g=(b=(T-2)/3)+1,F[L++]=C,F[L++]=b,F[L++]=b,F[L++]=C,F[L++]=A,w+=3,T-=3}if(d.position=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v}),e.st){var K=new Float32Array(t/3*2),Q=0;if(h){u/=3,m/=3;var X,Z=Math.PI/(p+1),$=1/(u-p+1),tt=1/(m-p+1),et=p/2;for(D=1+et;D<p+1;D++)X=dt.CesiumMath.PI_OVER_TWO+Z*D,K[Q++]=tt*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X));for(D=1;D<m-p+1;D++)K[Q++]=D*tt,K[Q++]=0;for(D=p;et<D;D--)X=dt.CesiumMath.PI_OVER_TWO-D*Z,K[Q++]=1-tt*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X));for(D=et;0<D;D--)X=dt.CesiumMath.PI_OVER_TWO-Z*D,K[Q++]=1-$*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X));for(D=u-p;0<D;D--)K[Q++]=D*$,K[Q++]=1;for(D=1;D<1+et;D++)X=dt.CesiumMath.PI_OVER_TWO+Z*D,K[Q++]=$*(1+Math.cos(X)),K[Q++]=.5*(1+Math.sin(X))}else{for($=1/((u/=3)-1),tt=1/((m/=3)-1),D=0;D<m;D++)K[Q++]=D*tt,K[Q++]=0;for(D=u;0<D;D--)K[Q++]=(D-1)*$,K[Q++]=1}d.st=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:K})}return e.normal&&(d.normal=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_.normals})),e.tangent&&(d.tangent=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_.tangents})),e.bitangent&&(d.bitangent=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:_.bitangents})),{attributes:d,indices:F}}function P(t,e,r){r[e++]=t[0],r[e++]=t[1],r[e++]=t[2];for(var a=3;a<t.length;a+=3){var i=t[a],o=t[a+1],n=t[a+2];r[e++]=i,r[e++]=o,r[e++]=n,r[e++]=i,r[e++]=o,r[e++]=n}return r[e++]=t[0],r[e++]=t[1],r[e++]=t[2],r}function p(t,e){var r=new F.VertexFormat({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),a=t.ellipsoid,i=x(it.CorridorGeometryLibrary.computePositions(t),r,a),o=t.height,n=t.extrudedHeight,s=i.attributes,l=i.indices,d=s.position.values,u=d.length,m=new Float64Array(6*u),r=new Float64Array(u);r.set(d);i=new Float64Array(4*u),i=P(d=V.PolygonPipeline.scaleToGeodeticHeight(d,o,a),0,i);i=P(r=V.PolygonPipeline.scaleToGeodeticHeight(r,n,a),2*u,i),m.set(d),m.set(r,u),m.set(i,2*u),s.position.values=m;var s=function(t,e){if(!(e.normal||e.tangent||e.bitangent||e.st))return t;var r,a=t.position.values;(e.normal||e.bitangent)&&(r=t.normal.values,l=t.bitangent.values);var i=t.position.values.length/18,o=3*i,n=2*i,s=2*o;if(e.normal||e.bitangent||e.tangent){for(var l,d=e.normal?new Float32Array(6*o):void 0,u=e.tangent?new Float32Array(6*o):void 0,m=e.bitangent?new Float32Array(6*o):void 0,y=ut,f=mt,c=yt,p=ft,h=L,g=ct,C=s,b=0;b<o;b+=3){var A=C+s,y=rt.Cartesian3.fromArray(a,b,y),f=rt.Cartesian3.fromArray(a,b+o,f),c=rt.Cartesian3.fromArray(a,(b+3)%o,c);f=rt.Cartesian3.subtract(f,y,f),c=rt.Cartesian3.subtract(c,y,c),p=rt.Cartesian3.normalize(rt.Cartesian3.cross(f,c,p),p),e.normal&&(it.CorridorGeometryLibrary.addAttribute(d,p,A),it.CorridorGeometryLibrary.addAttribute(d,p,A+3),it.CorridorGeometryLibrary.addAttribute(d,p,C),it.CorridorGeometryLibrary.addAttribute(d,p,C+3)),(e.tangent||e.bitangent)&&(g=rt.Cartesian3.fromArray(r,b,g),e.bitangent&&(it.CorridorGeometryLibrary.addAttribute(m,g,A),it.CorridorGeometryLibrary.addAttribute(m,g,A+3),it.CorridorGeometryLibrary.addAttribute(m,g,C),it.CorridorGeometryLibrary.addAttribute(m,g,C+3)),e.tangent&&(h=rt.Cartesian3.normalize(rt.Cartesian3.cross(g,p,h),h),it.CorridorGeometryLibrary.addAttribute(u,h,A),it.CorridorGeometryLibrary.addAttribute(u,h,A+3),it.CorridorGeometryLibrary.addAttribute(u,h,C),it.CorridorGeometryLibrary.addAttribute(u,h,C+3))),C+=6}if(e.normal){for(d.set(r),b=0;b<o;b+=3)d[b+o]=-r[b],d[b+o+1]=-r[b+1],d[b+o+2]=-r[b+2];t.normal.values=d}else t.normal=void 0;e.bitangent?(m.set(l),m.set(l,o),t.bitangent.values=m):t.bitangent=void 0,e.tangent&&(l=t.tangent.values,u.set(l),u.set(l,o),t.tangent.values=u)}if(e.st){var v=t.st.values,_=new Float32Array(6*n);_.set(v),_.set(v,n);for(var w=2*n,T=0;T<2;T++){for(_[w++]=v[0],_[w++]=v[1],b=2;b<n;b+=2){var G=v[b],E=v[b+1];_[w++]=G,_[w++]=E,_[w++]=G,_[w++]=E}_[w++]=v[0],_[w++]=v[1]}t.st.values=_}return t}(s,e),y=u/3;if(t.shadowVolume){for(var f=s.normal.values,u=f.length,i=new Float32Array(6*u),c=0;c<u;c++)f[c]=-f[c];i.set(f,u),i=P(f,4*u,i),s.extrudeDirection=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:i}),e.normal||(s.normal=void 0)}ot.defined(t.offsetAttribute)&&(e=new Uint8Array(6*y),e=t.offsetAttribute===E.GeometryOffsetAttribute.TOP?(e=E.arrayFill(e,1,0,y),E.arrayFill(e,1,2*y,4*y)):(t=t.offsetAttribute===E.GeometryOffsetAttribute.NONE?0:1,E.arrayFill(e,t)),s.applyOffset=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e}));var p=l.length,h=y+y,g=lt.IndexDatatype.createTypedArray(m.length/3,2*p+3*h);g.set(l);var C,b,A,v,_=p;for(c=0;c<p;c+=3){var w=l[c],T=l[c+1],G=l[c+2];g[_++]=G+y,g[_++]=T+y,g[_++]=w+y}for(c=0;c<h;c+=2)A=(C=c+h)+1,v=(b=C+h)+1,g[_++]=C,g[_++]=b,g[_++]=A,g[_++]=A,g[_++]=b,g[_++]=v;return{attributes:s,indices:g}}var h=new rt.Cartesian3,g=new rt.Cartesian3,C=new rt.Cartographic;function b(t,e,r,a,i,o){var n=rt.Cartesian3.subtract(e,t,h);rt.Cartesian3.normalize(n,n);var s=r.geodeticSurfaceNormal(t,g),l=rt.Cartesian3.cross(n,s,h);rt.Cartesian3.multiplyByScalar(l,a,l);var d=i.latitude,u=i.longitude,e=o.latitude,n=o.longitude;rt.Cartesian3.add(t,l,g),r.cartesianToCartographic(g,C);s=C.latitude,a=C.longitude,d=Math.min(d,s),u=Math.min(u,a),e=Math.max(e,s),n=Math.max(n,a);rt.Cartesian3.subtract(t,l,g),r.cartesianToCartographic(g,C),s=C.latitude,a=C.longitude,d=Math.min(d,s),u=Math.min(u,a),e=Math.max(e,s),n=Math.max(n,a),i.latitude=d,i.longitude=u,o.latitude=e,o.longitude=n}var A=new rt.Cartesian3,v=new rt.Cartesian3,_=new rt.Cartographic,w=new rt.Cartographic;function u(t,e,r,a,i){t=c(t,e);var o=y.arrayRemoveDuplicates(t,rt.Cartesian3.equalsEpsilon),n=o.length;if(n<2||r<=0)return new rt.Rectangle;var s,l,d=.5*r;_.latitude=Number.POSITIVE_INFINITY,_.longitude=Number.POSITIVE_INFINITY,w.latitude=Number.NEGATIVE_INFINITY,w.longitude=Number.NEGATIVE_INFINITY,a===f.CornerType.ROUNDED&&(m=o[0],rt.Cartesian3.subtract(m,o[1],A),rt.Cartesian3.normalize(A,A),rt.Cartesian3.multiplyByScalar(A,d,A),rt.Cartesian3.add(m,A,v),e.cartesianToCartographic(v,C),s=C.latitude,l=C.longitude,_.latitude=Math.min(_.latitude,s),_.longitude=Math.min(_.longitude,l),w.latitude=Math.max(w.latitude,s),w.longitude=Math.max(w.longitude,l));for(var u=0;u<n-1;++u)b(o[u],o[u+1],e,d,_,w);var m=o[n-1];rt.Cartesian3.subtract(m,o[n-2],A),rt.Cartesian3.normalize(A,A),rt.Cartesian3.multiplyByScalar(A,d,A),rt.Cartesian3.add(m,A,v),b(m,v,e,d,_,w),a===f.CornerType.ROUNDED&&(e.cartesianToCartographic(v,C),s=C.latitude,l=C.longitude,_.latitude=Math.min(_.latitude,s),_.longitude=Math.min(_.longitude,l),w.latitude=Math.max(w.latitude,s),w.longitude=Math.max(w.longitude,l));i=ot.defined(i)?i:new rt.Rectangle;return i.north=w.latitude,i.south=_.latitude,i.east=w.longitude,i.west=_.longitude,i}function T(t){var e=(t=ot.defaultValue(t,ot.defaultValue.EMPTY_OBJECT)).positions,r=t.width,a=ot.defaultValue(t.height,0),i=ot.defaultValue(t.extrudedHeight,a);this._positions=e,this._ellipsoid=rt.Ellipsoid.clone(ot.defaultValue(t.ellipsoid,rt.Ellipsoid.WGS84)),this._vertexFormat=F.VertexFormat.clone(ot.defaultValue(t.vertexFormat,F.VertexFormat.DEFAULT)),this._width=r,this._height=Math.max(a,i),this._extrudedHeight=Math.min(a,i),this._cornerType=ot.defaultValue(t.cornerType,f.CornerType.ROUNDED),this._granularity=ot.defaultValue(t.granularity,dt.CesiumMath.RADIANS_PER_DEGREE),this._shadowVolume=ot.defaultValue(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*rt.Cartesian3.packedLength+rt.Ellipsoid.packedLength+F.VertexFormat.packedLength+7}T.pack=function(t,e,r){r=ot.defaultValue(r,0);var a=t._positions,i=a.length;e[r++]=i;for(var o=0;o<i;++o,r+=rt.Cartesian3.packedLength)rt.Cartesian3.pack(a[o],e,r);return rt.Ellipsoid.pack(t._ellipsoid,e,r),r+=rt.Ellipsoid.packedLength,F.VertexFormat.pack(t._vertexFormat,e,r),r+=F.VertexFormat.packedLength,e[r++]=t._width,e[r++]=t._height,e[r++]=t._extrudedHeight,e[r++]=t._cornerType,e[r++]=t._granularity,e[r++]=t._shadowVolume?1:0,e[r]=ot.defaultValue(t._offsetAttribute,-1),e};var G=rt.Ellipsoid.clone(rt.Ellipsoid.UNIT_SPHERE),N=new F.VertexFormat,D={positions:void 0,ellipsoid:G,vertexFormat:N,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};return T.unpack=function(t,e,r){e=ot.defaultValue(e,0);for(var a=t[e++],i=new Array(a),o=0;o<a;++o,e+=rt.Cartesian3.packedLength)i[o]=rt.Cartesian3.unpack(t,e);var n=rt.Ellipsoid.unpack(t,e,G);e+=rt.Ellipsoid.packedLength;var s=F.VertexFormat.unpack(t,e,N);e+=F.VertexFormat.packedLength;var l=t[e++],d=t[e++],u=t[e++],m=t[e++],y=t[e++],f=1===t[e++],c=t[e];return ot.defined(r)?(r._positions=i,r._ellipsoid=rt.Ellipsoid.clone(n,r._ellipsoid),r._vertexFormat=F.VertexFormat.clone(s,r._vertexFormat),r._width=l,r._height=d,r._extrudedHeight=u,r._cornerType=m,r._granularity=y,r._shadowVolume=f,r._offsetAttribute=-1===c?void 0:c,r):(D.positions=i,D.width=l,D.height=d,D.extrudedHeight=u,D.cornerType=m,D.granularity=y,D.shadowVolume=f,D.offsetAttribute=-1===c?void 0:c,new T(D))},T.computeRectangle=function(t,e){var r=(t=ot.defaultValue(t,ot.defaultValue.EMPTY_OBJECT)).positions,a=t.width;return u(r,ot.defaultValue(t.ellipsoid,rt.Ellipsoid.WGS84),a,ot.defaultValue(t.cornerType,f.CornerType.ROUNDED),e)},T.createGeometry=function(t){var e=t._positions,r=t._width,a=t._ellipsoid,e=c(e,a),i=y.arrayRemoveDuplicates(e,rt.Cartesian3.equalsEpsilon);if(!(i.length<2||r<=0)){var o,n=t._height,s=t._extrudedHeight,l=!dt.CesiumMath.equalsEpsilon(n,s,0,dt.CesiumMath.EPSILON2),e=t._vertexFormat,r={ellipsoid:a,positions:i,width:r,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0};l?(r.height=n,r.extrudedHeight=s,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,o=p(r,e)):((o=x(it.CorridorGeometryLibrary.computePositions(r),e,a)).attributes.position.values=V.PolygonPipeline.scaleToGeodeticHeight(o.attributes.position.values,n,a),ot.defined(t._offsetAttribute)&&(d=t._offsetAttribute===E.GeometryOffsetAttribute.NONE?0:1,u=o.attributes.position.values.length,u=new Uint8Array(u/3),E.arrayFill(u,d),o.attributes.applyOffset=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})));var d=o.attributes,u=m.BoundingSphere.fromVertices(d.position.values,void 0,3);return e.position||(o.attributes.position.values=void 0),new nt.Geometry({attributes:d,indices:o.indices,primitiveType:nt.PrimitiveType.TRIANGLES,boundingSphere:u,offsetAttribute:t._offsetAttribute})}},T.createShadowVolume=function(t,e,r){var a=t._granularity,i=t._ellipsoid,e=e(a,i),r=r(a,i);return new T({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:i,granularity:a,extrudedHeight:e,height:r,vertexFormat:F.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(T.prototype,{rectangle:{get:function(){return ot.defined(this._rectangle)||(this._rectangle=u(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),function(t,e){return(t=ot.defined(e)?T.unpack(t,e):t)._ellipsoid=rt.Ellipsoid.clone(t._ellipsoid),T.createGeometry(t)}});
|