#[repr(C)]pub struct Vec4 {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
Expand description
Corresponds to a GLSL vec4
in std140 layout.
Fields§
§x: f32
§y: f32
§z: f32
§w: f32
Trait Implementations§
source§impl PartialEq for Vec4
impl PartialEq for Vec4
impl Copy for Vec4
impl Pod for Vec4
impl StructuralPartialEq for Vec4
Auto Trait Implementations§
impl Freeze for Vec4
impl RefUnwindSafe for Vec4
impl Send for Vec4
impl Sync for Vec4
impl Unpin for Vec4
impl UnwindSafe for Vec4
Blanket Implementations§
source§impl<T> AsStd140 for Twhere
T: Std140,
impl<T> AsStd140 for Twhere
T: Std140,
source§fn from_std140(x: T) -> T
fn from_std140(x: T) -> T
Converts from
std140
version of self to self.source§fn std140_size_static() -> usize
fn std140_size_static() -> usize
Returns the size of the
std140
version of this type. Useful for
pre-sizing buffers.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,
§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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.source§impl<T> WriteStd140 for Twhere
T: AsStd140,
impl<T> WriteStd140 for Twhere
T: AsStd140,
source§fn std140_size(&self) -> usize
fn std140_size(&self) -> usize
The space required to write this value using
std140
layout rules. This
does not include alignment padding that may be needed before or after
this type when written as part of a larger buffer.