#[repr(C)]pub struct SceneUniforms {Show 16 fields
pub view: Mat4,
pub proj: Mat4,
pub time: f32,
pub delta_time: f32,
pub resolution: [f32; 2],
pub mouse: [f32; 2],
pub mouse_velocity: [f32; 2],
pub shatter_origin: [f32; 2],
pub shatter_time: f32,
pub shatter_force: f32,
pub berzerker_rage: f32,
pub berzerker_mode: u32,
pub scroll_offset: f32,
pub scale_factor: f32,
pub scene_type: u32,
pub _pad: [f32; 3],
}Expand description
Per-frame scene state for the Berserker pipeline.
Fields§
§view: Mat4§proj: Mat4§time: f32§delta_time: f32§resolution: [f32; 2]§mouse: [f32; 2]§mouse_velocity: [f32; 2]§shatter_origin: [f32; 2]§shatter_time: f32§shatter_force: f32§berzerker_rage: f32§berzerker_mode: u32§scroll_offset: f32§scale_factor: f32§scene_type: u32§_pad: [f32; 3]Implementations§
Source§impl SceneUniforms
impl SceneUniforms
pub fn new(width: f32, height: f32) -> SceneUniforms
Trait Implementations§
Source§impl Clone for SceneUniforms
impl Clone for SceneUniforms
Source§fn clone(&self) -> SceneUniforms
fn clone(&self) -> SceneUniforms
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneUniforms
impl Debug for SceneUniforms
Source§impl<'de> Deserialize<'de> for SceneUniforms
impl<'de> Deserialize<'de> for SceneUniforms
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SceneUniforms, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SceneUniforms, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SceneUniforms
impl Serialize for SceneUniforms
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for SceneUniforms
impl Pod for SceneUniforms
Auto Trait Implementations§
impl Freeze for SceneUniforms
impl RefUnwindSafe for SceneUniforms
impl Send for SceneUniforms
impl Sync for SceneUniforms
impl Unpin for SceneUniforms
impl UnsafeUnpin for SceneUniforms
impl UnwindSafe for SceneUniforms
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§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.Source§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.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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