fj_viewer/input/
event.rs

1use crate::screen::NormalizedScreenPosition;
2
3/// An input event
4pub enum InputEvent {
5    /// Move the model up, down, left or right
6    Translation {
7        /// The normalized position of the cursor before input
8        previous: NormalizedScreenPosition,
9        /// The normalized position of the cursor after input
10        current: NormalizedScreenPosition,
11    },
12
13    /// Rotate the model around the focus point
14    Rotation {
15        /// The angle around the screen x axis to rotate (in radians)
16        angle_x: f64,
17        /// The angle around the screen y axis to rotate (in radians)
18        angle_y: f64,
19    },
20
21    /// Move the view forwards and backwards
22    Zoom(f64),
23}