gkjohnson / three-mesh-bvh

A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.
https://gkjohnson.github.io/three-mesh-bvh/example/bundle/raycast.html
MIT License
2.38k stars 247 forks source link

Help wanted. #646

Closed HawtinZeng closed 4 months ago

HawtinZeng commented 4 months ago

Hi, gkjohnson, I am writing to ask some help about the source code, what is float32Array, nodeIndex32 and nodeIndex16 in function _intersectsGeometry? I can't figure out this. image

gkjohnson commented 4 months ago

What's your question?

HawtinZeng commented 4 months ago

I have no questions about how to use this lib, I want to understand the process of testing the intersections of two geometry, but i found I can't understand these three buffers(float32Array, uint16Array, uint32Array)

HawtinZeng commented 4 months ago

Can u recommend some books or blogs about the buffer array in geometry?

gkjohnson commented 4 months ago

Do you have a specific question about that code? I'm not sure what you're asking for.

Can u recommend some books or blogs about the buffer array in geometry?

I don't. The project just uses three.js and javascript. Those fields are arrays storing the BVH data in different array formats.

HawtinZeng commented 4 months ago

Ok, thank u!