/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{Sphere as e}from"../../../../geometry/support/sphere.js";import{ElevationRange as s}from"../../support/ElevationRange.js";class t extends s{constructor(s,t){super(NaN,NaN),this.id=s,this.serviceMbsInIndexSR=t,this._serviceMbsInRenderSR=new e(0,0,0,-1)}get serviceMbsInRenderSR(){return this._serviceMbsInRenderSR}updateServiceMbsInRenderSR(e){return this._serviceMbsInRenderSR.copyFrom(e),this._serviceMbsInRenderSR}invalidateServiceBVsInRenderSR(){this._serviceMbsInRenderSR.invalidate(),this.serviceObbInRenderSR?.invalidate()}shareServiceBVsInRenderSRWith(e){this.serviceObbInRenderSR=e.serviceObbInRenderSR,this._serviceMbsInRenderSR=e._serviceMbsInRenderSR}}class i extends t{constructor(e,s,t,i,r,a,d,h,o,c){super(e,t),this.index=s,this.childCount=i,this.level=r,this.resources=a,this.version=d,this.lodMetric=h,this.maxError=o,this.numFeatures=c,this.failed=!1,this.cacheState=0,this.vertexCount=0,this.memory=0,this.childrenLoaded=0,this.hasModifications=!1,this.imModificationImpact=4,this.elevationAgnosticBoundingVolume=new n}invalidateServiceBVsInRenderSR(){super.invalidateServiceBVsInRenderSR(),this.elevationAgnosticBoundingVolume.invalidate()}}class r{constructor(e,s,t,i){this.nodeHasLOD=e,this.isChosen=s,this.lodLevel=t,this.version=i}}class n{constructor(){this._data=[0,0,0,-1]}invalidate(){this._data[3]=-1}get valid(){return-1!==this._data[3]}get radius(){return this._data[3]}getAxis(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set(e,s){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2],this._data[3]=s}}export{n as ElevationAgnosticBoundingVolume,i as Node,t as NodeBoundingData,r as NodeTraversalState};
