define(["exports","./arrayFill-4513d7ad","./buildModuleUrl-4e1b81e7","./Cartesian2-47311507","./Cartographic-3309dd0d","./ComponentDatatype-c140a87d","./when-b60132fc","./Check-7b2a090c","./GeometryAttribute-3a88ba31","./GeometryAttributes-252e9929","./GeometryOffsetAttribute-fbeb6f1a","./IndexDatatype-8a5eead4","./Math-119be1a3","./PrimitiveType-a54dc62f","./VertexFormat-6446fca0"],(function(t,e,a,i,r,n,o,m,s,u,l,f,c,d,C){"use strict";var p=new r.Cartesian3,y=new r.Cartesian3,_=new r.Cartesian3,v=new r.Cartesian3,h=new r.Cartesian3,A=new r.Cartesian3(1,1,1),x=Math.cos,b=Math.sin;function k(t){t=o.defaultValue(t,o.defaultValue.EMPTY_OBJECT);var e=o.defaultValue(t.radii,A),a=o.defaultValue(t.innerRadii,e),i=o.defaultValue(t.minimumClock,0),n=o.defaultValue(t.maximumClock,c.CesiumMath.TWO_PI),m=o.defaultValue(t.minimumCone,0),s=o.defaultValue(t.maximumCone,c.CesiumMath.PI),u=Math.round(o.defaultValue(t.stackPartitions,64)),l=Math.round(o.defaultValue(t.slicePartitions,64)),f=o.defaultValue(t.vertexFormat,C.VertexFormat.DEFAULT);this._radii=r.Cartesian3.clone(e),this._innerRadii=r.Cartesian3.clone(a),this._minimumClock=i,this._maximumClock=n,this._minimumCone=m,this._maximumCone=s,this._stackPartitions=u,this._slicePartitions=l,this._vertexFormat=C.VertexFormat.clone(f),this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidGeometry"}k.packedLength=2*r.Cartesian3.packedLength+C.VertexFormat.packedLength+7,k.pack=function(t,e,a){return a=o.defaultValue(a,0),r.Cartesian3.pack(t._radii,e,a),a+=r.Cartesian3.packedLength,r.Cartesian3.pack(t._innerRadii,e,a),a+=r.Cartesian3.packedLength,C.VertexFormat.pack(t._vertexFormat,e,a),a+=C.VertexFormat.packedLength,e[a++]=t._minimumClock,e[a++]=t._maximumClock,e[a++]=t._minimumCone,e[a++]=t._maximumCone,e[a++]=t._stackPartitions,e[a++]=t._slicePartitions,e[a]=o.defaultValue(t._offsetAttribute,-1),e};var w,F=new r.Cartesian3,P=new r.Cartesian3,g=new C.VertexFormat,V={radii:F,innerRadii:P,vertexFormat:g,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};k.unpack=function(t,e,a){e=o.defaultValue(e,0);var i=r.Cartesian3.unpack(t,e,F);e+=r.Cartesian3.packedLength;var n=r.Cartesian3.unpack(t,e,P);e+=r.Cartesian3.packedLength;var m=C.VertexFormat.unpack(t,e,g);e+=C.VertexFormat.packedLength;var s=t[e++],u=t[e++],l=t[e++],f=t[e++],c=t[e++],d=t[e++],p=t[e];return o.defined(a)?(a._radii=r.Cartesian3.clone(i,a._radii),a._innerRadii=r.Cartesian3.clone(n,a._innerRadii),a._vertexFormat=C.VertexFormat.clone(m,a._vertexFormat),a._minimumClock=s,a._maximumClock=u,a._minimumCone=l,a._maximumCone=f,a._stackPartitions=c,a._slicePartitions=d,a._offsetAttribute=-1===p?void 0:p,a):(V.minimumClock=s,V.maximumClock=u,V.minimumCone=l,V.maximumCone=f,V.stackPartitions=c,V.slicePartitions=d,V.offsetAttribute=-1===p?void 0:p,new k(V))},k.createGeometry=function(t){var m=t._radii;if(!(m.x<=0||m.y<=0||m.z<=0)){var C=t._innerRadii;if(!(C.x<=0||C.y<=0||C.z<=0)){var A,k,w=t._minimumClock,F=t._maximumClock,P=t._minimumCone,g=t._maximumCone,V=t._vertexFormat,M=t._slicePartitions+1,T=t._stackPartitions+1;(M=Math.round(M*Math.abs(F-w)/c.CesiumMath.TWO_PI))<2&&(M=2),(T=Math.round(T*Math.abs(g-P)/c.CesiumMath.PI))<2&&(T=2);var D=0,G=[P],L=[w];for(A=0;A0&&(R=!0,E+=M-1),g0&&A!==O-1&&0!==k&&k!==I-1&&(J[mt]=!0),mt++;for(D=0,A=1;A=kt&&A