The inside test's ray directions (bvhIsInside, CpuMeshBvh.isPointInside):
three unit vectors, far apart, along no axis or diagonal (an authored
mesh's edges and faces mostly lie along those), into different octants (no
one hemisphere holds all three, so a mesh open on one side still has rays
that reach its walls), each component an exact f32, so the CPU and the GPU
cast the same rays. A point is inside when
at least INSIDE_TEST_MAJORITY of the rays vote it inside.
The inside test's ray directions (
bvhIsInside,CpuMeshBvh.isPointInside): three unit vectors, far apart, along no axis or diagonal (an authored mesh's edges and faces mostly lie along those), into different octants (no one hemisphere holds all three, so a mesh open on one side still has rays that reach its walls), each component an exact f32, so the CPU and the GPU cast the same rays. A point is inside when at least INSIDE_TEST_MAJORITY of the rays vote it inside.