Struct re_renderer::global_bindings::FrameUniformBuffer
source · #[repr(C)]pub struct FrameUniformBuffer {
pub view_from_world: Mat4x3,
pub projection_from_view: Mat4,
pub projection_from_world: Mat4,
pub camera_position: Vec3,
pub pixel_world_size_from_camera_distance: f32,
pub camera_forward: Vec3,
pub pixels_per_point: f32,
pub tan_half_fov: Vec2RowPadded,
pub device_tier: U32RowPadded,
}
Expand description
Mirrors the GPU contents of a frame-global uniform buffer.
Contains information that is constant for a single frame like camera. (does not contain information that is special to a particular renderer)
Fields§
§view_from_world: Mat4x3
§projection_from_view: Mat4
§projection_from_world: Mat4
§camera_position: Vec3
Camera position in world space.
pixel_world_size_from_camera_distance: f32
For perspective: Multiply this with a camera distance to get a measure of how wide a pixel is in world units. For orthographic: This is the world size value, independent of distance.
camera_forward: Vec3
Camera direction in world space.
Same as -view_from_world.row(2).truncate()
pixels_per_point: f32
How many pixels there are per point. I.e. the UI zoom factor
tan_half_fov: Vec2RowPadded
(tan(fov_y / 2) * aspect_ratio, tan(fov_y /2))
, i.e. half ratio of screen dimension to screen distance in x & y.
Both values are set to f32max for orthographic projection
device_tier: U32RowPadded
re_renderer
defined device tier.
Trait Implementations§
source§impl Clone for FrameUniformBuffer
impl Clone for FrameUniformBuffer
source§fn clone(&self) -> FrameUniformBuffer
fn clone(&self) -> FrameUniformBuffer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for FrameUniformBuffer
impl Pod for FrameUniformBuffer
Auto Trait Implementations§
impl Freeze for FrameUniformBuffer
impl RefUnwindSafe for FrameUniformBuffer
impl Send for FrameUniformBuffer
impl Sync for FrameUniformBuffer
impl Unpin for FrameUniformBuffer
impl UnwindSafe for FrameUniformBuffer
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
§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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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