Function meshopt::remap::generate_vertex_remap[][src]

pub fn generate_vertex_remap<T>(
    vertices: &[T],
    indices: Option<&[u32]>
) -> (usize, Vec<u32>)

Generates a vertex remap table from the vertex buffer and an optional index buffer and returns number of unique vertices.

As a result, all vertices that are binary equivalent map to the same (new) location, with no gaps in the resulting sequence. Resulting remap table maps old vertices to new vertices and can be used in remap_vertex_buffer/remap_index_buffer.

The indices can be None if the input is unindexed.