[−][src]Trait plexus::primitive::index::Indexer
Vertex indexer.
Disambiguates arbitrary vertex data and emits a one-to-one mapping of indices to vertices. This is useful for generating basic rendering buffers for graphics pipelines.
Required methods
fn index<F>(&mut self, vertex: T::Vertex, f: F) -> (usize, Option<T::Vertex>) where
F: Fn(&T::Vertex) -> &K,
F: Fn(&T::Vertex) -> &K,
Indexes a vertex using a keying function.
Returns a tuple containing the index and optionally vertex data. Vertex
data is only returned if the data has not yet been indexed, otherwise
None
is returned.
Implementors
impl<T, K> Indexer<T, K> for HashIndexer<T, K> where
T: Topological,
K: Clone + Eq + Hash,
[src]
T: Topological,
K: Clone + Eq + Hash,
fn index<F>(&mut self, input: T::Vertex, f: F) -> (usize, Option<T::Vertex>) where
F: Fn(&T::Vertex) -> &K,
[src]
F: Fn(&T::Vertex) -> &K,
impl<T, K> Indexer<T, K> for LruIndexer<T, K> where
T: Topological,
K: Clone + PartialEq,
[src]
T: Topological,
K: Clone + PartialEq,