/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.95 * * Copyright 2011-2022 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ define(["./defaultValue-97284df2","./Matrix2-73789715","./ArcType-de5d8777","./BoundingRectangle-2b0ebbdd","./Transforms-d3d3b2a9","./RuntimeError-4f8ec8a2","./ComponentDatatype-e7fbe225","./EllipsoidGeodesic-ed8a0e40","./EllipsoidTangentPlane-7ae496b2","./GeometryAttribute-fd1d7e90","./GeometryInstance-4bfcfe78","./GeometryOffsetAttribute-59b14f45","./GeometryPipeline-a847e31f","./IndexDatatype-65271ba3","./PolygonGeometryLibrary-0f0c78d4","./PolygonPipeline-00dc0c6e","./VertexFormat-9886cb81","./_commonjsHelpers-3aae1032-65601a27","./combine-d11b1f00","./WebGLConstants-6da700a2","./AxisAlignedBoundingBox-b1c095aa","./IntersectionTests-33ace2d6","./Plane-e916220d","./AttributeCompression-5744d52e","./EncodedCartesian3-a9a8a281","./arrayRemoveDuplicates-6f91355d","./EllipsoidRhumbLine-60f14314","./GeometryAttributes-734a3446"],(function(e,t,o,r,i,n,a,s,l,u,c,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A,v){"use strict";const E=new t.Cartographic,G=new t.Cartographic;function O(e,t,o,r){const i=r.cartesianToCartographic(e,E).height,n=r.cartesianToCartographic(t,G);n.height=i,r.cartographicToCartesian(n,t);const a=r.cartesianToCartographic(o,G);a.height=i-100,r.cartographicToCartesian(a,o)}const L=new r.BoundingRectangle,V=new t.Cartesian3,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3;let M=new t.Cartesian3,S=new t.Cartesian3,B=new t.Cartesian3;const k=new t.Cartesian2,z=new t.Cartesian2,W=new t.Cartesian3,Y=new i.Quaternion,U=new t.Matrix3,j=new t.Matrix3;function Q(o){const r=o.vertexFormat,n=o.geometry,s=o.shadowVolume,l=n.attributes.position.values,c=e.defined(n.attributes.st)?n.attributes.st.values:void 0;let p=l.length;const y=o.wall,m=o.top||y,g=o.bottom||y;if(r.st||r.normal||r.tangent||r.bitangent||s){const d=o.boundingRectangle,h=o.tangentPlane,f=o.ellipsoid,b=o.stRotation,_=o.perPositionHeight,P=k;P.x=d.x,P.y=d.y;const C=r.st?new Float32Array(p/3*2):void 0;let x;r.normal&&(x=_&&m&&!y?n.attributes.normal.values:new Float32Array(p));const w=r.tangent?new Float32Array(p):void 0,T=r.bitangent?new Float32Array(p):void 0,I=s?new Float32Array(p):void 0;let A=0,v=0,E=H,G=D,L=N,Q=!0,q=U,K=j;if(0!==b){let e=i.Quaternion.fromAxisAngle(h._plane.normal,b,Y);q=t.Matrix3.fromQuaternion(e,q),e=i.Quaternion.fromAxisAngle(h._plane.normal,-b,Y),K=t.Matrix3.fromQuaternion(e,K)}else q=t.Matrix3.clone(t.Matrix3.IDENTITY,q),K=t.Matrix3.clone(t.Matrix3.IDENTITY,K);let Z=0,J=0;m&&g&&(Z=p/2,J=p/3,p/=2);for(let i=0;i
Z.eastOverIDL-Z.westOverIDL&&(u.west=Z.westOverIDL,u.east=Z.eastOverIDL,u.east>a.CesiumMath.PI&&(u.east=u.east-a.CesiumMath.TWO_PI),u.west>a.CesiumMath.PI&&(u.west=u.west-a.CesiumMath.TWO_PI)),u}const $=new t.Cartographic;function ee(e,t,o,r){const i=e.surfaceDistance,n=Math.ceil(i*t),s=n>0?i/(n-1):Number.POSITIVE_INFINITY;let l=0;for(let t=0;t