pub struct PixelPerfectCamera;
Expand description
2d camera used for rendering in pixel space.
Trait Implementations§
Source§impl AbstractCamera2d for PixelPerfectCamera
impl AbstractCamera2d for PixelPerfectCamera
fn view_matrix(&self) -> mat3<f32>
fn projection_matrix(&self, framebuffer_size: vec2<f32>) -> mat3<f32>
fn uniforms(&self, framebuffer_size: vec2<f32>) -> Uniforms2d
fn screen_to_world( &self, framebuffer_size: vec2<f32>, pos: vec2<f32>, ) -> vec2<f32>
fn world_to_screen( &self, framebuffer_size: vec2<f32>, pos: vec2<f32>, ) -> Option<vec2<f32>>
fn view_area(&self, framebuffer_size: vec2<f32>) -> Quad<f32>
Auto Trait Implementations§
impl Freeze for PixelPerfectCamera
impl RefUnwindSafe for PixelPerfectCamera
impl Send for PixelPerfectCamera
impl Sync for PixelPerfectCamera
impl Unpin for PixelPerfectCamera
impl UnwindSafe for PixelPerfectCamera
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