#[repr(C, align(16))]pub struct ViewportUniform {
proj_mat: Mat4,
view_mat: Mat4,
half_frame_size: Vec2,
_padding: [u32; 2],
}Expand description
Uniforms for the camera
Fields§
§proj_mat: Mat4§view_mat: Mat4§half_frame_size: Vec2§_padding: [u32; 2]Implementations§
Source§impl ViewportUniform
impl ViewportUniform
pub fn from_camera_frame( camera_frame: &CameraFrame, width: u32, height: u32, ) -> Self
pub(crate) fn as_bind_group_layout_entry(binding: u32) -> BindGroupLayoutEntry
Trait Implementations§
Source§impl Clone for ViewportUniform
impl Clone for ViewportUniform
Source§fn clone(&self) -> ViewportUniform
fn clone(&self) -> ViewportUniform
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ViewportUniform
impl Debug for ViewportUniform
Source§impl Primitive for ViewportUniform
impl Primitive for ViewportUniform
Source§type RenderPacket = ViewportGpuPacket
type RenderPacket = ViewportGpuPacket
The RenderInstance
impl Copy for ViewportUniform
impl Pod for ViewportUniform
Auto Trait Implementations§
impl Freeze for ViewportUniform
impl RefUnwindSafe for ViewportUniform
impl Send for ViewportUniform
impl Sync for ViewportUniform
impl Unpin for ViewportUniform
impl UnwindSafe for ViewportUniform
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> StaticAnim for Twhere
T: StaticAnimRequirement + 'static,
impl<T> StaticAnim for Twhere
T: StaticAnimRequirement + 'static,
Source§fn show(&self) -> AnimationCell<T>
fn show(&self) -> AnimationCell<T>
Show the item
Source§fn hide(&self) -> AnimationCell<T>
fn hide(&self) -> AnimationCell<T>
Hide the item