#[repr(C)]pub(crate) struct GraphicsInstance {
pub model: [[f32; 4]; 4],
pub color: [f32; 4],
pub color_b: [f32; 4],
pub half_extents: [f32; 2],
pub radius: f32,
pub stroke_width: f32,
pub grad_a: [f32; 2],
pub grad_b: [f32; 2],
pub kind_pack: [u32; 4],
pub arc_data: [f32; 4],
}Fields§
§model: [[f32; 4]; 4]§color: [f32; 4]§color_b: [f32; 4]§half_extents: [f32; 2]§radius: f32§stroke_width: f32§grad_a: [f32; 2]§grad_b: [f32; 2]§kind_pack: [u32; 4]Packed [kind, mode, fill_kind, _padding]. Bundled into
one Uint32x4 attribute so the subsequent arc_data
Float32x4 falls on a 16-byte boundary — vertex_attr_array!
computes offsets sequentially without honouring struct
padding, so a packed quad here matches the repr(C)
layout exactly.
arc_data: [f32; 4][r_inner, r_outer, mid_angle, half_angle] for annular
sectors. Zeroed (and ignored) for other primitive kinds.
Trait Implementations§
Source§impl Clone for GraphicsInstance
impl Clone for GraphicsInstance
Source§fn clone(&self) -> GraphicsInstance
fn clone(&self) -> GraphicsInstance
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 moreimpl Copy for GraphicsInstance
impl Pod for GraphicsInstance
Auto Trait Implementations§
impl Freeze for GraphicsInstance
impl RefUnwindSafe for GraphicsInstance
impl Send for GraphicsInstance
impl Sync for GraphicsInstance
impl Unpin for GraphicsInstance
impl UnsafeUnpin for GraphicsInstance
impl UnwindSafe for GraphicsInstance
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.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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