/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../chunks/_rollupPluginBabelHelpers","../../../../../chunks/mat4f64","../../../../../chunks/vec3","../../../../../chunks/sphere","../../../support/mathUtils","../Octree"],(function(e,t,n,i,r,s,a){"use strict";let h=function(e){function a(t,i){var s;return(s=e.call(this,(e=>r.wrap(s._instanceData.view.boundingSphere.getVec(e,s._tmpSphere))),{maximumDepth:25})||this)._tmpSphere=r.create(),s._tmpMat4=n.create(),s._instanceData=t,s._boundingSphere=i,s}t._inheritsLoose(a,e);var h=a.prototype;return h.addInstance=function(e){const t=this._instanceData.view.boundingSphere,n=this._instanceData.getCombinedModelTransform(e,this._tmpMat4);i.transformMat4(this._tmpSphere,this._boundingSphere.center,n),this._tmpSphere[3]=this._boundingSphere.radius*s.maxScale(n),t.setVec(e,this._tmpSphere),this.add([e])},h.removeInstance=function(e){this.remove([e])},a}(a);e.InstanceOctree=h,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
