[−][src]Struct macroquad::Camera2D
Fields
rotation: f32
Rotation in degrees
zoom: Vec2
Scaling, should be (1.0, 1.0) by default
target: Vec2
Rotation and zoom origin
offset: Vec2
Displacement from target
Implementations
impl Camera2D
[src]
pub fn matrix(&self) -> Mat4
[src]
pub fn world_to_screen(&self, point: Vec2) -> Vec2
[src]
Returns the screen space position for a 2d camera world space position
pub fn screen_to_world(&self, point: Vec2) -> Vec2
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Camera2D
impl Send for Camera2D
impl Sync for Camera2D
impl Unpin for Camera2D
impl UnwindSafe for Camera2D
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,