define(["./when-54335d57","./Rectangle-82621db8","./GeometryOffsetAttribute-718fa138","./Transforms-b51fdb37","./Check-24483042","./ComponentDatatype-1a100acd","./GeometryAttribute-02fdce7a","./GeometryAttributes-caa08d6c","./GeometryInstance-4247a2b3","./GeometryPipeline-6bfd5efb","./IndexDatatype-edb2f4d6","./Math-7a8129d6","./PolygonPipeline-be37706f","./RectangleGeometryLibrary-3593e470","./VertexFormat-81ec7207","./PixelFormat-d198afce","./WebGLConstants-95ceb4e9","./RuntimeError-88a32665","./AttributeCompression-3961575e","./EncodedCartesian3-c7ed7a62","./IntersectionTests-afc06c64","./Plane-fd9e13db","./EllipsoidRhumbLine-2550c0e1"],function(mt,dt,pt,H,t,gt,yt,r,ft,ht,vt,bt,_t,z,At,e,a,n,i,o,s,l,u){"use strict";var xt=new dt.Cartesian3,wt=new dt.Cartesian3,Ct=new dt.Cartesian3,Rt=new dt.Cartesian3,_=new dt.Rectangle,B=new dt.Cartesian2,A=new H.BoundingSphere,x=new H.BoundingSphere;function Et(t,e){var a=new yt.Geometry({attributes:new r.GeometryAttributes,primitiveType:yt.PrimitiveType.TRIANGLES});return a.attributes.position=new yt.GeometryAttribute({componentDatatype:gt.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new yt.GeometryAttribute({componentDatatype:gt.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new yt.GeometryAttribute({componentDatatype:gt.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new yt.GeometryAttribute({componentDatatype:gt.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var Ft=new dt.Cartesian3,Gt=new dt.Cartesian3;function Pt(t,e){var a=t._vertexFormat,r=t._ellipsoid,n=e.height,i=e.width,o=e.northCap,s=e.southCap,l=0,u=n,c=n,m=0;o&&(c-=l=1,m+=1),s&&(u-=1,c-=1,m+=1),m+=i*c;for(var d=a.position?new Float64Array(3*m):void 0,p=a.st?new Float32Array(2*m):void 0,g=0,y=0,f=xt,h=B,v=Number.MAX_VALUE,b=Number.MAX_VALUE,_=-Number.MAX_VALUE,A=-Number.MAX_VALUE,x=l;x