define(["./when-77f4e3be","./Check-d71f548f","./Math-b81aa1f1","./Cartesian2-69a87134","./Transforms-03dbcaf7","./RuntimeError-34dd6124","./WebGLConstants-3e40d443","./ComponentDatatype-af4852df","./GeometryAttribute-d15db730","./GeometryAttributes-0175f743","./AttributeCompression-b43e055a","./GeometryPipeline-8501d77d","./EncodedCartesian3-ab4754c9","./IndexDatatype-41885adf","./IntersectionTests-ad3a0195","./Plane-a18bfa39","./GeometryOffsetAttribute-1d161b37","./VertexFormat-bbe2af43","./GeometryInstance-0fd1b866","./EllipsoidRhumbLine-28fc0dda","./PolygonPipeline-9a882b7c","./RectangleGeometryLibrary-19a77c19"],function(mt,t,dt,pt,H,e,a,gt,yt,r,n,ft,i,ht,o,s,vt,bt,_t,l,At,z){"use strict";var xt=new pt.Cartesian3,wt=new pt.Cartesian3,Ct=new pt.Cartesian3,Rt=new pt.Cartesian3,_=new pt.Rectangle,B=new pt.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 pt.Cartesian3,Gt=new pt.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