/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.99 * * 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-135942ca","./Matrix3-edb29a7e","./ArcType-89067bf8","./BoundingRectangle-9f46b506","./Transforms-3ea76111","./Matrix2-7a2bab7e","./ComponentDatatype-e86a9f87","./EllipsoidGeodesic-048356f7","./EllipsoidTangentPlane-46a19c1a","./GeometryAttribute-dacddb3f","./GeometryInstance-1aacc2fb","./GeometryOffsetAttribute-d3a42805","./GeometryPipeline-7cd8f832","./IndexDatatype-3a8ea78f","./Math-a304e2d6","./PolygonGeometryLibrary-20986fdf","./PolygonPipeline-92a50571","./VertexFormat-7d5b4d7e","./combine-462d91dd","./RuntimeError-f0dada00","./WebGLConstants-fcb70ee3","./AxisAlignedBoundingBox-5f8053d3","./IntersectionTests-f3382f21","./Plane-5bea24eb","./AttributeCompression-5b18be52","./EncodedCartesian3-bf4e5ec3","./arrayRemoveDuplicates-d35f503f","./EllipsoidRhumbLine-5519960c","./GeometryAttributes-899f8bd0"],(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,v,E){"use strict";const G=new t.Cartographic,O=new t.Cartographic;function L(e,t,o,i){const r=i.cartesianToCartographic(e,G).height,n=i.cartesianToCartographic(t,O);n.height=r,i.cartographicToCartesian(n,t);const a=i.cartesianToCartographic(o,O);a.height=r-100,i.cartographicToCartesian(a,o)}const V=new i.BoundingRectangle,H=new t.Cartesian3,D=new t.Cartesian3,N=new t.Cartesian3,F=new t.Cartesian3,R=new t.Cartesian3,M=new t.Cartesian3;let S=new t.Cartesian3,B=new t.Cartesian3,k=new t.Cartesian3;const z=new n.Cartesian2,W=new n.Cartesian2,Y=new t.Cartesian3,U=new r.Quaternion,j=new t.Matrix3,Q=new t.Matrix3;function q(o){const i=o.vertexFormat,s=o.geometry,l=o.shadowVolume,c=s.attributes.position.values,p=e.defined(s.attributes.st)?s.attributes.st.values:void 0;let y=c.length;const g=o.wall,h=o.top||g,f=o.bottom||g;if(i.st||i.normal||i.tangent||i.bitangent||l){const d=o.boundingRectangle,b=o.tangentPlane,_=o.ellipsoid,P=o.stRotation,C=o.perPositionHeight,x=z;x.x=d.x,x.y=d.y;const w=i.st?new Float32Array(y/3*2):void 0;let T;i.normal&&(T=C&&h&&!g?s.attributes.normal.values:new Float32Array(y));const I=i.tangent?new Float32Array(y):void 0,A=i.bitangent?new Float32Array(y):void 0,v=l?new Float32Array(y):void 0;let E=0,G=0,O=D,V=N,q=F,K=!0,Z=j,J=Q;if(0!==P){let e=r.Quaternion.fromAxisAngle(b._plane.normal,P,U);Z=t.Matrix3.fromQuaternion(e,Z),e=r.Quaternion.fromAxisAngle(b._plane.normal,-P,U),J=t.Matrix3.fromQuaternion(e,J)}else Z=t.Matrix3.clone(t.Matrix3.IDENTITY,Z),J=t.Matrix3.clone(t.Matrix3.IDENTITY,J);let X=0,$=0;h&&f&&(X=y/2,$=y/3,y/=2);for(let r=0;rJ.eastOverIDL-J.westOverIDL&&(l.west=J.westOverIDL,l.east=J.eastOverIDL,l.east>m.CesiumMath.PI&&(l.east=l.east-m.CesiumMath.TWO_PI),l.west>m.CesiumMath.PI&&(l.west=l.west-m.CesiumMath.TWO_PI)),l}const ee=new t.Cartographic;function te(e,t,o,i){const r=e.surfaceDistance,n=Math.ceil(r*t),a=n>0?r/(n-1):Number.POSITIVE_INFINITY;let s=0;for(let t=0;t=0?r:r+m.CesiumMath.TWO_PI;i.westOverIDL=Math.min(i.westOverIDL,l),i.eastOverIDL=Math.max(i.eastOverIDL,l)}}const oe=[];function ie(t,o,i,r,n,a,s,u,d,p){const m={walls:[]};let f;if(s||u){const n=g.PolygonGeometryLibrary.createGeometryFromPositions(t,o,i,r,a,d,p),l=n.attributes.position.values,h=n.indices;let b,_;if(s&&u){const t=l.concat(l);b=t.length/3,_=y.IndexDatatype.createTypedArray(b,2*h.length),_.set(h);const o=h.length,r=b/2;for(f=0;f