/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../core/has","../../webgl-engine/lib/GeometryUtil"],(function(e,n,t){"use strict";function a(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}function r(e,n){const a=(e,a,r=!1)=>({levels:e.map((e=>{const c=a(e.tesselation);return r&&t.cgToGIS(c),{components:[{geometry:c,material:n}],faceCount:c.indexCount/3,minScreenSpaceRadius:e.minScreenSpaceRadius}}))});switch(e){case"sphere":return a([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],(e=>t.createPolySphereGeometry(.5,e,!0)));case"cube":return a([{tesselation:0,minScreenSpaceRadius:0}],(()=>t.createBoxGeometry(1)));case"cone":return a(c,(e=>t.createConeGeometry(1,.5,e,!1)),!0);case"inverted-cone":return a(c,(e=>t.createConeGeometry(1,.5,e,!0)),!0);case"cylinder":return a(c,(e=>t.createCylinderGeometry(1,.5,e,[0,0,1],[0,0,.5])));case"tetrahedron":return a([{tesselation:0,minScreenSpaceRadius:0}],(()=>t.createTetrahedronGeometry(1)),!0);case"diamond":return a([{tesselation:0,minScreenSpaceRadius:0}],(()=>t.createDiamondGeometry(1)),!0);default:return}}const c=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];e.isValidPrimitive=a,e.primitiveLodResources=r,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
