mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 11:58:27 +00:00
Simplify
This commit is contained in:
parent
3ac63e6d5a
commit
dd7c743890
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user