1 |
- define(["./arrayFill-0358accf","./buildModuleUrl-3d15f25c","./Cartographic-67e73ef9","./Check-52a7d806","./ComponentDatatype-81047f82","./when-92c6cf3c","./GeometryAttribute-ef657318","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./PrimitiveType-cdfe443e","./Rectangle-bab7abf0","./Math-92c3b5f7","./Intersect-b97e930a","./Event-3390cd7d","./RuntimeError-c6a62a80","./WebGLConstants-71f10989","./Cartesian2-6033fa5d","./FeatureDetection-067cb23c","./Cartesian4-ad128b5d"],(function(t,e,n,i,r,a,o,u,f,m,s,c,p,b,y,d,x,A,l){"use strict";var O=new n.t;function h(t){var e=(t=a.u(t,a.u.EMPTY_OBJECT)).minimum,r=t.maximum;if(i.o.typeOf.object("min",e),i.o.typeOf.object("max",r),a.e(t.offsetAttribute)&&t.offsetAttribute===f.z.TOP)throw new i.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=n.t.clone(e),this._max=n.t.clone(r),this._offsetAttribute=t.offsetAttribute,this._workerName="createBoxOutlineGeometry"}h.fromDimensions=function(t){var e=(t=a.u(t,a.u.EMPTY_OBJECT)).dimensions;i.o.typeOf.object("dimensions",e),i.o.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),i.o.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),i.o.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0);var r=n.t.multiplyByScalar(e,.5,new n.t);return new h({minimum:n.t.negate(r,new n.t),maximum:r,offsetAttribute:t.offsetAttribute})},h.fromAxisAlignedBoundingBox=function(t){return i.o.typeOf.object("boundindBox",t),new h({minimum:t.minimum,maximum:t.maximum})},h.packedLength=2*n.t.packedLength+1,h.pack=function(t,e,r){return i.o.typeOf.object("value",t),i.o.defined("array",e),r=a.u(r,0),n.t.pack(t._min,e,r),n.t.pack(t._max,e,r+n.t.packedLength),e[r+2*n.t.packedLength]=a.u(t._offsetAttribute,-1),e};var _=new n.t,w=new n.t,v={minimum:_,maximum:w,offsetAttribute:void 0};return h.unpack=function(t,e,r){i.o.defined("array",t),e=a.u(e,0);var o=n.t.unpack(t,e,_),u=n.t.unpack(t,e+n.t.packedLength,w),f=t[e+2*n.t.packedLength];return a.e(r)?(r._min=n.t.clone(o,r._min),r._max=n.t.clone(u,r._max),r._offsetAttribute=-1===f?void 0:f,r):(v.offsetAttribute=-1===f?void 0:f,new h(v))},h.createGeometry=function(i){var s=i._min,c=i._max;if(!n.t.equals(s,c)){var p=new u.a,b=new Uint16Array(24),y=new Float64Array(24);y[0]=s.x,y[1]=s.y,y[2]=s.z,y[3]=c.x,y[4]=s.y,y[5]=s.z,y[6]=c.x,y[7]=c.y,y[8]=s.z,y[9]=s.x,y[10]=c.y,y[11]=s.z,y[12]=s.x,y[13]=s.y,y[14]=c.z,y[15]=c.x,y[16]=s.y,y[17]=c.z,y[18]=c.x,y[19]=c.y,y[20]=c.z,y[21]=s.x,y[22]=c.y,y[23]=c.z,p.position=new o.o({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:y}),b[0]=4,b[1]=5,b[2]=5,b[3]=6,b[4]=6,b[5]=7,b[6]=7,b[7]=4,b[8]=0,b[9]=1,b[10]=1,b[11]=2,b[12]=2,b[13]=3,b[14]=3,b[15]=0,b[16]=0,b[17]=4,b[18]=1,b[19]=5,b[20]=2,b[21]=6,b[22]=3,b[23]=7;var d=n.t.subtract(c,s,O),x=.5*n.t.magnitude(d);if(a.e(i._offsetAttribute)){var A=y.length,l=new Uint8Array(A/3),h=i._offsetAttribute===f.z.NONE?0:1;t.d(l,h),p.applyOffset=new o.o({componentDatatype:r.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:l})}return new o.I({attributes:p,indices:b,primitiveType:m._0x29ba75.LINES,boundingSphere:new e.i(n.t.ZERO,x),offsetAttribute:i._offsetAttribute})}},function(t,e){return a.e(e)&&(t=h.unpack(t,e)),h.createGeometry(t)}}));
|