Merge pull request #4038 from dotCooCoo/fix/mesh-ops-bvh-slab-f64

craft-mesh-ops: BVH slab test finds hits past the f32 range
This commit is contained in:
BFlat authored and GitHub committed 2026-12-01 09:22:13 +07:00
commit ac8b378d24
2 files changed
+773 -76

No files matched your search

+6 -1
View File
@@ -46,7 +46,12 @@ crate has no UI, does no file or network I/O and has no `unsafe` code. File form
Lathe profile lengths and direction normalization use `f64` before the UVs and normals are stored as `f32`.
- **BVH.** `Bvh` is a binned SAH tree on all three axes with a median split when no split beats a
leaf. It answers closest-hit, any-hit and filtered ray casts, nearest-point queries and box
queries.
queries. Ray and triangle tests run in double precision and sum a value exactly when it is too
close to zero for its rounding error, so the edge-function signs that decide whether the ray
crosses the triangle are exact and a ray nearly along a triangle keeps its hit distance. Slab
intervals include a floating-point rounding margin, and subnormal intervals are
checked again in double precision. Nearest-point queries keep squared distances in double
precision, skip triangles with no area, and find nothing for a negative distance.
- **Camera.** `OrbitCamera` and `Ray` give an orbit view and picking rays.
`GeomError::Invalid` is the one error type. `rayon` parallelizes the UV G-buffer, and `serde`
File diff suppressed because it is too large. Load diff