refactor(snap): widen snap_pts to f64 (world_offset removal P2)

WireModel/LocalWire/TruckEntity snap buffers and the producers/consumers
now carry snap candidates as DVec3 (offset_snap_pts, dimension/multileader
producers, block-cache transform, pick/xclip, snap module). Still
offset-relative, so behaviour is unchanged — this just lets the snap
transport survive the upcoming switch to absolute coordinates without an
extra f32 quantization. The snap module still resolves in f32 (as_vec3 at
entry), matching today's precision.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-06-23 18:52:42 +03:00
1 parent ab7cd63dec
commit a7a1fac09a
8 files changed
+30 -26

No files matched your search

+3 -7
View File
@@ -39,7 +39,7 @@ pub struct LocalWire {
/// sub-f32 precision once the renderer translates them to world space.
pub points_low: Vec<[f32; 3]>,
pub key_vertices: Vec<[f32; 3]>,
pub snap_pts: Vec<(glam::Vec3, SnapHint)>,
pub snap_pts: Vec<(glam::DVec3, SnapHint)>,
pub tangent_geoms: Vec<TangentGeom>,
pub fill_tris: Vec<[f32; 3]>,
pub color: [f32; 4],
@@ -1041,7 +1041,7 @@ struct BatchEntry {
plinegen: bool,
points: Vec<[f32; 3]>,
points_low: Vec<[f32; 3]>,
snap_pts: Vec<(glam::Vec3, SnapHint)>,
snap_pts: Vec<(glam::DVec3, SnapHint)>,
key_vertices: Vec<[f32; 3]>,
tangent_geoms: Vec<TangentGeom>,
fill_tris: Vec<[f32; 3]>,
@@ -1465,11 +1465,7 @@ fn emit_wire(
p.z as f64 + lo_z,
));
entry.snap_pts.push((
glam::Vec3::new(
(v.x - ox) as f32,
(v.y - oy) as f32,
(v.z - oz) as f32,
),
glam::DVec3::new(v.x - ox, v.y - oy, v.z - oz),
*hint,
));
}