Function gl_utils::mesh::capsule_3d_instanced_lines_list [−][src]
pub fn capsule_3d_instanced_lines_list(
index_offset: u32,
hemisphere_latitude_divisions: u16,
longitude_divisions: u16
) -> (Vec<Vert3dInstanced>, Vec<u32>)
Two hemispherical "caps" connected at their equators.
Intended to be scaled first and then each cap translated along the Z axis to achieve the correct capsule height.
Can also be used to render a hemisphere or a sphere by slicing the
corresponding number of indices. Note that the sphere is slightly
degenerate since there are duplicate vertices on the equator, and so the
last 2 * longitude_divisions
indices will differ but the total index
count will be the same.
Panics
Panics of hemisphere_latitude_divisions
is zero or if
longitude_divisions
is less than two.