#[repr(C)]pub struct LinePatternVertex {
pub position: [f32; 3],
pub color: [f32; 4],
pub line_normal: [f32; 2],
pub line_distance: f32,
pub cap_join: f32,
pub uv: [f32; 2],
}Expand description
A vertex for the line-pattern GPU pipeline.
Extends super::line_vertex::LineVertex with per-vertex UV
coordinates used to sample the repeating pattern texture.
U maps along the line centreline (distance / pattern width) and
V maps across the line width (0 = left edge, 1 = right edge).
Fields§
§position: [f32; 3]Position [x, y, z] in camera-relative meters.
color: [f32; 4]Per-vertex RGBA color (used as fallback / tint).
line_normal: [f32; 2]Extrusion normal [nx, ny] perpendicular to the line centreline.
line_distance: f32Distance along the polyline centreline (world-space meters).
cap_join: f32Cap/join flag: 1.0 for round cap/join fan vertices, 0.0 for
ribbon body.
uv: [f32; 2]Pattern UV coordinates.
U = distance along line / pattern width (repeats via GPU sampler). V = perpendicular position across line width [0 = left, 1 = right].
Implementations§
Source§impl LinePatternVertex
impl LinePatternVertex
Sourcepub fn layout() -> VertexBufferLayout<'static>
pub fn layout() -> VertexBufferLayout<'static>
Vertex buffer layout for the line-pattern pipeline.
Trait Implementations§
Source§impl Clone for LinePatternVertex
impl Clone for LinePatternVertex
Source§fn clone(&self) -> LinePatternVertex
fn clone(&self) -> LinePatternVertex
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinePatternVertex
impl Debug for LinePatternVertex
impl Copy for LinePatternVertex
impl Pod for LinePatternVertex
Auto Trait Implementations§
impl Freeze for LinePatternVertex
impl RefUnwindSafe for LinePatternVertex
impl Send for LinePatternVertex
impl Sync for LinePatternVertex
impl Unpin for LinePatternVertex
impl UnsafeUnpin for LinePatternVertex
impl UnwindSafe for LinePatternVertex
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
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
bits
as &Self.