Skip to main content

uv_cylinder

Function uv_cylinder 

Source
pub fn uv_cylinder(
    radius: f32,
    half_height: f32,
    slices: usize,
) -> (Vec<[f32; 3]>, Vec<[f32; 2]>, Vec<[u8; 4]>, Vec<u32>)
Expand description

A cylinder along the y axis: flat caps top and bottom, uvs mapped so a texture wraps the wall and spots the caps.