/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.98.1 * * 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-65031fc5","./Matrix2-c339372d","./ArcType-84fe1b78","./BoundingRectangle-ef4c3611","./Transforms-a48d25e5","./ComponentDatatype-1b227f17","./EllipsoidGeodesic-14d277c6","./EllipsoidTangentPlane-1f1eb3e6","./GeometryAttribute-5db26912","./GeometryInstance-ee0e4b25","./GeometryOffsetAttribute-026030ef","./GeometryPipeline-7e799ed5","./IndexDatatype-53de8b23","./PolygonGeometryLibrary-fdf44447","./PolygonPipeline-d06990ae","./VertexFormat-2b3ad79f","./RuntimeError-23f4777c","./combine-96aed74b","./WebGLConstants-f5c279b9","./AxisAlignedBoundingBox-f07e0e43","./IntersectionTests-87344d12","./Plane-3d182a08","./AttributeCompression-9d180a12","./EncodedCartesian3-4e907eba","./arrayRemoveDuplicates-235b23d8","./EllipsoidRhumbLine-0df6bb40","./GeometryAttributes-f9b563d6"],(function(e,t,o,i,r,n,a,s,l,u,c,d,p,y,m,g,h,f,b,_,P,C,x,w,T,I,A){"use strict";const v=new t.Cartographic,E=new t.Cartographic;function G(e,t,o,i){const r=i.cartesianToCartographic(e,v).height,n=i.cartesianToCartographic(t,E);n.height=r,i.cartographicToCartesian(n,t);const a=i.cartesianToCartographic(o,E);a.height=r-100,i.cartographicToCartesian(a,o)}const O=new i.BoundingRectangle,L=new t.Cartesian3,V=new t.Cartesian3,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3;let R=new t.Cartesian3,M=new t.Cartesian3,S=new t.Cartesian3;const B=new t.Cartesian2,k=new t.Cartesian2,z=new t.Cartesian3,W=new r.Quaternion,Y=new t.Matrix3,U=new t.Matrix3;function j(o){const i=o.vertexFormat,a=o.geometry,s=o.shadowVolume,u=a.attributes.position.values,d=e.defined(a.attributes.st)?a.attributes.st.values:void 0;let p=u.length;const y=o.wall,m=o.top||y,g=o.bottom||y;if(i.st||i.normal||i.tangent||i.bitangent||s){const c=o.boundingRectangle,h=o.tangentPlane,f=o.ellipsoid,b=o.stRotation,_=o.perPositionHeight,P=B;P.x=c.x,P.y=c.y;const C=i.st?new Float32Array(p/3*2):void 0;let x;i.normal&&(x=_&&m&&!y?a.attributes.normal.values:new Float32Array(p));const w=i.tangent?new Float32Array(p):void 0,T=i.bitangent?new Float32Array(p):void 0,I=s?new Float32Array(p):void 0;let A=0,v=0,E=V,O=H,j=D,Q=!0,q=Y,K=U;if(0!==b){let e=r.Quaternion.fromAxisAngle(h._plane.normal,b,W);q=t.Matrix3.fromQuaternion(e,q),e=r.Quaternion.fromAxisAngle(h._plane.normal,-b,W),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 r=0;rK.eastOverIDL-K.westOverIDL&&(u.west=K.westOverIDL,u.east=K.eastOverIDL,u.east>n.CesiumMath.PI&&(u.east=u.east-n.CesiumMath.TWO_PI),u.west>n.CesiumMath.PI&&(u.west=u.west-n.CesiumMath.TWO_PI)),u}const X=new t.Cartographic;function $(e,t,o,i){const r=e.surfaceDistance,a=Math.ceil(r*t),s=a>0?r/(a-1):Number.POSITIVE_INFINITY;let l=0;for(let t=0;t=0?r:r+n.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,u),i.eastOverIDL=Math.max(i.eastOverIDL,u)}}const ee=[];function te(t,o,i,r,n,a,l,c,d,g){const h={walls:[]};let f;if(l||c){const n=y.PolygonGeometryLibrary.createGeometryFromPositions(t,o,i,r,a,d,g),s=n.attributes.position.values,m=n.indices;let b,_;if(l&&c){const t=s.concat(s);b=t.length/3,_=p.IndexDatatype.createTypedArray(b,2*m.length),_.set(m);const o=m.length,r=b/2;for(f=0;f