pub struct CameraController<'a> { /* private fields */ }Expand description
Used to move and/or rotate the camera.
Implementations§
Source§impl<'a> CameraController<'a>
impl<'a> CameraController<'a>
pub fn new(camera: &'a mut Camera) -> Self
Sourcepub fn update_camera(&mut self, movement: CameraControllerMovement)
pub fn update_camera(&mut self, movement: CameraControllerMovement)
Moves the camera in a single direction at a time.
Sourcepub fn update_camera_batch(&mut self, movements: &[CameraControllerMovement])
pub fn update_camera_batch(&mut self, movements: &[CameraControllerMovement])
Runs update_camera on every movement provided.
Auto Trait Implementations§
impl<'a> Freeze for CameraController<'a>
impl<'a> RefUnwindSafe for CameraController<'a>
impl<'a> Send for CameraController<'a>
impl<'a> Sync for CameraController<'a>
impl<'a> Unpin for CameraController<'a>
impl<'a> !UnwindSafe for CameraController<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more