|
|
|
|
import{a as Pt}from"./chunk-FGEE3PAH.js";import{a as S}from"./chunk-AZIIGDA5.js";import{a as X}from"./chunk-QXL7S2GB.js";import{a as ft}from"./chunk-T2KUUXXE.js";import{a as It}from"./chunk-7SENG36B.js";import"./chunk-Y5GAVQLY.js";import"./chunk-K5K3TDMT.js";import{a as At}from"./chunk-U2YOVJNV.js";import{a as Tt}from"./chunk-PIKEH7AE.js";import{a as dt}from"./chunk-VPPZOZTD.js";import{a as Q}from"./chunk-QU7QNGRM.js";import{a as J}from"./chunk-5E7A47BT.js";import"./chunk-YBLDUUZU.js";import{a as _t,b as at}from"./chunk-34TCIMPD.js";import"./chunk-CFKWPE4D.js";import"./chunk-6J64DNFK.js";import{a as bt,b as Et}from"./chunk-FAXU5JYE.js";import"./chunk-DTBS4FIS.js";import{a as ut}from"./chunk-SE5RZMX2.js";import"./chunk-DUV4VG3N.js";import{c as pt,d as ot}from"./chunk-KMWU6SNL.js";import{d as Ot,f as mt}from"./chunk-6NWI43LF.js";import"./chunk-4O5G66XJ.js";import{c as lt,d as b}from"./chunk-FC5SLPQQ.js";import{a as et}from"./chunk-LYGOJ6CO.js";import{a as h,b as K,c as v,d as U}from"./chunk-ZWQPISEL.js";import{a as c}from"./chunk-BL2B3H3H.js";import"./chunk-IYZKEJTR.js";import"./chunk-G6NVUYVR.js";import{a as H}from"./chunk-KFPKN74R.js";import{a as rt,b as G}from"./chunk-OWNWTDHH.js";import{e as P}from"./chunk-55OKX5AT.js";function Dt(t,e){if(!P(t)||!P(e))throw new rt("identifier and message are required.");At(t,e)}var Nt=Dt;function O(t,e){this.position=t,P(this.position)||(this.position=new b),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=O.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(O.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let t=b.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(c.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=c.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=c.TWO_PI),t}}});var st=new K,Vt=new h;O.prototype.getLatitude=function(t){P(t)||(t=v.WGS84),st.latitude=this.conformalLatitude,st.longitude=this.longitude,st.height=0;let e=this.ellipsoid.cartographicToCartesian(st,Vt);return t.cartesianToCartographic(e,st),st.latitude};var Mt=new bt,Bt=new h,jt=new h;O.fromCartesian=function(t,e){G.defined("cartesian",t);let o=c.signNotZero(t.z),n=O.NORTH_POLE_TANGENT_PLANE,i=O.SOUTH_POLE;o<0&&(n=O.SOUTH_POLE_TANGENT_PLANE,i=O.NORTH_POLE);let r=Mt;r.origin=n.ellipsoid.scaleToGeocentricSurface(t,r.origin),r.direction=h.subtract(r.origin,i,Bt),h.normalize(r.direction,r.direction);let a=Et.rayPlane(r,n.plane,jt),f=h.subtract(a,i,a),l=h.dot(n.xAxis,f),u=o*h.dot(n.yAxis,f);return P(e)?(e.position=new b(l,u),e.tangentPlane=n,e):new O(new b(l,u),n)};O.fromCartesianArray=function(t,e){G.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=O.fromCartesian(t[n],e[n]);return e};O.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new O(t.position,t.tangentPlane)};O.HALF_UNIT_SPHERE=Object.freeze(new v(.5,.5,.5));O.NORTH_POLE=Object.freeze(new h(0,0,.5));O.SOUTH_POLE=Object.freeze(new h(0,0,-.5));O.NORTH_POLE_TANGENT_PLANE=Object.freeze(new J(O.NORTH_POLE,O.HALF_UNIT_SPHERE));O.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new J(O.SOUTH_POLE,O.HALF_UNIT_SPHERE));var k=O;var Wt=new K,Ht=new K;function Gt(t,e,o,n){let r=n.cartesianToCartographic(t,Wt).height,a=n.cartesianToCartographic(e,Ht);a.height=r,n.cartographicToCartesian(a,e);let f=n.cartesianToCartographic(o,Ht);f.height=r-100,n.cartographicToCartesian(f,o)}var Ct=new Pt,kt=new h,zt=new h,Ut=new h,Yt=new h,qt=new h,Qt=new h,gt=new h,Z=new h,ct=new h,Jt=new b,Zt=new b,Kt=new h,xt=new mt,Xt=new U,$t=new U;function wt(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,i=o.attributes.position.values,r=P(o.attributes.st)?o.attributes.st.values:void 0,a=i.length,f=t.wall,l=t.top||f,u=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let g=t.boundingRectangle,s=t.rotationAxis,E=t.projectTo2d,I=t.ellipsoid,B=t.stRotation,C=t.perPosition
|