define(["exports","./Cartesian2-bd414876","./Cartesian3-e0307675","./Check-741c5f3c","./defaultValue-81eec7ed","./Matrix2-dc0c61cc","./Matrix4-4c545f70","./WebGLConstants-508b9636","./Transforms-5b829630","./Rectangle-cf3e0e3e"],(function(t,e,a,n,r,i,o,s,u,c){"use strict";var I=Object.freeze({NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3});const N={POINTS:s.WebGLConstants.POINTS,LINES:s.WebGLConstants.LINES,LINE_LOOP:s.WebGLConstants.LINE_LOOP,LINE_STRIP:s.WebGLConstants.LINE_STRIP,TRIANGLES:s.WebGLConstants.TRIANGLES,TRIANGLE_STRIP:s.WebGLConstants.TRIANGLE_STRIP,TRIANGLE_FAN:s.WebGLConstants.TRIANGLE_FAN,validate:function(t){return t===N.POINTS||t===N.LINES||t===N.LINE_LOOP||t===N.LINE_STRIP||t===N.TRIANGLES||t===N.TRIANGLE_STRIP||t===N.TRIANGLE_FAN}};var l=Object.freeze(N);function T(t){t=r.defaultValue(t,r.defaultValue.EMPTY_OBJECT),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=r.defaultValue(t.primitiveType,l.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=r.defaultValue(t.geometryType,I.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}T.computeNumberOfVertices=function(t){let e=-1;for(const a in t.attributes)if(t.attributes.hasOwnProperty(a)&&r.defined(t.attributes[a])&&r.defined(t.attributes[a].values)){const n=t.attributes[a];e=n.values.length/n.componentsPerAttribute}return e};const f=new e.Cartographic,p=new a.Cartesian3,C=new o.Matrix4,b=[new e.Cartographic,new e.Cartographic,new e.Cartographic],m=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],y=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],E=new a.Cartesian3,L=new u.Quaternion,h=new o.Matrix4,d=new i.Matrix2;T._textureCoordinateRotationPoints=function(t,n,r,s){let I;const N=c.Rectangle.center(s,f),l=e.Cartographic.toCartesian(N,r,p),T=u.Transforms.eastNorthUpToFixedFrame(l,r,C),x=o.Matrix4.inverse(T,C),A=m,P=b;P[0].longitude=s.west,P[0].latitude=s.south,P[1].longitude=s.west,P[1].latitude=s.north,P[2].longitude=s.east,P[2].latitude=s.south;let S=E;for(I=0;I<3;I++)e.Cartographic.toCartesian(P[I],r,S),S=o.Matrix4.multiplyByPointAsVector(x,S,S),A[I].x=S.x,A[I].y=S.y;const G=u.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,-n,L),R=o.Matrix3.fromQuaternion(G,h),g=t.length;let w=Number.POSITIVE_INFINITY,O=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,V=Number.NEGATIVE_INFINITY;for(I=0;I