feat(overlay): relative-to-eye CPU projection for grips and grid (P5)
Route the on-screen chrome that projects absolute world coordinates through the f64 relative-to-eye helpers so it stays glued/jitter-free at UTM scale after the world_offset removal: grips (grips_to_screen) and grip hit-testing (find_hit_grip) now project from the f64 GripDef.world via Camera::project_f64; the model grid and its UCS axes carry the camera eye (DVec3) + rotation-only matrix and a f64 origin, projecting each line relative to the eye. Snap-marker / OST-point / compute_grid_step still use the f32 path (single points / spacing — negligible) and can follow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
ccc933e7b0
commit
52882749eb
4 changed files with 64 additions and 57 deletions
|
|
@ -3281,8 +3281,8 @@ impl OpenCADStudio {
|
|||
bounds,
|
||||
)
|
||||
} else {
|
||||
let vp_mat = self.tabs[i].scene.camera.borrow().view_proj(bounds);
|
||||
find_hit_grip(p, &self.tabs[i].selected_grips, vp_mat, bounds)
|
||||
let cam = self.tabs[i].scene.camera.borrow();
|
||||
find_hit_grip(p, &self.tabs[i].selected_grips, &cam, bounds)
|
||||
};
|
||||
if let Some((grip_id, is_translate, world)) = grip_hit {
|
||||
// The visibility (lookup) grip opens a state
|
||||
|
|
@ -8275,8 +8275,8 @@ impl OpenCADStudio {
|
|||
bounds,
|
||||
)
|
||||
} else {
|
||||
let vp_mat = self.tabs[i].scene.camera.borrow().view_proj(bounds);
|
||||
find_hit_grip(p, &self.tabs[i].selected_grips, vp_mat, bounds)
|
||||
let cam = self.tabs[i].scene.camera.borrow();
|
||||
find_hit_grip(p, &self.tabs[i].selected_grips, &cam, bounds)
|
||||
};
|
||||
match hit {
|
||||
Some((grip_id, _, _)) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue