define(["./when-4bbc8319","./Matrix2-ccd5b911","./GeometryOffsetAttribute-1772960d","./Transforms-d5c6ad6e","./RuntimeError-346a3079","./ComponentDatatype-93750d1a","./GeometryAttribute-c30799b8","./GeometryAttributes-7827a6c2","./GeometryInstance-5f4fe82b","./GeometryPipeline-548e76d2","./IndexDatatype-b7d979a6","./PolygonPipeline-83fb62b0","./RectangleGeometryLibrary-48d34d36","./VertexFormat-71718faa","./combine-83860057","./WebGLConstants-1c8239cc","./AttributeCompression-1f045b73","./EncodedCartesian3-08b8d980","./IntersectionTests-4d6f5c54","./Plane-18bb00f8","./EllipsoidRhumbLine-aa9e6266"],function(Q,W,J,p,t,j,Z,r,K,$,tt,et,S,at,e,a,n,i,o,s,l){"use strict";var rt=new W.Cartesian3,nt=new W.Cartesian3,it=new W.Cartesian3,ot=new W.Cartesian3,d=new W.Rectangle,I=new W.Cartesian2,g=new p.BoundingSphere,y=new p.BoundingSphere;function st(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 lt=new W.Cartesian3,ut=new W.Cartesian3;function ct(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=rt,f=I,h=Number.MAX_VALUE,b=Number.MAX_VALUE,v=-Number.MAX_VALUE,_=-Number.MAX_VALUE,A=l;A