Function meshopt_rs::index::generator::generate_vertex_remap_multi
source · [−]pub fn generate_vertex_remap_multi(
destination: &mut [u32],
indices: Option<&[u32]>,
streams: &[Stream<'_>]
) -> usize
Expand description
Generates a vertex remap table from multiple vertex streams 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.
To remap vertex buffers, you will need to call remap_vertex_buffer for each vertex stream.
Note that binary equivalence considers all Stream::subset
bytes, including padding which should be zero-initialized.
Arguments
destination
: must contain enough space for the resulting remap table (vertex_count
elements defined bystreams
)indices
: can beNone
if the input is unindexed