/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.110.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. */ import{a as wt}from"./chunk-HL2OONDA.js";import{a as k}from"./chunk-FEU4H2YL.js";import{a as kt}from"./chunk-EUSUDYW7.js";import{a as Ct}from"./chunk-XYZU5ZKW.js";import{b as dt,c as _t,d as R}from"./chunk-ADEEKX5Q.js";import{d as pt}from"./chunk-O5E7EBKP.js";import{d as ht}from"./chunk-GMFQULD7.js";import{a as N}from"./chunk-IS523WNE.js";import{a as s,c as ot}from"./chunk-4ZQSV4FU.js";import{a as M}from"./chunk-CLQ5X6HS.js";import{a as p}from"./chunk-FOJGNIAW.js";import{a as z}from"./chunk-UGI536VH.js";import{e as E}from"./chunk-BQUQ5TPM.js";var yt=new s,vt=new s,Et=new s,Mt=new s,Nt=new s,Rt=new s(1,1,1),Pt=Math.cos,At=Math.sin;function O(n){n=p(n,p.EMPTY_OBJECT);let m=p(n.radii,Rt),i=p(n.innerRadii,m),P=p(n.minimumClock,0),T=p(n.maximumClock,M.TWO_PI),A=p(n.minimumCone,0),b=p(n.maximumCone,M.PI),a=Math.round(p(n.stackPartitions,64)),u=Math.round(p(n.slicePartitions,64)),h=p(n.vertexFormat,k.DEFAULT);if(u<3)throw new z("options.slicePartitions cannot be less than three.");if(a<3)throw new z("options.stackPartitions cannot be less than three.");this._radii=s.clone(m),this._innerRadii=s.clone(i),this._minimumClock=P,this._maximumClock=T,this._minimumCone=A,this._maximumCone=b,this._stackPartitions=a,this._slicePartitions=u,this._vertexFormat=k.clone(h),this._offsetAttribute=n.offsetAttribute,this._workerName="createEllipsoidGeometry"}O.packedLength=2*s.packedLength+k.packedLength+7;O.pack=function(n,m,i){if(!E(n))throw new z("value is required");if(!E(m))throw new z("array is required");return i=p(i,0),s.pack(n._radii,m,i),i+=s.packedLength,s.pack(n._innerRadii,m,i),i+=s.packedLength,k.pack(n._vertexFormat,m,i),i+=k.packedLength,m[i++]=n._minimumClock,m[i++]=n._maximumClock,m[i++]=n._minimumCone,m[i++]=n._maximumCone,m[i++]=n._stackPartitions,m[i++]=n._slicePartitions,m[i]=p(n._offsetAttribute,-1),m};var bt=new s,xt=new s,Ot=new k,y={radii:bt,innerRadii:xt,vertexFormat:Ot,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};O.unpack=function(n,m,i){if(!E(n))throw new z("array is required");m=p(m,0);let P=s.unpack(n,m,bt);m+=s.packedLength;let T=s.unpack(n,m,xt);m+=s.packedLength;let A=k.unpack(n,m,Ot);m+=k.packedLength;let b=n[m++],a=n[m++],u=n[m++],h=n[m++],t=n[m++],o=n[m++],e=n[m];return E(i)?(i._radii=s.clone(P,i._radii),i._innerRadii=s.clone(T,i._innerRadii),i._vertexFormat=k.clone(A,i._vertexFormat),i._minimumClock=b,i._maximumClock=a,i._minimumCone=u,i._maximumCone=h,i._stackPartitions=t,i._slicePartitions=o,i._offsetAttribute=e===-1?void 0:e,i):(y.minimumClock=b,y.maximumClock=a,y.minimumCone=u,y.maximumCone=h,y.stackPartitions=t,y.slicePartitions=o,y.offsetAttribute=e===-1?void 0:e,new O(y))};O.createGeometry=function(n){let m=n._radii;if(m.x<=0||m.y<=0||m.z<=0)return;let i=n._innerRadii;if(i.x<=0||i.y<=0||i.z<=0)return;let P=n._minimumClock,T=n._maximumClock,A=n._minimumCone,b=n._maximumCone,a=n._vertexFormat,u=n._slicePartitions+1,h=n._stackPartitions+1;u=Math.round(u*Math.abs(T-P)/M.TWO_PI),h=Math.round(h*Math.abs(b-A)/M.PI),u<2&&(u=2),h<2&&(h=2);let t,o,e=0,D=[A],S=[P];for(t=0;t0&&(J=!0,U+=u-1),b0&&t!==f-1&&o!==0&&o!==c-1&&(st[$]=!0),$++;e=0;let F,L;for(t=1;t=et&&t