Struct enamel::Shape2d
[−]
[src]
pub struct Shape2d { pub vertices: Vec<Vertex>, pub indices: Vec<u16>, pub perim: Vec<u16>, pub radii: (f32, f32), pub color: [f32; 4], }
Fields
vertices: Vec<Vertex>
indices: Vec<u16>
perim: Vec<u16>
radii: (f32, f32)
color: [f32; 4]
Methods
impl Shape2d
[src]
fn rectangle(height: f32, width: f32, depth: f32, color: [f32; 4]) -> Shape2d
fn hexagon_panel(height: f32, ew: f32, depth: f32, color: [f32; 4]) -> Shape2d
fn perim_edges(&self) -> Vec<(usize, (u16, u16))>
fn as_border(&self, t: f32, color: [f32; 4]) -> Shape2d
Returns a shape with edges extended away from the center by the desired border thickness 't'.
Trait Implementations
impl Clone for Shape2d
[src]
fn clone(&self) -> Shape2d
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more