define(["exports","./arrayFill-4513d7ad","./BoundingSphere-561b54d0","./Cartesian2-47311507","./Cartographic-3309dd0d","./ComponentDatatype-c140a87d","./CylinderGeometryLibrary-aa453214","./when-b60132fc","./Check-7b2a090c","./GeometryAttribute-3a42bbdc","./GeometryAttributes-252e9929","./GeometryOffsetAttribute-fbeb6f1a","./IndexDatatype-8a5eead4","./Math-119be1a3","./PrimitiveType-39acab88","./VertexFormat-6446fca0"],(function(t,e,a,r,n,o,i,s,m,u,d,p,y,l,f,b){"use strict";var c=new r.Cartesian2,v=new n.Cartesian3,A=new n.Cartesian3,g=new n.Cartesian3,h=new n.Cartesian3;function x(t){var e=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=s.defaultValue(t.vertexFormat,b.VertexFormat.DEFAULT),o=s.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=b.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}x.packedLength=b.VertexFormat.packedLength+5,x.pack=function(t,e,a){return a=s.defaultValue(a,0),b.VertexFormat.pack(t._vertexFormat,e,a),a+=b.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=s.defaultValue(t._offsetAttribute,-1),e};var _,C=new b.VertexFormat,F={vertexFormat:C,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};x.unpack=function(t,e,a){e=s.defaultValue(e,0);var r=b.VertexFormat.unpack(t,e,C);e+=b.VertexFormat.packedLength;var n=t[e++],o=t[e++],i=t[e++],m=t[e++],u=t[e];return s.defined(a)?(a._vertexFormat=b.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=m,a._offsetAttribute=-1===u?void 0:u,a):(F.length=n,F.topRadius=o,F.bottomRadius=i,F.slices=m,F.offsetAttribute=-1===u?void 0:u,new x(F))},x.createGeometry=function(t){var m=t._length,b=t._topRadius,x=t._bottomRadius,_=t._vertexFormat,C=t._slices;if(!(m<=0||b<0||x<0||0===b&&0===x)){var F,w=C+C,G=C+w,D=w+w,R=i.CylinderGeometryLibrary.computePositions(m,b,x,C,!0),V=_.st?new Float32Array(2*D):void 0,T=_.normal?new Float32Array(3*D):void 0,O=_.tangent?new Float32Array(3*D):void 0,L=_.bitangent?new Float32Array(3*D):void 0,P=_.normal||_.tangent||_.bitangent;if(P){var k=_.tangent||_.bitangent,M=0,z=0,E=0,N=Math.atan2(x-b,m),I=v;I.z=Math.sin(N);var S=Math.cos(N),U=g,B=A;for(F=0;F