define(["./GeometryOffsetAttribute-ff1e192c","./Transforms-75891ac8","./Matrix2-2fec35ad","./RuntimeError-ffe03243","./ComponentDatatype-17b06483","./when-229515d6","./GeometryAttribute-c0946387","./GeometryAttributes-b253752a","./combine-8ce3f24b","./PixelFormat-daf99ebc","./WebGLConstants-4e26b85a"],(function(e,t,a,n,i,r,u,m,o,s,f){"use strict";var c=new a.Cartesian3;function p(e){var t=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).minimum,n=e.maximum;this._min=a.Cartesian3.clone(t),this._max=a.Cartesian3.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}p.fromDimensions=function(e){var t=(e=r.defaultValue(e,r.defaultValue.EMPTY_OBJECT)).dimensions,n=a.Cartesian3.multiplyByScalar(t,.5,new a.Cartesian3);return new p({minimum:a.Cartesian3.negate(n,new a.Cartesian3),maximum:n,offsetAttribute:e.offsetAttribute})},p.fromAxisAlignedBoundingBox=function(e){return new p({minimum:e.minimum,maximum:e.maximum})},p.packedLength=2*a.Cartesian3.packedLength+1,p.pack=function(e,t,n){return n=r.defaultValue(n,0),a.Cartesian3.pack(e._min,t,n),a.Cartesian3.pack(e._max,t,n+a.Cartesian3.packedLength),t[n+2*a.Cartesian3.packedLength]=r.defaultValue(e._offsetAttribute,-1),t};var d=new a.Cartesian3,y=new a.Cartesian3,l={minimum:d,maximum:y,offsetAttribute:void 0};return p.unpack=function(e,t,n){t=r.defaultValue(t,0);var i=a.Cartesian3.unpack(e,t,d),u=a.Cartesian3.unpack(e,t+a.Cartesian3.packedLength,y),m=e[t+2*a.Cartesian3.packedLength];return r.defined(n)?(n._min=a.Cartesian3.clone(i,n._min),n._max=a.Cartesian3.clone(u,n._max),n._offsetAttribute=-1===m?void 0:m,n):(l.offsetAttribute=-1===m?void 0:m,new p(l))},p.createGeometry=function(n){var o=n._min,s=n._max;if(!a.Cartesian3.equals(o,s)){var f=new m.GeometryAttributes,p=new Uint16Array(24),d=new Float64Array(24);d[0]=o.x,d[1]=o.y,d[2]=o.z,d[3]=s.x,d[4]=o.y,d[5]=o.z,d[6]=s.x,d[7]=s.y,d[8]=o.z,d[9]=o.x,d[10]=s.y,d[11]=o.z,d[12]=o.x,d[13]=o.y,d[14]=s.z,d[15]=s.x,d[16]=o.y,d[17]=s.z,d[18]=s.x,d[19]=s.y,d[20]=s.z,d[21]=o.x,d[22]=s.y,d[23]=s.z,f.position=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:d}),p[0]=4,p[1]=5,p[2]=5,p[3]=6,p[4]=6,p[5]=7,p[6]=7,p[7]=4,p[8]=0,p[9]=1,p[10]=1,p[11]=2,p[12]=2,p[13]=3,p[14]=3,p[15]=0,p[16]=0,p[17]=4,p[18]=1,p[19]=5,p[20]=2,p[21]=6,p[22]=3,p[23]=7;var y=a.Cartesian3.subtract(s,o,c),l=.5*a.Cartesian3.magnitude(y);if(r.defined(n._offsetAttribute)){var b=d.length,C=new Uint8Array(b/3),A=n._offsetAttribute===e.GeometryOffsetAttribute.NONE?0:1;e.arrayFill(C,A),f.applyOffset=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:C})}return new u.Geometry({attributes:f,indices:p,primitiveType:u.PrimitiveType.LINES,boundingSphere:new t.BoundingSphere(a.Cartesian3.ZERO,l),offsetAttribute:n._offsetAttribute})}},function(e,t){return r.defined(t)&&(e=p.unpack(e,t)),p.createGeometry(e)}}));
|