You cannot 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
16 KiB
JavaScript

define(["./GeometryOffsetAttribute-def3b741","./arrayRemoveDuplicates-0f62a181","./Transforms-a73b3b3b","./Cartesian2-8417ca3d","./Check-d18af7c4","./ComponentDatatype-9204e9f6","./PolylineVolumeGeometryLibrary-66348bfe","./CorridorGeometryLibrary-703fe5ba","./when-208fe5b0","./GeometryAttribute-04a19cfe","./GeometryAttributes-b0b294d8","./IndexDatatype-d47ad6f6","./Math-4e53b694","./PolygonPipeline-4d0ff0fe","./VertexFormat-e8cbf5b3","./RuntimeError-7f634f5d","./WebGLConstants-76bb35d1","./EllipsoidTangentPlane-9123a53b","./IntersectionTests-7d224a2f","./Plane-4aa8974d","./PolylinePipeline-28f5feec","./EllipsoidGeodesic-8015072b","./EllipsoidRhumbLine-28521929"],function(E,f,m,rt,t,at,y,it,ot,nt,st,lt,dt,V,F,e,r,a,i,o,n,s,l){"use strict";var ut=new rt.Cartesian3,mt=new rt.Cartesian3,ft=new rt.Cartesian3,yt=new rt.Cartesian3,L=new rt.Cartesian3,pt=new rt.Cartesian3,ct=new rt.Cartesian3,ht=new rt.Cartesian3;function p(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,ct),ct);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 P(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,f=0;for(D=0;D<i.length;D+=2)u+=a=i[D].length-3,f+=2*a,m+=i[D+1].length-3;for(u+=3,m+=3,D=0;D<o.length;D++){var y=o[D],p=o[D].leftPositions;ot.defined(p)?u+=a=p.length:m+=a=o[D].rightPositions.length,f+=a}var c,h=ot.defined(n);h&&(u+=c=n[0].length-3,m+=c,f+=6*(c/=3));var g,b,C,v,t=u+m,A=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=c/2,F=lt.IndexDatatype.createTypedArray(t/3,f),L=0;if(h)for(var P=ft,x=yt,N=n[0],G=rt.Cartesian3.fromArray(l,0,G),E=rt.Cartesian3.fromArray(s,0,E),D=0;D<V;D++)P=rt.Cartesian3.fromArray(N,3*(V-1-D),P),x=rt.Cartesian3.fromArray(N,3*(V+D),x),it.CorridorGeometryLibrary.addAttribute(A,x,w),it.CorridorGeometryLibrary.addAttribute(A,P,void 0,T),gt(_,G,E,w,T,e),v=(b=w/3)+1,C=(g=(T-2)/3)-1,F[L++]=g,F[L++]=b,F[L++]=C,F[L++]=C,F[L++]=b,F[L++]=v,w+=3,T-=3;var M,O,I=0,S=0,R=i[I++],k=i[I++];for(A.set(R,w),A.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,ct),ct),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),v=(b=w/3)+1,C=(g=(T-2)/3)-1,F[L++]=g,F[L++]=b,F[L++]=C,F[L++]=C,F[L++]=b,F[L++]=v,w+=3,T-=3;for(M=r.geodeticSurfaceNormal(rt.Cartesian3.fromArray(R,a,ct),ct),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,U,B=(y=o[D]).leftPositions,Y=y.rightPositions,W=pt,q=ft,J=yt;if(G=rt.Cartesian3.fromArray(l,S,G),ot.defined(B)){for(gt(_,G,E,void 0,T,e),T-=3,z=v,U=C,H=0;H<B.length/3;H++)W=rt.Cartesian3.fromArray(B,3*H,W),F[L++]=z,F[L++]=U-H-1,F[L++]=U-H,it.CorridorGeometryLibrary.addAttribute(A,W,void 0,T),q=rt.Cartesian3.fromArray(A,3*(U-H-1),q),J=rt.Cartesian3.fromArray(A,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(A,3*z,W),q=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(A,3*U,q),W,q),J=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(A,3*(U-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=C,U=v,H=0;H<Y.length/3;H++)W=rt.Cartesian3.fromArray(Y,3*H,W),F[L++]=z,F[L++]=U+H,F[L++]=U+H+1,it.CorridorGeometryLibrary.addAttribute(A,W,w),q=rt.Cartesian3.fromArray(A,3*z,q),J=rt.Cartesian3.fromArray(A,3*(U+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(A,3*z,W),q=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(A,3*(U+H),q),W,q),J=rt.Cartesian3.subtract(rt.Cartesian3.fromArray(A,3*U,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),A.set(R,w),A.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,ct),ct),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),b=(v=w/3)-1,F[L++]=g=(C=(T-2)/3)+1,F[L++]=b,F[L++]=C,F[L++]=C,F[L++]=b,F[L++]=v,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,P=ft,x=yt;var j=n[1];for(D=0;D<V;D++)P=rt.Cartesian3.fromArray(j,3*(c-D-1),P),x=rt.Cartesian3.fromArray(j,3*D,x),it.CorridorGeometryLibrary.addAttribute(A,P,void 0,T),it.CorridorGeometryLibrary.addAttribute(A,x,w),gt(_,G,E,w,T,e),b=(v=w/3)-1,F[L++]=g=(C=(T-2)/3)+1,F[L++]=b,F[L++]=C,F[L++]=C,F[L++]=b,F[L++]=v,w+=3,T-=3}if(d.position=new nt.GeometryAttribute({componentDatatype:at.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:A}),e.st){var K=new Float32Array(t/3*2),Q=0;if(h){u/=3,m/=3;var X,Z=Math.PI/(c+1),$=1/(u-c+1),tt=1/(m-c+1),et=c/2;for(D=1+et;D<c+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-c+1;D++)K[Q++]=D*tt,K[Q++]=0;for(D=c;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-c;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 x(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 c(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=P(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=x(d=V.PolygonPipeline.scaleToGeodeticHeight(d,o,a),0,i);i=x(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,f=ut,y=mt,p=ft,c=yt,h=L,g=pt,b=s,C=0;C<o;C+=3){var v=b+s,f=rt.Cartesian3.fromArray(a,C,f),y=rt.Cartesian3.fromArray(a,C+o,y),p=rt.Cartesian3.fromArray(a,(C+3)%o,p);y=rt.Cartesian3.subtract(y,f,y),p=rt.Cartesian3.subtract(p,f,p),c=rt.Cartesian3.normalize(rt.Cartesian3.cross(y,p,c),c),e.normal&&(it.CorridorGeometryLibrary.addAttribute(d,c,v),it.CorridorGeometryLibrary.addAttribute(d,c,v+3),it.CorridorGeometryLibrary.addAttribute(d,c,b),it.CorridorGeometryLibrary.addAttribute(d,c,b+3)),(e.tangent||e.bitangent)&&(g=rt.Cartesian3.fromArray(r,C,g),e.bitangent&&(it.CorridorGeometryLibrary.addAttribute(m,g,v),it.CorridorGeometryLibrary.addAttribute(m,g,v+3),it.CorridorGeometryLibrary.addAttribute(m,g,b),it.CorridorGeometryLibrary.addAttribute(m,g,b+3)),e.tangent&&(h=rt.Cartesian3.normalize(rt.Cartesian3.cross(g,c,h),h),it.CorridorGeometryLibrary.addAttribute(u,h,v),it.CorridorGeometryLibrary.addAttribute(u,h,v+3),it.CorridorGeometryLibrary.addAttribute(u,h,b),it.CorridorGeometryLibrary.addAttribute(u,h,b+3))),b+=6}if(e.normal){for(d.set(r),C=0;C<o;C+=3)d[C+o]=-r[C],d[C+o+1]=-r[C+1],d[C+o+2]=-r[C+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 A=t.st.values,_=new Float32Array(6*n);_.set(A),_.set(A,n);for(var w=2*n,T=0;T<2;T++){for(_[w++]=A[0],_[w++]=A[1],C=2;C<n;C+=2){var G=A[C],E=A[C+1];_[w++]=G,_[w++]=E,_[w++]=G,_[w++]=E}_[w++]=A[0],_[w++]=A[1]}t.st.values=_}return t}(s,e),f=u/3;if(t.shadowVolume){for(var y=s.normal.values,u=y.length,i=new Float32Array(6*u),p=0;p<u;p++)y[p]=-y[p];i.set(y,u),i=x(y,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*f),e=t.offsetAttribute===E.GeometryOffsetAttribute.TOP?(e=E.arrayFill(e,1,0,f),E.arrayFill(e,1,2*f,4*f)):(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 c=l.length,h=f+f,g=lt.IndexDatatype.createTypedArray(m.length/3,2*c+3*h);g.set(l);var b,C,v,A,_=c;for(p=0;p<c;p+=3){var w=l[p],T=l[p+1],G=l[p+2];g[_++]=G+f,g[_++]=T+f,g[_++]=w+f}for(p=0;p<h;p+=2)v=(b=p+h)+1,A=(C=b+h)+1,g[_++]=b,g[_++]=C,g[_++]=v,g[_++]=v,g[_++]=C,g[_++]=A;return{attributes:s,indices:g}}var h=new rt.Cartesian3,g=new rt.Cartesian3,b=new rt.Cartographic;function C(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,b);s=b.latitude,a=b.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,b),s=b.latitude,a=b.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 v=new rt.Cartesian3,A=new rt.Cartesian3,_=new rt.Cartographic,w=new rt.Cartographic;function d(t,e,r,a,i){t=p(t,e);var o=f.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===y.CornerType.ROUNDED&&(m=o[0],rt.Cartesian3.subtract(m,o[1],v),rt.Cartesian3.normalize(v,v),rt.Cartesian3.multiplyByScalar(v,d,v),rt.Cartesian3.add(m,v,A),e.cartesianToCartographic(A,b),s=b.latitude,l=b.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)C(o[u],o[u+1],e,d,_,w);var m=o[n-1];rt.Cartesian3.subtract(m,o[n-2],v),rt.Cartesian3.normalize(v,v),rt.Cartesian3.multiplyByScalar(v,d,v),rt.Cartesian3.add(m,v,A),C(m,A,e,d,_,w),a===y.CornerType.ROUNDED&&(e.cartesianToCartographic(A,b),s=b.latitude,l=b.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,y.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++],f=t[e++],y=1===t[e++],p=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=f,r._shadowVolume=y,r._offsetAttribute=-1===p?void 0:p,r):(D.positions=i,D.width=l,D.height=d,D.extrudedHeight=u,D.cornerType=m,D.granularity=f,D.shadowVolume=y,D.offsetAttribute=-1===p?void 0:p,new T(D))},T.computeRectangle=function(t,e){var r=(t=ot.defaultValue(t,ot.defaultValue.EMPTY_OBJECT)).positions,a=t.width;return d(r,ot.defaultValue(t.ellipsoid,rt.Ellipsoid.WGS84),a,ot.defaultValue(t.cornerType,y.CornerType.ROUNDED),e)},T.createGeometry=function(t){var e=t._positions,r=t._width,a=t._ellipsoid,e=p(e,a),i=f.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=c(r,e)):((o=P(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=d(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)}});