refactor: remove dead world_offset plumbing (RTE migration is complete)
Now that geometry reaches the GPU/CPU as absolute coordinates via the double-single relative-to-eye path, world_offset is always [0,0,0]. Strip the parameter that was threaded through the whole tessellation / block- expansion / fallback / camera-decode chain and the ExpandCtx field that carried it — ~340 references across 20 files, all subtracting zero. - truck_tess: to_local / to_local_low / tessellate_* drop the offset arg; to_local is now a pure double-single split. - tessellate: offset_to_ds → points_to_ds (pure DS split); tessellate(), tessellate_entity(), fallback_geometry(), solid_wire_fallback(), entity_aabb(), expand_insert(), expand_block_meshes(), the dimension helpers (vec3_local, dimension_snap_pts, …), text_support, leader, multileader, image_model, xclip and camera_from_view all lose the param. - block_cache: ExpandCtx loses its world_offset field. - Remove the now-dead offset_snap_pts and the unused set_grid_snap. Behaviour is unchanged (the offset was zero everywhere); the compiler verifies every call site. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
02d40bd2ec
commit
56d507fd88
20 changed files with 190 additions and 343 deletions
|
|
@ -344,14 +344,13 @@ impl Grippable for Hatch {
|
|||
}
|
||||
|
||||
impl FallbackTess for Hatch {
|
||||
fn fallback_geometry(&self, world_offset: [f64; 3]) -> FallbackGeometry {
|
||||
let [ox, oy, oz] = world_offset;
|
||||
fn fallback_geometry(&self) -> FallbackGeometry {
|
||||
let normal = (self.normal.x, self.normal.y, self.normal.z);
|
||||
// Convert a 2D OCS hatch boundary point to WCS, then subtract world_offset.
|
||||
// Convert a 2D OCS hatch boundary point to absolute WCS.
|
||||
let to_wcs = |x: f64, y: f64| -> [f64; 3] {
|
||||
let (wx, wy, wz) =
|
||||
crate::scene::view::transform::ocs_point_to_wcs((x, y, self.elevation), normal);
|
||||
[wx - ox, wy - oy, wz - oz]
|
||||
[wx, wy, wz]
|
||||
};
|
||||
// Snap point at a world (f64) location, cast to the f32 snap buffer.
|
||||
let snap_at = |w: [f64; 3]| Vec3::new(w[0] as f32, w[1] as f32, w[2] as f32);
|
||||
|
|
|
|||
Loading…
Reference in a new issue