define(["./when-7b580518","./Cartesian2-40b13f31","./GeometryOffsetAttribute-964ec9ef","./Transforms-a7d32f6c","./Check-3917d765","./ComponentDatatype-6c2e43c1","./GeometryAttribute-8f00b923","./GeometryAttributes-fbd9a3fb","./GeometryInstance-e5765c46","./GeometryPipeline-06778f23","./IndexDatatype-b42089ce","./Math-87254c13","./PolygonPipeline-4cefc824","./RectangleGeometryLibrary-c2a9b2ca","./VertexFormat-8d463a4f","./combine-83aa7971","./RuntimeError-fad4d3c6","./WebGLConstants-4e26b85a","./AttributeCompression-56959beb","./EncodedCartesian3-942c4568","./IntersectionTests-2dece3b4","./Plane-69fa3eea","./EllipsoidRhumbLine-6baec512"],function(Q,W,J,S,t,j,Z,r,K,$,tt,et,at,I,rt,e,a,n,i,o,s,l,u){"use strict";var nt=new W.Cartesian3,it=new W.Cartesian3,ot=new W.Cartesian3,st=new W.Cartesian3,p=new W.Rectangle,k=new W.Cartesian2,d=new S.BoundingSphere,g=new S.BoundingSphere;function lt(t,e){var a=new Z.Geometry({attributes:new r.GeometryAttributes,primitiveType:Z.PrimitiveType.TRIANGLES});return a.attributes.position=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(a.attributes.normal=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(a.attributes.tangent=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(a.attributes.bitangent=new Z.GeometryAttribute({componentDatatype:j.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),a}var ut=new W.Cartesian3,ct=new W.Cartesian3;function mt(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,t=0;o&&(--c,t+=l=1),s&&(--u,--c,t+=1),t+=i*c;for(var m=a.position?new Float64Array(3*t):void 0,p=a.st?new Float32Array(2*t):void 0,d=0,g=0,y=nt,f=k,h=Number.MAX_VALUE,b=Number.MAX_VALUE,v=-Number.MAX_VALUE,_=-Number.MAX_VALUE,A=l;A