/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{a as t}from"../../../../chunks/vec32.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{BufferViewVec3f as r}from"../../../../geometry/support/buffer/BufferView.js";import{intersectRenderGeometryTriangles as o}from"../lib/RayIntersections.js";import{writeAttributes as i}from"./internal/bufferWriterUtils.js";class s{constructor(t){this.layout=t}elementCount(t){return t.get("position").indices.length}write(t,e,r,o,s,n){return i(r,o,this.layout,t,e,s,n)}intersect(e,i,s,f,u,c,l){const m=this.layout.createView(e).getField("position",r);if(null==m)return;const p=t(n,c,u),a=0,y=m.count/3,d=f.options.normalRequired,g=(t,e,r)=>l(t,r,e);o(u,p,a,y,m.typedBuffer,m.typedBufferStride,d,g)}}const n=e();export{s as DefaultBufferWriter};
