Pick spline control vertices with the configured screen aperture

This commit is contained in:
ramox81 committed 2026-09-11 11:13:09 +03:00
1 parent 12c661d118
commit 42439c2e50
4 files changed
+74 -10

No files matched your search

+15
View File
@@ -1939,6 +1939,15 @@ impl InputKind {
}
}
/// Current screen projection and configured aperture for point-feature picking.
#[derive(Clone, Copy)]
pub struct PointPickContext {
pub view: glam::Mat4,
pub eye: DVec3,
pub bounds: iced::Rectangle,
pub aperture_px: f32,
}
pub trait CadCommand: Send {
/// Keep the layer already carried by entities committed by this command
/// instead of replacing it with the current drawing layer.
@@ -2006,6 +2015,12 @@ pub trait CadCommand: Send {
/// Called when the user left-clicks in the viewport (point pick).
fn on_point(&mut self, pt: DVec3) -> CmdResult;
/// Opt in only while a point input selects an existing point feature.
fn wants_point_pick_context(&self) -> bool { false }
/// Refreshed for each point input so zoom and viewport changes are reflected.
fn set_point_pick_context(&mut self, _context: Option<PointPickContext>) {}
/// Called when the user presses Enter (finalize / next option).
fn on_enter(&mut self) -> CmdResult;