This commit is contained in:
Hanno Braun 2024-11-14 17:32:01 +01:00
parent 3ac63e6d5a
commit dd7c743890

View File

@ -1,4 +1,6 @@
use super::{movement, rotation::Rotation, zoom::Zoom, InputEvent}; use super::{
movement::apply_translation, rotation::Rotation, zoom::Zoom, InputEvent,
};
use crate::camera::{Camera, FocusPoint}; use crate::camera::{Camera, FocusPoint};
/// Input handling abstraction /// Input handling abstraction
@ -16,12 +18,7 @@ impl InputHandler {
) { ) {
match event { match event {
InputEvent::Translation { previous, current } => { InputEvent::Translation { previous, current } => {
movement::apply_translation( apply_translation(previous, current, focus_point, camera);
previous,
current,
focus_point,
camera,
);
} }
InputEvent::Rotation { angle_x, angle_y } => { InputEvent::Rotation { angle_x, angle_y } => {
Rotation::apply(angle_x, angle_y, focus_point, camera); Rotation::apply(angle_x, angle_y, focus_point, camera);