/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{Vertices as t}from"../../lib/Attribute.js";import{TriangleIntersectionData as n}from"../../lib/TriangleIntersectionData.js";class e{constructor(e,r,s,o,i){this._componentOffsets=i,this._intersectionData=new n(s,o,new t(e,3,r))}intersectRay(t,n,e,s){const o=(t,n,e)=>{const o=r(this._componentOffsets,n);s(t,n,o,e)};this._intersectionData.intersectRay(t,n,e,o)}}function r(t,n){const{length:e}=t;if(0===e||n<t[0])return-1;if(n>t[e-1])return e;let r=0,s=e-1;for(;s-r>1;){const e=Math.round(.5*(r+s));n<=t[e]?s=e:r=e}return r}export{e as ComponentObjectFixedBVH};
