Struct tiny_game_framework::Camera
source · pub struct Camera {
pub proj: Mat4,
pub view: Mat4,
pub pos: Vec3,
pub right: Vec3,
pub front: Vec3,
pub up: Vec3,
pub pitch: f32,
pub yaw: f32,
pub dt: f32,
/* private fields */
}
Fields§
§proj: Mat4
§view: Mat4
§pos: Vec3
§right: Vec3
§front: Vec3
§up: Vec3
§pitch: f32
§yaw: f32
§dt: f32
Implementations§
source§impl Camera
impl Camera
pub fn new() -> Self
pub fn update(&mut self, y: Vec3)
pub fn input(&mut self, window: &mut Window, glfw: &Glfw)
pub fn mouse_callback(&mut self, xpos: f32, ypos: f32, window: &Window)
pub unsafe fn send_uniforms(&mut self, shader: &Shader)
pub fn set_projection(&mut self, projection_type: ProjectionType)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnwindSafe for Camera
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more