Struct fps_camera::FirstPerson
[−]
[src]
pub struct FirstPerson<T = f32> { pub settings: FirstPersonSettings<T>, pub yaw: T, pub pitch: T, pub position: [T; 3], pub velocity: T, pub actions: Actions, }
Models a flying first person camera.
Fields
settings: FirstPersonSettings<T>
The first person camera settings.
yaw: T
The yaw angle (in radians).
pitch: T
The pitch angle (in radians).
position: [T; 3]
The position of the camera.
velocity: T
The velocity we are moving.
actions: Actions
The active actions.
Methods
impl<T> FirstPerson<T> where
T: Float,
[src]
T: Float,
fn new(position: [T; 3], settings: FirstPersonSettings<T>) -> FirstPerson<T>
[src]
Creates a new first person camera.
fn camera(&self, dt: T) -> Camera<T>
[src]
Computes camera.
fn update(&mut self, dt: T)
[src]
Updates the camera for an elapsed number of seconds.
fn update_mouse(&mut self, relative_dx: T, relative_dy: T)
[src]
Updates the camera for a mouse movement.
fn movement_direction(&self) -> (T, T, T)
[src]
Gets the direction of movement.