#[repr(C)]pub struct Viewport {
pub position: UVec2,
pub size: UVec2,
pub depth_min: f32,
pub depth_max: f32,
}Expand description
A custom viewport specification for a Camera.
Fields§
§position: UVec2The physical position to render this viewport to within the RenderTarget of this Camera. (0,0) corresponds to the top-left corner.
size: UVec2The physical size of the viewport rectangle to render to within the RenderTarget of this Camera. The origin of the rectangle is in the top-left corner.
depth_min: f32The minimum depth to render (on a scale from 0.0 to 1.0).
depth_max: f32The maximum depth to render (on a scale from 0.0 to 1.0).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Viewport
impl RefUnwindSafe for Viewport
impl Send for Viewport
impl Sync for Viewport
impl Unpin for Viewport
impl UnwindSafe for Viewport
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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