The method Mesh.attributes() (https://docs.rs/bevy/latest/bevy/render/mesh/struct.Mesh.html#method.attributes()) iterates over each attribute, so it looks like:
Position: [vertex1 pos, vertex 2 pos ,....]
Normals: [vertex1 normal, vertex 2 normal, ....]
etc.
But I want an iterator that looks like this:
Vertex1: [position, normal ,...]
Vertex2: [position, normal,...]
So I guess it would look something like:
fn iter_vertices() -> impl Iterator<Item = (MeshVertexAttributeId, &VertexAtrributeValue)>
and the order would be of course the order in which the vertices where added.
Is there a simple way to achieve this? I didn't find a method that does this , I could just use mesh.attributes() but if something like this ^ is needed maybe I could open a PR?
API documentation for the Rust Mesh struct in crate bevy.