ray-aabb-intersection:确定射线与轴对齐的边界框(AABB)之间的交点

时间:2021-05-01 16:26:42
【文件属性】:
文件名称:ray-aabb-intersection:确定射线与轴对齐的边界框(AABB)之间的交点
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-01 16:26:42
JavaScript ray-aabb交叉点 确定射线与轴对齐的边界框(AABB)之间的交点。 理论上可以在任意数量的维度上工作! 非常感谢提供和。 用法 out = intersection(out, origin, dir, aabb) 确定给定的射线(origin, direction)与aabb相交。 如果没有相交,则返回null 。 否则,相交点将存储在out ,然后返回。 const origin = new Float32Array ( [ 0 , 4 , 0 ] ) const dir = new Float32Array ( [ 0 , 1 , 0 ] ) const out = new Float32Array ( 3 ) const aabb = [ [ - 1 , - 1 , - 1 ] , [ + 1 , + 1 , + 1 ] ] intersection ( ou
【文件预览】:
ray-aabb-intersection-master
----.gitignore(56B)
----README.md(2KB)
----bench.js(1KB)
----package.json(1KB)
----index.js(801B)
----LICENSE.md(1KB)
----.npmignore(96B)
----demo.js(2KB)
----index.html(2KB)

网友评论