pub struct MatrixCamera { /* private fields */ }Implementations§
Source§impl MatrixCamera
impl MatrixCamera
pub fn new(renderer: &mut Renderer) -> Self
pub fn get_layout_descriptor() -> BindGroupLayoutDescriptor
pub fn with_controller( renderer: &mut Renderer, controller: impl CameraController + 'static, ) -> Self
pub fn make_perspective(&mut self, fov: f32, aspect: f32, znear: f32, zfar: f32)
pub fn make_ortho( &mut self, left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32, )
pub fn matrix(&self) -> Mat4
pub fn update_data(&mut self)
pub fn update(&mut self, renderer: &mut Renderer, events: &Events, dt: f32)
pub fn attach_controller( &mut self, controller: Box<dyn CameraController>, ) -> &mut Self
pub fn take_controller(&mut self) -> Option<Box<dyn CameraController>>
pub fn set_position(&mut self, pos: Vec3)
pub fn position(&self) -> Vec3
pub fn set_direction(&mut self, direction: Vec3)
pub fn direction(&self) -> Vec3
pub fn controller(&self) -> &Option<Box<dyn CameraController>>
pub fn up(&self) -> Vec3
pub fn right(&self) -> Vec3
pub fn bind_group(&self) -> BindGroupHandle
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MatrixCamera
impl !RefUnwindSafe for MatrixCamera
impl !Send for MatrixCamera
impl !Sync for MatrixCamera
impl Unpin for MatrixCamera
impl !UnwindSafe for MatrixCamera
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