/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{getReferenceEllipsoid as e}from"../../../../geometry/ellipsoidUtils.js";import{create as t}from"../../../../geometry/support/aaBoundingRect.js";const i="virtual-snapshot-tile",s="virtual-display-filter-highlight-tile";class l{constructor(e,i,s,l,n=h(e,i,s)){this._tilingScheme=l,this.id=n,this.lij=[0,0,0],this.extent=null,this.measures=new r,this.loadPriority=0,this.used=!1,this.lij[0]=this.measures.lodLevel=e,this.lij[1]=i,this.lij[2]=s,l&&(this.extent=t(),l?.getExtent(e,i,s,this.extent))}get planetRadius(){return e(this.spatialReference).radius}get spatialReference(){return this._tilingScheme?.spatialReference}get resolution(){return this._tilingScheme?.resolutionAtLevel(this.measures.lodLevel)??0}get level(){return this.lij[0]}get lodLevelDelta(){return this.measures.lodLevel-this.level}createChildren(){const e=this.lij[0]+1,t=2*this.lij[1],i=2*this.lij[2];return[new l(e,t,i,this._tilingScheme),new l(e,t+1,i,this._tilingScheme),new l(e,t,i+1,this._tilingScheme),new l(e,t+1,i+1,this._tilingScheme)]}}class r{constructor(){this.visible=!0,this.distance=0,this.lodLevel=0,this.splitPriority=0,this.mergeable=!0}}function h(e,t,i){return`${e}/${t}/${i}`}export{l as FeatureTileDescriptor,h as getFeatureTileId,s as virtualDisplayFilterHighlightTileId,i as virtualSnapshotTileId};
