mirror of
https://github.com/storytold/craft-libs.git
synced 2026-12-01 10:48:15 +01:00
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:
2 files changed
+773
-76
No files matched your search
@@ -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`
|
||||
|
||||
+767
-75
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user