define(["./when-54335d57","./Transforms-b51fdb37","./Rectangle-82621db8","./Check-24483042","./ComponentDatatype-1a100acd","./FrustumGeometry-fc7d7376","./GeometryAttribute-02fdce7a","./GeometryAttributes-caa08d6c","./Math-7a8129d6","./RuntimeError-88a32665","./PixelFormat-d198afce","./WebGLConstants-95ceb4e9","./Plane-fd9e13db","./VertexFormat-81ec7207"],function(s,h,p,e,f,g,_,k,t,r,n,a,u,i){"use strict";var m=0,o=1;function d(e){var t,r,n=e.frustum,a=e.orientation,u=e.origin,i=s.defaultValue(e._drawNearPlane,!0);n instanceof g.PerspectiveFrustum?(t=m,r=g.PerspectiveFrustum.packedLength):n instanceof g.OrthographicFrustum&&(t=o,r=g.OrthographicFrustum.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=p.Cartesian3.clone(u),this._orientation=h.Quaternion.clone(a),this._drawNearPlane=i,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+r+p.Cartesian3.packedLength+h.Quaternion.packedLength}d.pack=function(e,t,r){r=s.defaultValue(r,0);var n=e._frustumType,a=e._frustum;return(t[r++]=n)===m?(g.PerspectiveFrustum.pack(a,t,r),r+=g.PerspectiveFrustum.packedLength):(g.OrthographicFrustum.pack(a,t,r),r+=g.OrthographicFrustum.packedLength),p.Cartesian3.pack(e._origin,t,r),r+=p.Cartesian3.packedLength,h.Quaternion.pack(e._orientation,t,r),t[r+=h.Quaternion.packedLength]=e._drawNearPlane?1:0,t};var l=new g.PerspectiveFrustum,y=new g.OrthographicFrustum,v=new h.Quaternion,F=new p.Cartesian3;return d.unpack=function(e,t,r){t=s.defaultValue(t,0);var n,a=e[t++];a===m?(n=g.PerspectiveFrustum.unpack(e,t,l),t+=g.PerspectiveFrustum.packedLength):(n=g.OrthographicFrustum.unpack(e,t,y),t+=g.OrthographicFrustum.packedLength);var u=p.Cartesian3.unpack(e,t,F);t+=p.Cartesian3.packedLength;var i=h.Quaternion.unpack(e,t,v),o=1===e[t+=h.Quaternion.packedLength];if(!s.defined(r))return new d({frustum:n,origin:u,orientation:i,_drawNearPlane:o});var c=a===r._frustumType?r._frustum:void 0;return r._frustum=n.clone(c),r._frustumType=a,r._origin=p.Cartesian3.clone(u,r._origin),r._orientation=h.Quaternion.clone(i,r._orientation),r._drawNearPlane=o,r},d.createGeometry=function(e){var t=e._frustumType,r=e._frustum,n=e._origin,a=e._orientation,u=e._drawNearPlane,i=new Float64Array(24);g.FrustumGeometry._computeNearFarPlanes(n,a,t,r,i);for(var o,c,s=new k.GeometryAttributes({position:new _.GeometryAttribute({componentDatatype:f.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i})}),p=u?2:1,m=new Uint16Array(8*(p+1)),d=u?0:1;d<2;++d)c=4*d,m[o=u?8*d:0]=c,m[o+1]=c+1,m[o+2]=c+1,m[o+3]=c+2,m[o+4]=c+2,m[o+5]=c+3,m[o+6]=c+3,m[o+7]=c;for(d=0;d<2;++d)c=4*d,m[o=8*(p+d)]=c,m[o+1]=c+4,m[o+2]=c+1,m[o+3]=c+5,m[o+4]=c+2,m[o+5]=c+6,m[o+6]=c+3,m[o+7]=c+7;return new _.Geometry({attributes:s,indices:m,primitiveType:_.PrimitiveType.LINES,boundingSphere:h.BoundingSphere.fromVertices(i)})},function(e,t){return s.defined(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}});
|