define(["./when-54c2dc71","./Check-6c0211bc","./Math-fc8cecf5","./Cartesian2-bddc1162","./Transforms-ec27f304","./RuntimeError-2109023a","./WebGLConstants-76bb35d1","./ComponentDatatype-6d99a1ee","./GeometryAttribute-44fb48f1","./GeometryAttributes-4fcfcf40","./AttributeCompression-9fc99391","./GeometryPipeline-b49b2e59","./EncodedCartesian3-e9c71cf0","./IndexDatatype-53503fee","./IntersectionTests-2626c9e9","./Plane-231f1723","./GeometryOffsetAttribute-7350d9af","./VertexFormat-7572c785","./GeometryInstance-11f9a3bd","./arrayRemoveDuplicates-ebc732b0","./BoundingRectangle-8de79d83","./EllipsoidTangentPlane-ed172748","./ArcType-dc1c5aee","./EllipsoidRhumbLine-c704bf4c","./PolygonPipeline-ff364b47","./PolygonGeometryLibrary-29b9a52e","./EllipsoidGeodesic-30fae80b"],function(Y,e,U,j,Q,t,r,q,K,o,a,D,i,L,n,s,Z,b,N,l,u,H,p,c,R,M,y){"use strict";var J=new j.Cartographic,X=new j.Cartographic;var S=new u.BoundingRectangle,$=new j.Cartesian3,ee=new j.Cartesian3,te=new j.Cartesian3,re=new j.Cartesian3,oe=new j.Cartesian3,ae=new j.Cartesian3,ie=new j.Cartesian3,ne=new j.Cartesian3,se=new j.Cartesian3,le=new j.Cartesian2,ue=new j.Cartesian2,ce=new j.Cartesian3,pe=new Q.Quaternion,ye=new Q.Matrix3,me=new Q.Matrix3;function B(e){var t,r,o,a=e.vertexFormat,i=e.geometry,n=e.shadowVolume,s=i.attributes.position.values,l=s.length,u=e.wall,c=e.top||u,p=e.bottom||u;if(a.st||a.normal||a.tangent||a.bitangent||n){var y=e.boundingRectangle,m=e.tangentPlane,g=e.ellipsoid,d=e.stRotation,h=e.perPositionHeight,f=le;f.x=y.x,f.y=y.y;var b,v=a.st?new Float32Array(l/3*2):void 0;a.normal&&(b=h&&c&&!u?i.attributes.normal.values:new Float32Array(l));var _,P=a.tangent?new Float32Array(l):void 0,C=a.bitangent?new Float32Array(l):void 0,w=n?new Float32Array(l):void 0,x=0,T=0,I=ee,A=te,E=re,G=!0,O=ye,V=me;V=0!==d?(_=Q.Quaternion.fromAxisAngle(m._plane.normal,d,pe),O=Q.Matrix3.fromQuaternion(_,O),_=Q.Quaternion.fromAxisAngle(m._plane.normal,-d,pe),Q.Matrix3.fromQuaternion(_,V)):(O=Q.Matrix3.clone(Q.Matrix3.IDENTITY,O),Q.Matrix3.clone(Q.Matrix3.IDENTITY,V));var F=0,D=0;c&&p&&(F=l/2,D=l/3,l/=2);for(var L=0;Ld.eastOverIDL-d.westOverIDL&&(a.west=d.westOverIDL,a.east=d.eastOverIDL,a.east>U.CesiumMath.PI&&(a.east=a.east-U.CesiumMath.TWO_PI),a.west>U.CesiumMath.PI&&(a.west=a.west-U.CesiumMath.TWO_PI)),a}var v=new j.Cartographic;function _(e,t,r,o){for(var a=e.surfaceDistance,i=Math.ceil(a*t),n=0