#[repr(C)]pub struct CircleVertex {
pub position: [f32; 3],
pub quad_offset: [f32; 2],
pub color: [f32; 4],
pub stroke_color: [f32; 4],
pub params: [f32; 4],
}Expand description
A vertex for the SDF circle GPU pipeline.
Each circle is rendered as a screen-aligned quad (4 vertices, 6 indices).
The quad_offset attribute defines the corner of the quad in local space
(±1, ±1) and the fragment shader evaluates an SDF to produce anti-aliased
circles with optional stroke and blur.
Fields§
§position: [f32; 3]Circle centre position [x, y, z] in camera-relative meters.
quad_offset: [f32; 2]Quad corner offset [u, v] in [-1..1] range.
color: [f32; 4]Fill colour [r, g, b, a].
stroke_color: [f32; 4]Stroke colour [r, g, b, a].
params: [f32; 4]Circle parameters: [radius, stroke_width, blur, 0].
Implementations§
Source§impl CircleVertex
impl CircleVertex
Sourcepub fn layout() -> VertexBufferLayout<'static>
pub fn layout() -> VertexBufferLayout<'static>
Vertex buffer layout for the circle pipeline.
Trait Implementations§
Source§impl Clone for CircleVertex
impl Clone for CircleVertex
Source§fn clone(&self) -> CircleVertex
fn clone(&self) -> CircleVertex
Returns a duplicate 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 moreSource§impl Debug for CircleVertex
impl Debug for CircleVertex
impl Copy for CircleVertex
impl Pod for CircleVertex
Auto Trait Implementations§
impl Freeze for CircleVertex
impl RefUnwindSafe for CircleVertex
impl Send for CircleVertex
impl Sync for CircleVertex
impl Unpin for CircleVertex
impl UnsafeUnpin for CircleVertex
impl UnwindSafe for CircleVertex
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.